bilingual_book_maker  by yihong0618

CLI tool for AI-assisted creation of bilingual books

created 2 years ago
8,764 stars

Top 5.9% on sourcepulse

GitHubView on GitHub
Project Summary

This tool assists users in creating bilingual EPUB and TXT books using AI translation services. It's designed for public domain books, offering a way to generate multilingual versions of literary works.

How It Works

The tool leverages various large language models (LLMs) for translation, including OpenAI's GPT series, Claude, Gemini, and others via the liteLLM library. Users provide an EPUB or TXT file and an API key for their chosen translation service. The tool processes the book content, sends it to the LLM for translation, and then reconstructs the book in a bilingual format.

Quick Start & Requirements

  • Install via pip: pip install -r requirements.txt or pip install -U bbook_maker.
  • Run with: python3 make_book.py --book_name test_books/animal_farm.epub --openai_key ${openai_key} --test or bbook --book_name test_books/animal_farm.epub --openai_key ${openai_key} --test.
  • Requires Python 3.8+ and an internet connection or proxy.
  • API keys for translation services (e.g., OpenAI, DeepL, Gemini) are necessary.
  • See official documentation for more details.

Highlighted Details

  • Supports a wide range of translation models including OpenAI, Azure OpenAI, Claude, Gemini, DeepL, and Ollama.
  • Offers advanced customization options for prompts, translation tags, context management, and batch processing.
  • Includes a --test flag for previewing translations without incurring full costs.
  • Can translate TXT and SRT files in addition to EPUBs.

Maintenance & Community

  • Contributions are welcome via Pull Requests.
  • The project has a TODO list in its issues.
  • See GitHub Issues for contribution opportunities.

Licensing & Compatibility

  • The license is not explicitly stated in the README, but the project is open-source.
  • Intended for public domain books; users are responsible for ensuring they do not translate copyrighted works.

Limitations & Caveats

  • The tool is intended for public domain books only; use on copyrighted material is prohibited.
  • Free trial API tokens may have usage limits, potentially slowing down the process.
  • The effectiveness of context-aware translation depends on the LLM's capabilities and prompt engineering.
Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
383 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.