CLI tool for document translation using ChatGPT
Top 74.5% on sourcepulse
This project provides a Python-based tool for translating documents using ChatGPT, targeting users who need to translate text files or entire folders. It offers direct and bilingual output formats, with specific optimizations for PDF parsing via Grobid.
How It Works
The tool leverages the OpenAI API (or Azure OpenAI) to perform translations. Users specify an input file or folder, an optional target language, and their API key. It processes various file formats (.pdf, .txt, .md, .html, .rtf), with a specialized parser built on Grobid for enhanced PDF content extraction. The output includes a direct translation and a bilingual version.
Quick Start & Requirements
pip install -r requirements.txt --quiet
python ChatGPT-translate.py --input_path=<path> --openai_key=<key>
Highlighted Details
Maintenance & Community
No specific community links or maintenance details are provided in the README.
Licensing & Compatibility
The repository does not explicitly state a license.
Limitations & Caveats
The tool requires an OpenAI API key with a linked payment method to avoid strict rate limits. The PDF parser relies on Grobid, which may have its own dependencies or limitations. No explicit license is mentioned, which could impact commercial use.
1 year ago
1 day