funstory-ai /BabelDOC

Yet Another Document Translator

★ 9,877⑂ 830👁 40⑃ 451● 185▤ 215
RustAGPL-3.0Created 2024-11-13funstory-ai.github.io/BabelDOC/
Download: v0.7.1v0.7.1 ↓0.7.12026-11-07
+5
Daily
9,877
stars
830
forks
40
watchers
451
prs
185
issues
215
releases

README

BabelDOC --


  
  
    
  
    
  
     --
  
  
    
  
    
  






PDF scientific paper translation and bilingual comparison library.

- Online Service: Beta version launched Immersive Translate - BabelDOC Free usage quota is available; please refer to the FAQ section on the page for details.
- Self-deployment: PDFMathTranslate-next support for BabelDOC, available for self-deployment + WebUI with more translation services.
- Provides a simple command line interface.
- Provides a Python API.
- Mainly designed to be embedded into other programs, but can also be used directly for simple translation tasks.

 [!TIP]

 How to use BabelDOC in Zotero

 1. Immersive Translate Pro members can use the immersive-translate/zotero-immersivetranslate plugin

 2. PDFMathTranslate self-deployed users can use the guaguastandup/zotero-pdf2zh plugin

Supported Language

 Preview





 We are hiring

See details: EN | ZH

 Getting Started

 Install from PyPI

We recommend using the Tool feature of uv to install BabelDOC.

1. First, you need to refer to uv installation to install uv and set up the PATH environment variable as prompted.

2. Use the following command to install BabelDOC:

bash
uv tool install --python 3.12 BabelDOC

babeldoc --help


3. Use the babeldoc command. For example:

bash
babeldoc --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"  --files example.pdf

 multiple files
babeldoc --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"  --files example1.pdf --files example2.pdf


 Install from Source

We still recommend using uv to manage virtual environments.

1. First, you need to refer to uv installation to install uv and set up the PATH environment variable as prompted.

2. Use the following command to install BabelDOC:

bash
 clone the project
git clone https://github.com/funstory-ai/BabelDOC

 enter the project directory
cd BabelDOC

 install dependencies and run babeldoc
uv run babeldoc --help


3. Use the uv run babeldoc command. For example:

bash
uv run babeldoc --files example.pdf --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"

 multiple files
uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"


 [!TIP]
 The absolute path is recommended.

 Advanced Options

 [!NOTE]
 This CLI is mainly for debugging purposes. Although end users can use this CLI to translate files, we do not provide any technical support for this purpose.

 End users should directly use Online Service: Beta version launched Immersive Translate - BabelDOC 1000 free pages per month.

 End users who need self-deployment should use PDFMathTranslate 2.0
 
 If you find that an option is not listed below, it means that this option is a debuggin

Top issues

Discussions

Latest release

v0.7.1 v0.7.1 2026-11-07
BabelDOC v0.7.1

 Bug Fixes

- Fixed a regression in 0.7.0 where constructing TranslationConfig without an input_file (for example, a configuration used only to drive a progress display) raised TypeError. This broke the pdf2zh_next command line with BabelDOC 0.7.0.\
  修复 0.7.0 引入的回归:不传 input_file 构造 TranslationConfig(例如只用于驱动进度显示的配置)时会抛出 TypeError,导致 pdf2zh_next 命令行在 BabelDOC 0.7.0 下无法使用。


---

 Changes

 No changes

 Contributors

@awwaawwa

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON