Skip to content

A tool that automatically translates your project's documentation into another language.

License

Notifications You must be signed in to change notification settings

koriym/deepldoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Command line tool for deepl

go_test

deepldoc is a tool that automatically translates your project's documentation into another language. Written in the Go language, it uses DeepL's API as the translation engine.

Installation

You can install deepldoc and deepl using Homebrew:

brew tap koriym/deepldoc
brew install deepldoc
brew install deepl

Alternatively, if you prefer not to use Homebrew, you can download and run the binaries directly by following the steps in the How to Download and Run Binaries section below.

How to use

1. Create a Free API Account

  • After creating an account, obtain an API key.
  • Set the API key as an environment variable by executing the following command in the terminal:
export DEEPL_API_KEY=your_api_key_here

2. Using the deepl Command

  • The deepl command is used as follows:
. /deepl text [target_language]
  • text is the text to be translated.
  • target_language is the language code of the target language.

3. Using the deepldoc Command

To use deepldoc, follow these instructions:

. /deepldoc source_directory [target_language] [file_extension]
  • source_directory is the path to the directory containing the documents you want to translate.
  • target_language is the language code of the target language (e.g. 'ja'). If omitted, 'ja' is used by default.
  • file_extension is the extension of the file to be translated (e.g. 'md'). If omitted, 'md' is used by default.

Notes

  • deepldoc translates files with the relevant file extensions and copies files with non-relevant extensions as they are. This preserves the original directory structure.

  • deepldoc preserves code blocks and links in your documents. Text wrapped in triple backticks (``` and ~~~) will not be translated, ensuring accurate representation of your code samples.

How to Download and Run Binaries

Follow these steps to download and run the deepl and deepldoc files:

1. Download

2. Make the Files Executable

  • Open a terminal and navigate to your downloads folder:
cd ~/Downloads
  • Make the files executable:
chmod +x deepl
chmod +x deepldoc

3. Run the files:

./deepl
./deepldoc

That's it!

About

A tool that automatically translates your project's documentation into another language.

Resources

License

Stars

Watchers

Forks

Packages

No packages published