Skip to content

the-asind/gemini-markdown-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation Translation

Prerequisites

Install

> for PROs

Clone the repository:

git clone <repository-url>
cd <repository-directory>
pip install google-generativeai

> a simpler one

Download last executable release: https://github.com/the-asind/gemini-markdown-translate/releases

Setup

  1. Create directories:

    • Create a folder named original in 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.
  2. Change promt.md:

    • Add the system instructions for translation in a file named promt.md in the root directory.

Usage

  1. Run the script (or open .exe)

    python main.py
  2. follow the instructions in the terminal

Notes

  • The script reads the system instructions from promt.md.
  • The script translates all .md files in the original directory and saves the translated files in the translated directory.
  • If a translated file already exists (e.g. you interrupted the translation), you will be prompted to overwrite, ignore, or ignore always.

Error Handling

  • If the original folder is empty.
  • If the promt.md file is missing.
  • If the translation is blocked due to safety ratings, a message will be printed.

License

This project is licensed under the MIT License.

About

AI-powered auto-translator for documentation files and folders at once with Gemini API key

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages