fredchu

Book Translator — Development skill for Claude Code

Development community

Literary EPUB → bilingual zh-TW EPUB translator (Claude Code skill) | 文學書 EPUB 雙語繁中翻譯(Claude Code skill).

How to install Book Translator

This entry records only its repository, not the path inside it, so there is no exact command to give. Open fredchu/book-translator and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Book Translator does

Literary EPUB → bilingual zh-TW EPUB translator (Claude Code skill) | 文學書 EPUB 雙語繁中翻譯(Claude Code skill).

Alternatives in Development

  • Book To Skill — Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work 25.9k ★
  • Ars Abstract — ARS academic-paper abstract-only mode — bilingual abstract + keywords 4.5k ★
  • Analyze Codebase To Book — Prompt: Turn Any Codebase Into a Technical Book 1.7k ★

README

book-translator

A Claude Code skill that turns literary EPUBs into **full-fidelity bilingual EPUBs**: original presentation preserved verbatim (CSS, fonts, images, file paths, class names, internal hrefs), Traditional Chinese (Taiwan) translation paragraphs interleaved after every English content paragraph.

Not a generic "throw text at an LLM" translator. The pipeline is split between deterministic structural preservation and LLM-driven translation, with five separate audit gates that fail closed.


Cloud GPU (Vast.ai / RunPod)

`scripts/cloud_llm.sh -- --book X.epub` rents a GPU, serves the Qwopus model with vLLM, translates through the omlx engine and destroys the instance. See SKILL.md "Cloud mode".

Why this exists

Generic AI book translators tend to do two things badly:

  1. They drop structure. Cover, title page, copyright, dedication, part dividers, acknowledgments, notes, about-the-author, promotional pages — many of these are short or contain images, so simple text-extract pipelines silently skip them. The output looks like a book but is missing front matter and back matter.
  2. They drop presentation. Original CSS files, embedded fonts, image assets, and class-driven typography get replaced by a generic stylesheet. The reading experience collapses.

`book-translator` treats structure and presentation as **deterministic contracts**, separate from translation quality. The original EPUB layout (`OEBPS/xhtml/05_Contents.xhtml`, `OEBPS/css/*`, `OEBPS/fonts/*`, `OEBPS/images/*`) is copied verbatim into the output EPUB; translation paragraphs are **inserted alongside** the source paragraphs, with the same class names so original CSS continues to apply.


Pipeline

source.epub
   │
   ▼
extract_epub.py           # OPF spine walk → manifest v2 + verbatim copy of
   │                       # css/, fonts/, images/, xhtml/ to /
   ▼
dispatch.py + glossary.py # parallel chapter translation with per-book glossary,
   │