How deusyu/translate-book works
Rainman Translate Book is an agent skill and Python-backed pipeline for translating whole books in independently translated chunks, then validating and exporting the result. The documented workflow runs from a book or Markdown input through conversion, chunking, parallel agent translation, integrity checks, and multi-format publishing. Glossary observations and run state support terminology consistency and selective resumption. The orchestration links are based on the README; sampled excerpts clarify helper behavior, but do not expose the complete skill instructions or all script call sites.
Main entry points: SKILL.md Agent skill · convert.py Convert and chunk · merge_and_build.py Merge and build · merge_meta.py Merge observations
Components 19
Input conversion
- Convert and chunk
scripts/convert.py - Source chunks
Translation workflow
- Agent skill
SKILL.md - Translation subagents
- Neighbor excerpts
scripts/chunk_context.py - Translated chunks
Consistency and integrity
- Chunk manifest
scripts/manifest.py - Term glossary
scripts/glossary.py - Resume state
scripts/run_state.py - Chunk observations
scripts/meta.py - Merge observations
scripts/merge_meta.py - Manifest validation
scripts/manifest.py
Merge and publishing
- Merge and build
scripts/merge_and_build.py - Calibre publisher
scripts/calibre_html_publish.py
Other components
- Book requester
- Book or Markdown
- Calibre
- Pandoc
- HTML DOCX EPUB PDF
Connections 28
- Book requester → Agent skill: requests translation
- Book requester → Book or Markdown: provides input
- Agent skill → Convert and chunk: runs conversion
- Convert and chunk → Book or Markdown: reads input
- Convert and chunk → Calibre: converts formats
- Convert and chunk → Source chunks: writes chunks
- Convert and chunk → Chunk manifest: records hashes
- Agent skill → Translation subagents: dispatches chunks
- Translation subagents → Source chunks: reads chunks
- Agent skill → Neighbor excerpts: gets excerpts
- Neighbor excerpts → Source chunks: reads neighbors
- Agent skill → Term glossary: provides terms
- Translation subagents → Translated chunks: writes translations
- Translation subagents → Chunk observations: writes observations
- Agent skill → Resume state: checks progress
- Agent skill → Merge observations: merges observations
- Merge observations → Chunk observations: reads observations
- Merge observations → Term glossary: updates terms
- Agent skill → Manifest validation: requests validation
- Manifest validation → Chunk manifest: checks hashes
- Manifest validation → Translated chunks: checks matches
- Agent skill → Merge and build: runs build
- Merge and build → Translated chunks: merges chunks
- Merge and build → Pandoc: converts documents
- Merge and build → Calibre publisher: exports formats
- Calibre publisher → Calibre: converts HTML
- Merge and build → HTML DOCX EPUB PDF: writes HTML
- Calibre publisher → HTML DOCX EPUB PDF: writes formats