- Python 3.x (or you can use release executables)
- Google Gemini API key (get FREE key from https://aistudio.google.com/app/apikey)
Clone the repository:
git clone <repository-url>
cd <repository-directory>
pip install google-generativeaiDownload last executable release: https://github.com/the-asind/gemini-markdown-translate/releases
-
Create directories:
- Create a folder named
originalin the root directory and place the Markdown files (and/or folders with files) to be translated in it. - The translated files will be saved in a folder named
translated.
- Create a folder named
-
Change
promt.md:- Add the system instructions for translation in a file named
promt.mdin the root directory.
- Add the system instructions for translation in a file named
-
Run the script (or open .exe)
python main.py
-
follow the instructions in the terminal
- The script reads the system instructions from
promt.md. - The script translates all
.mdfiles in theoriginaldirectory and saves the translated files in thetranslateddirectory. - If a translated file already exists (e.g. you interrupted the translation), you will be prompted to overwrite, ignore, or ignore always.
- If the
originalfolder is empty. - If the
promt.mdfile is missing. - If the translation is blocked due to safety ratings, a message will be printed.
This project is licensed under the MIT License.