rbook-utils
rbook-utils is a high-level wrapper over rbook — to conveniently parse, convert, and render ebooks for downstream consumption (e.g., into Markdown).
Demo

Example output of rbook-utils on Alice's Adventures in Wonderland
Examples
API
use PathBuf;
use ;
CLI
Options
| Option | Values | Default | Description |
|---|---|---|---|
--input |
path | assets |
Input EPUB file or directory to scan recursively for .epub files. |
--output |
path | rbook-utils/results |
Root output location for generated Markdown and extracted assets. |
--media |
none, image, all |
image |
Choose whether to extract no media, referenced images only, or images plus manifest audio/video. |
--format |
plain, rich |
plain |
Output plain Markdown or preserve richer HTML where needed. |
--split-chapters |
flag | false |
Write one Markdown file per section/chapter instead of a single combined file. |
Advanced
| Option | Values | Default | Description |
|---|---|---|---|
--css |
inline, external |
inline |
For rich output, embed stylesheet content inline or write linked CSS files. |
--chapter-fallback |
off, auto, force |
auto |
Control whether chapter boundaries are inferred from headings when TOC segmentation is weak. |
--notes-mode |
inline, chapter-end, global |
inline |
Keep footnotes inline, move them to each chapter end, or emit a global notes section/file. |
--export-manifest |
off, v1 |
off |
Write manifest.v1.json with source-to-output mapping and asset metadata. |
--quality-report |
off, v1 |
off |
Write report.v1.json with TOC, cleanup, asset, and link diagnostics. |
--ocr-cleanup |
off, basic, aggressive |
off |
Apply OCR cleanup heuristics to extracted section text. |
--nav-cleanup |
off, auto |
auto |
Deduplicate and trim noisy TOC/navigation entries before sectioning. |
--filename-scheme |
index, hash |
index |
Choose split-chapter output filenames by section order or stable content hash. |
Acknowledgements
- Huge shout out to Devin Sterling for creating the excellent
rbookcrate!!!
License
Apache 2.0