Move the WML renderer out to wapdown

Every other renderer here -- text, micron, ama, gemini, nex -- is a
straight transform of a document into a flat, minimal text format. The
WML renderer was neither: it emitted an XML tree, and it restructured the
document rather than transforming it, splitting one file into many
<card>s and inventing navigation between them. That is why it was the
only renderer needing split_level / max_card_bytes / menu levers, the
only one buffering the whole event stream instead of streaming it, and
the only one that required a block kind in the shared parser --
CARD_BREAK, for its {.card} divider -- that every other renderer ignored
as a no-op.

It now lives in its own repository, where restructuring a document into a
navigable deck is the point rather than an intrusion:

    https://codeberg.org/randogoth/wapdown

Removed here: renderers/wml.py, its CLI registration, the wml examples,
the README section, and the CARD_BREAK event and {.card} directive that
existed solely to serve it. A leftover {.card} line in an old document
will now render as literal text rather than being silently dropped.

Verified: all five remaining renderers produce byte-identical output to
before this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
randogoth 2026-09-23 09:01:40 +03:00
parent d5046543b3
commit e708dce8f7
8 changed files with 12 additions and 544 deletions

View file

@ -1,14 +0,0 @@
Live updates for the ridge trail network. Reception is spotty past the tree line, check before you go.
{.card Weather}
Cold and clear. Wind: **15 mph** gusting from the *northwest*. Permit fee: $5.
{.card Trail Status}
- North Loop: open
- South Loop: closed
- Summit Spur: open, ice above 2000m
{.card Contact}
Ranger station: [call dispatch](tel:+15555550123)
![Trail map](https://example.com/map.png)

View file

@ -1,19 +0,0 @@
# Trail Conditions
Live updates for the ridge trail network. Reception is spotty past the tree line, check before you go.
## Weather
Cold and clear. Wind: **15 mph** gusting from the *northwest*. Permit fee: $5.
## Trail Status
- North Loop: open
- South Loop: closed
- Summit Spur: open, ice above 2000m
## Contact
Ranger station: [call dispatch](tel:+15555550123)
![Trail map](https://example.com/map.png)

View file

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1">
<p><b><big>Trail Conditions</big></b></p>
<p>Live updates for the ridge trail network. Reception is spotty past the tree line, check before you go.</p>
<p><b>Weather</b></p>
<p>Cold and clear. Wind: <b>15 mph</b> gusting from the <i>northwest</i>. Permit fee: $$5.</p>
<p><b>Trail Status</b></p>
<p>- North Loop: open</p>
<p>- South Loop: closed</p>
<p>- Summit Spur: open, ice above 2000m</p>
<p><b>Contact</b></p>
<p>Ranger station: <a href="tel:+15555550123">call dispatch</a></p>
<p><img src="https://example.com/map.png" alt="Trail map"/></p>
</card>
</wml>