No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| skills/book-translate | ||
| package.json | ||
| README.md | ||
pi-book-translate
A pi skill that turns a book (EPUB or PDF) into a translated, TTS-friendly EPUB in any language.
Splits the book into chapters, extracts clean text (footnotes, colophons, imprints and other furniture stripped), fans out parallel translation subagents, quality-checks every chapter, and assembles the final EPUB with pandoc.
Install
pi install https://git.cyfrowynomada.com/CyfrowyNomada/pi-book-translate.git
Then ask pi: "translate this book into Polish and make an epub" — or invoke the skill directly with /skill:book-translate.
What it does
- Source — prefers EPUB over PDF (already chapter-split HTML, no OCR); unzips it.
- Extract — one UTF-8 text file per chapter, footnote markers removed without truncating surrounding text, endnotes/colophon/imprint skipped.
- Translate — one subagent per chapter in batches of ~5, with a per-chapter cleanup pass for failures.
- QC — paragraph parity, source/target length ratio, heading check, target-language diacritic density.
- Assemble — pandoc → EPUB 3 with correct
dc:language, one XHTML per chapter, TOC, zero leftovers.
Requirements
- pi with the pi-subagents extension (translation fan-out)
python3(extraction + QC)pandoc(EPUB assembly; e.g.pkg install pandoc/apt install pandoc)
Notes from the trenches
The skill documents the failure modes it survived: XML tail-loss when stripping footnote anchors, standalone-pi's foreground-only subagent limit, workflow key patterns, cached 429 model exclusions, and why children reporting "success" is not QC.
License
MIT