# wapdown Compile Markdown into a [WML](https://en.wikipedia.org/wiki/Wireless_Markup_Language) deck for WAP browsers. ```bash wapdown trail.md -o trail.wml ``` Write a document the ordinary way; get back valid WML 1.3 that a 2001 handset can actually navigate. ## Why this is not just another text exporter Most Markdown converters transform a document: same content, different markup, one file in and one file out. A WML deck is not that shape. A WAP screen is a few lines tall, scrolling is painful, and the input device is a numeric keypad — so a deck is a set of short **cards** joined by softkeys and menus, not one long page. So wapdown **restructures**. It decides where cards begin, builds a menu that exists nowhere in your source, wires up Back and More controls, and paginates anything still too big for the device's cache. That is why it has more knobs than a plain text exporter needs: the knobs *are* the tool. ## Install Install the CLI with [uv](https://github.com/astral-sh/uv): ```bash uv tool install --from git+https://codeberg.org/randogoth/wapdown/ wapdown ``` Zero runtime dependencies, Python 3.13+. ## Cards A document with no options becomes a single card. Splitting is always opt-in, and there are two ways to ask for it. **Manual dividers** — put a `{.card}` or `{.card Title}` line wherever a new card should start: ```markdown Intro shown on the menu card... {.card Weather} Cold and clear. {.card Trail Status} - North Loop: open ``` **Heading-level splitting** — `--split-level 2` starts a new card at every `##`, which fits the common one-H1-title-plus-H2-sections document: ```bash wapdown trail.md --split-level 2 ``` If a document contains any `{.card}` markers, they win and `--split-level` is ignored: an explicit boundary in the document is a stronger statement of intent than a rule passed on the command line. ## Navigation Once a document resolves to two or more cards, wapdown builds the classic WAP-portal shape — a **menu** card listing each section, each spoke reachable in one press and returning with Back: ```bash wapdown trail.md --split-level 2 --menu-style select ``` `--menu-style select` renders those choices as a `