This commit is contained in:
randogoth 2025-10-20 21:43:08 +03:00
parent 6350a8a305
commit 2db4eab94c
2 changed files with 328 additions and 107 deletions

View file

@ -12,11 +12,13 @@ The project wraps the [md2txt](../md2txt) toolchain, using its Markdown parser a
### Usage
```bash
uv run mambler.py --title "Your Book Title" path/to/index.md output.amb
uv run mambler.py --title "Your Book Title" --codepage 437 path/to/index.md output.amb
```
- `index.md` is the root Markdown file. Any local Markdown links it contains will be followed and bundled automatically.
- `--title` is optional; when provided the value is embedded in the AMB archive header (truncated to 64 ASCII bytes).
- `--codepage` controls the 8-bit encoding used for every AMA article (default: `437`). Any character that cannot be expressed in the chosen codepage aborts the build with a helpful error so you can pick a better fit.
- If any emitted byte lives in the 0x800xFF range, `mambler` automatically writes a companion `UNICODE.MAP` file describing the high-half character mapping, mirroring the recommendation in the AMA/AMB specification.
- The command prints the path of the generated AMB file on success.
### Development Notes