CLI tool for automated Markdown file translation using ChatGPT
Top 76.7% on sourcepulse
This tool automates the internationalization (i18n) of Markdown blog posts using ChatGPT, targeting content creators and developers who need to translate their work into multiple languages efficiently. It streamlines the process by handling batch translations, front matter compatibility, and fixed content replacement, significantly boosting productivity for multilingual projects.
How It Works
The core of Auto-i18n is its Python script, auto-translater.py
, which processes Markdown files within a specified directory. It leverages the ChatGPT API for translation, supporting batch operations and intelligently handling front matter based on configurable rules (auto-translate, fixed replacement, or no processing). The tool also tracks processed files to avoid redundant translations and includes mechanisms for forced re-translation or skipping specific files.
Quick Start & Requirements
pip install -r requirements.txt
python auto-translater.py
env.py
or GitHub Secrets).Highlighted Details
Maintenance & Community
chatanywhere/GPT_API_free
and linweiyuan/go-chatgpt-api
.Licensing & Compatibility
Limitations & Caveats
Translations may occasionally be inaccurate or incomplete, requiring manual review before publication. The tool relies on specific Markdown formatting (e.g., blank lines around special tags like [translate]
) for certain functionalities.
1 year ago
1 week