yihong0618 /bilingual_book_maker
Make bilingual epub books Using AI translate
★ 9,941⑂ 1,300👁 51⑃ 237● 304▤ 10
+1
Daily
9,941
stars
1,300
forks
51
watchers
237
prs
304
issues
10
releases
README
Bilingual Book Maker 中文 | English The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt/md/srt/pdf files and books. Use it only with material you have the right to translate — works for which you hold the necessary rights, suitably licensed or permitted works, public-domain books, or uses otherwise allowed by applicable law. Before using this tool, please review the project's disclaimer. Guides for every file type and option, and the measurements behind the defaults, are on the wiki. If you use a coding agent (Codex, Claude Code), the repository's skill translates a book for you: Translate with an agent. !image Supported endpoints OpenAI and Anthropic format endpoints are supported. Usually it comes with three fields, two if you are using the official endpoints, such as gpt-6-luna (the default) or claude-sonnet-4-6. Specify openai, or anthropic at --api_format for API request formats. This argument also supports selecting some translation services (google, caiyun, deepl, deeplfree, tencent, customapi — not an OpenAI format) or codex if you want to use your Codex quota instead. --provider is an alternative way to pass credentials, through a JSON config file bbm_providers.json. Epub tags classification is auto enabled on JSON-schema endpoints, and on any endpoint that can hold a conversation — the codex route and plain reseller proxies included — where the model is asked for exact skip/translate verdicts instead. Only routes with no conversation at all (the MT engines) fall back to translating p tags only, so some poetry or verse may be omitted there. See Plan mode for details. Older flags (--model gpt4o, --model gemini, --openai_key, …) still work: see Models and languages. Preparation 1. ChatGPT or OpenAI token [^token] 2. epub/txt/md/pdf books 3. Environment with internet access or proxy 4. Python 3.10+ Quick Start A sample book, test_books/animal_farm.epub, is provided for testing purposes. --test translates only its first few paragraphs. shell pip install -r requirements.txt or: pip install -U bbook_maker Then: shell cp bbm_providers.example.json bbm_providers.json edit base_url, default_models and env_key in ./bbm_providers.json python3 make_book.py --book_name test_books/animal_farm.epub --provider openai --test --use_context session You can also pass the key on the command line: shell python3 make_book.py --book_name test_books/animal_farm.epub \ --key sk-... --model gpt-6-luna --api_base https://api.openai.com/v1 --test --use_context session To spend a Codex subscription: shell python3 make_book.py --book_name test_books/animal_farm.epub --model gpt-6-luna --api_format codex --test Or hand it to a coding agent shell git clone https://github.com/yihong0618/bilingual_book_maker.git cd bilingual_book_maker codex "Hi, please use bbm-plan to translate this book: test_books/animal_farm.epub into a bilingual Chinese-
Top issues
#383使用騰訊翻譯出現問號操作26 comments · 2024-02-15#238我吐血了…跑了一天用CTRL+C中斷,回來不能用--resume,連個備份都沒有,哭啊20 comments · 2023-04-08#243我看見說#237好像已順利完成?那搞單語輸出要怎樣搞?17 comments · 2023-04-11#90请问“This model's maximum context length is 4096 tokens”是必须API付费才可以解决是吗?17 comments · 2023-03-07#39【功能】希望可以增加SRT字幕文件的翻译14 comments · 2023-03-04#51--resume 继续执行没有进行翻译了10 comments · 2023-03-05#363使用非直连的KEY,也就是指定--api_base那种,访问时会报错 。9 comments · 2024-01-02#192TODO9 comments · 2023-03-19
Discussions
#529yihong我找你找的很辛苦你帮我看看我为什么老是运行出bug2 comments · 2026-04-15#453问一下有没有那家免费是跟彩云英/日翻中翻译质量差不多的1 comments · 2025-03-21#452建议加入多行批量提交翻译,以提高效率和翻译质量2 comments · 2025-03-20#424Optimizing Adaptive Prompt Design for Anthropic API's Dynamic Context Cache1 comments · 2024-08-19#410Single-language book format (not bilingual)2 comments · 2024-06-27#389纯小白问问代码要输入在哪,git和CMD都试过了2 comments · 2024-03-18#345Can we add multi-process feature0 comments · 2023-09-13#341寫了一個連到colab平台上的版本0 comments · 2023-09-07
Latest release
v1.3.2 v1.3.2 2026-10-30What's Changed feat(docs): Integrate Jev through Cloudflare AI gateway as epub tag classifier by @pc418 in https://github.com/yihong0618/bilingual_book_maker/pull/580 feat: Datalab as a --to-epub engine, Claude Message Batches (--batch-api) on Markdown and EPUB, bilingual --to-epub contents, reading-edition fixes by @pc418 in https://github.com/yihong0618/bilingual_book_maker/pull/581 Full Changelog: https://github.com/yihong0618/bilingual_book_maker/compare/v1.3.1...v1.3.2