YaBB Archive

Read-only viewer

← Back to list

HTML→YaBB Converter Test Post (Script Validation)

Author: SMacB | Posted: 2026-01-20 11:43:37 UTC

HTML→YaBB Converter Test Post




This post is a deliberate stress-test for a small Python script that converts normal HTML into an old-style
YaBB single-line message format (pipe-delimited header + HTML body + trailing ||).
It includes common formatting traps: blank lines, inline code, lists, a table, and preformatted log text.




Goal: prove that the converter preserves readable structure while enforcing YaBB constraints:
single-line output, safe line breaks, and no accidental field delimiter pipes.






1) Quick spec




2) Example of “pipes are dangerous”



If the body contains a literal pipe character, YaBB interprets it as a field delimiter and everything explodes quietly.
For this test, the converter should replace pipes with an HTML entity.
For example:




Before: CALLSIGN | BAND | SNR

After: CALLSIGN | BAND | SNR



3) Tiny diagnostics table







ParameterValueNote
timestampautoUTC epoch seconds
line breaks<br />YaBB-safe
blank lines<br /><br />Paragraph spacing


4) Log snippet


Below is a mock “script run” log block (HTML <pre> tends to be brittle in old boards, so this is intentionally plain):




[2026-01-19 22:14:03Z] INFO Reading HTML input: test_converter_post.html

[2026-01-19 22:14:03Z] INFO Extracting <body>…</body>

[2026-01-19 22:14:03Z] INFO Normalising newlines → <br />

[2026-01-19 22:14:03Z] INFO Escaping pipes → |

[2026-01-19 22:14:03Z] INFO Writing YaBB post: 1768xxxxxx.txt

[2026-01-19 22:14:03Z] OK Post created without clobbering existing IDs



5) “Figure” style image test



This last block tests YaBB’s image embedding and caption styling. Replace the URL with any known-good image on your server.






Figure 1 (Aurora over Boscastle Harbour 20 Jan 2026) – Placeholder image for verifying YaBB [img] embedding and caption rendering from converted HTML.



End of test post.

|

For completeness, the local scripts used to generate this entry (including the yabbify wrapper and HTML→YaBB converter) are documented here:
HTML→YaBB conversion scripts (README)|