epub-translator  by oomol-lab

EPUB translator for lossless e-book translation

created 1 month ago
407 stars

Top 71.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Python library for translating EPUB e-books using Large Language Models (LLMs), preserving original formatting, illustrations, and layout. It targets developers, language learners, and e-book enthusiasts seeking to overcome language barriers, offering bilingual comparison versions for enhanced learning and sharing.

How It Works

The library leverages LLMs to perform text translation within EPUB files. It processes EPUBs by extracting content, sending it to the LLM for translation, and then reassembling the translated content back into a new EPUB file. This approach ensures 100% retention of the original book's format, illustrations, catalog, and layout, a key advantage over simpler text extraction methods. It supports parallel processing of AI requests for faster translation of entire books.

Quick Start & Requirements

  • Install via pip: pip install epub-translator
  • Requires Python 3.10 or higher (3.10.16 recommended).
  • LLM API key and base URL are necessary.
  • Example usage and detailed function calls are provided in the README.

Highlighted Details

  • Supports multi-language translation (English, Chinese, Japanese, Spanish, French, German).
  • Generates bilingual EPUBs with top-down comparisons.
  • Allows insertion of custom prompt words (e.g., glossaries) to guide AI translation.
  • Offers optional AI models, including DeepSeek and ChatGPT.
  • Implements progress saving and monitoring for long translation tasks.

Maintenance & Community

The project is maintained by oomol-lab. Further community or roadmap information is not detailed in the provided README.

Licensing & Compatibility

The README does not explicitly state the license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project relies on external LLM APIs, which may incur costs and are subject to their availability and rate limits. The user is responsible for managing cache files generated by the working_path feature, as they can grow large.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
3
Star History
162 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.