No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-07 22:44:59 +02:00
skills/book-translate pi-book-translate: book translation skill (EPUB → parallel subagent translation → TTS-ready EPUB) 2026-09-07 22:44:59 +02:00
package.json pi-book-translate: book translation skill (EPUB → parallel subagent translation → TTS-ready EPUB) 2026-09-07 22:44:59 +02:00
README.md pi-book-translate: book translation skill (EPUB → parallel subagent translation → TTS-ready EPUB) 2026-09-07 22:44:59 +02:00

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

  1. Source — prefers EPUB over PDF (already chapter-split HTML, no OCR); unzips it.
  2. Extract — one UTF-8 text file per chapter, footnote markers removed without truncating surrounding text, endnotes/colophon/imprint skipped.
  3. Translate — one subagent per chapter in batches of ~5, with a per-chapter cleanup pass for failures.
  4. QC — paragraph parity, source/target length ratio, heading check, target-language diacritic density.
  5. 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