# 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
```
A WAP screen is a few lines tall and driven by a numeric keypad, so a deck is a set of short **cards** joined by softkeys — not one long page. wapdown restructures a document into that shape: it decides where cards begin, builds a menu, wires up Back and More, and paginates whatever is still too big.
## Install
```bash
uv tool install --from git+https://code.randogoth.com/randogoth/wapdown/ wapdown
```
Zero runtime dependencies, Python 3.13+.
## Markdown → WML
Every mapping, with the markup wapdown actually emits:
| Markdown | WML | Notes |
| --- | --- | --- |
| `# Heading` (first on a card) | `
…
` | |
| `## Heading` (and any later heading) | `
…
` | WML has no heading element |
| `Text` over `===` / `---` | same as `#` / `##` | setext headings |
| Paragraph | `
…
` | the only block container WML has |
| `- item` | `
- item
` | no list element; the bullet is literal text |
| `1. item` | `
1. item
` | numbering is counted and written out |
| `> quote` | `
…
` | |
| `---` / `***` / `___` | *(nothing)* | **starts a new card**; WML has no rule element |
| `{.card Title}` | *(nothing)* | starts a new card, with a title |
| ` ```fenced``` ` / 4-space indent | `
a b
` | ` ` between lines |
| `**bold**`, `__bold__` | `…` | |
| `*italic*`, `_italic_` | `…` | |
| `` `code` `` | *(markers stripped)* | no equivalent |
| `~~strike~~` | *(markers stripped)* | no equivalent |
| `[label](url)` | `label` | emphasis in the label is stripped |
| `` | `` | subject to `--images` |
| Pipe table | `