Commit graph

35 commits

Author SHA1 Message Date
randogoth
9d290ed734 fix: close gemini renderer gaps (tables, link markers, figlet crash) 2026-09-26 13:08:54 +03:00
randogoth
5ec7da26ab Point the README URLs at the canonical repo
Both the install command and the wapdown pointer advertised Codeberg
URLs, but these repositories live at code.randogoth.com. Verified both
resolve over HTTPS, which is what `uv tool install --from git+...` needs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 09:35:37 +03:00
randogoth
67a727ba24 nex renderer 2026-09-23 09:14:41 +03:00
randogoth
e708dce8f7 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>
2026-09-23 09:03:20 +03:00
randogoth
d5046543b3 Add WML renderer for WAP decks
Adds a `wml` renderer plugin converting Markdown into WML decks for
old WAP browsers, following the existing parser -> BlockEvent stream
-> renderer plugin architecture (see gemini/micron/ama renderers).

WML content is idiomatically short and button/link-navigated rather
than one long page, so unlike the other renderers, `wml` can split a
document into multiple <card>s -- but only opt-in:

- Manual `{.card}` / `{.card Title}` divider directives (new,
  format-agnostic BlockKind.CARD_BREAK; silently ignored by every
  other renderer via their existing unhandled-kind no-op path).
- Heading-level splitting via `--renderer-option split_level=N`,
  ignored when manual dividers are present.
- Plain documents with neither stay a single card (the safe default).

When a document resolves to 2+ cards, a hub-and-spoke menu card is
built by default (button/link choices -> section, Back to menu), or
`menu=false` switches to a linear Next/Back chain. A byte-overflow
safety net (`max_card_bytes`, default 1400) paginates any single
section that's still too large.

Also adds GFM pipe-table support (BlockKind.TABLE) via the same
sentinel-injection preprocessing trick already used for ASCII art
blocks, so the parser's line-by-line loop needed no lookahead rework.
Rendered as `<table>` in wml, silently ignored elsewhere.

No new dependencies. No devbox/jj/test-suite additions -- decided
against for this repo (see README for the full option reference).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 08:22:14 +03:00
randogoth
b539d037c6 Update README.md
fixed dead link
2026-04-27 19:59:04 +02:00
randogoth
38fa950b0e install 2025-10-20 22:51:38 +03:00
randogoth
c3d90763ce update 2025-10-20 22:40:00 +03:00
randogoth
403034d462 install info 2025-10-20 22:19:58 +03:00
randogoth
043a61e021 install info 2025-10-20 22:18:46 +03:00
Flux
795eae15c1
Add MIT License to the project 2025-10-20 22:06:32 +03:00
randogoth
217ba1abb3 readme fix 2025-10-20 22:04:59 +03:00
randogoth
a0c2bebc17 ama code fix 2025-10-20 20:35:36 +03:00
randogoth
107f2155de examples 2025-10-20 20:07:38 +03:00
randogoth
315142005d gemini protocol gemtext support 2025-10-20 18:40:59 +03:00
randogoth
ae26bb205b alignment fix 2025-10-20 17:56:30 +03:00
randogoth
8283dd45ea examples 2025-10-20 17:48:57 +03:00
randogoth
5067b9ec65 packaged 2025-10-20 17:26:38 +03:00
randogoth
8cdedd43d6 allow figlet in micron 2025-10-20 17:02:02 +03:00
randogoth
4b58e21dfc md2amb tool 2025-10-20 16:59:52 +03:00
randogoth
0b11668f39 AMA format 2025-10-20 16:30:26 +03:00
randogoth
c9af956d0a micron renderer derivative 2025-10-20 15:55:47 +03:00
randogoth
937930ef5c tightening 2025-10-20 15:49:27 +03:00
randogoth
5e0e4b701e micron renderer 2025-10-20 15:31:26 +03:00
randogoth
03cab97dac plugin system 2025-10-20 15:03:34 +03:00
randogoth
1c69a01aa6 readme 2025-10-20 14:15:24 +03:00
randogoth
b85530483a ascii art blocks 2025-10-20 14:14:07 +03:00
randogoth
ad70e8dcd8 list formatting 2025-10-20 12:16:20 +03:00
randogoth
c57cfc4747 block decorations and wrap 2025-10-20 12:09:25 +03:00
randogoth
de6e99c24a modularized 2025-10-20 11:40:17 +03:00
randogoth
4e754528c0 headline spacing 2025-10-20 01:18:33 +03:00
randogoth
8f25427fd7 figlet fix, code block margin 2025-10-20 01:11:29 +03:00
randogoth
70196134d6 figlet alignment 2025-10-20 00:00:16 +03:00
randogoth
b1f1d7b5f6 improvements 2025-10-19 23:22:15 +03:00
randogoth
3d889ec117 init 2025-10-19 22:58:10 +03:00