Skip to main content

CLI tool to translate markdown and reStructuredText files

Project description

Docs Translate

CLI tool to translate .md and .rst files from English to Korea and back.

Can use Yandex Translation API and Google Cloud translation.

Installation

Install project:

$ pip install docs-translate

Settings file

You can store your default settings in .json file.

Settings file content example:

{
  "target_dir":"{D:\\language_convert_folder}",
  "reserved_words":"{D:\\reserved_words_json_file}",
  "source_lang": "ko",
  "target_lang": "en",
  "service_name": "Google_v2",
}

If you set config file, you should specify it with -c CONFIG_PATH argument!

Usage

$ docs-translate [-h] [-c CONFIG_PATH]
               [-s {Google,Google_v2}] [-S] [-T]
               [-path {source_path}] [-d {target_dir}]

If you set config file, you can override any of settings by arguments

Positional arguments:

  • path Path to folder to process. If not set, uses current folder
  • -d TARGET_DIR, --target_dir TARGET_DIR, If not set, the target_dir in config.json is set

Optional arguments:

  • -h, --help, show this help message and exit
  • -c CONFIG_PATH, --config_path CONFIG_PATH, Path to config_file
  • -s {Yandex,Google,Bing,Deepl}, --service_name {Yandex,Google,Bing,Deepl}, Translating service
  • -S SOURCE_LANG, --source_lang SOURCE_LANG, Source language code
  • -T TARGET_LANG, --target_lang TARGET_LANG, Target language code

Translation services:

Now used Yandex, Google, Bing, Deepl, Google_v2

Some of them can be not working, try it and find the most suitable for you

Google --> It's free, but the translation isn't good.
Google_v2 --> need to google Cloud Translation API key.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docs_translate-0.1.6.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

docs_translate-0.1.6-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file docs_translate-0.1.6.tar.gz.

File metadata

  • Download URL: docs_translate-0.1.6.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.3

File hashes

Hashes for docs_translate-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8284f81c1b9ba1766296a57f58c93162a1b08e59091d9fa3748a16f2aac17dbb
MD5 6093f33fa81bd950c1f1cc093ac9011d
BLAKE2b-256 b4584b1b61f5c8899813e86f94e0634aa90bd817ec1c190f958601edee469b03

See more details on using hashes here.

File details

Details for the file docs_translate-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: docs_translate-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.3

File hashes

Hashes for docs_translate-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 11b432ddd38d0851426dd7814efc509c439d29b93c1a44b378d38056e627ecaa
MD5 7cc6e4d863be85f4683291b513f4c15c
BLAKE2b-256 a8e218b15de0af67fd35ef7c0ad50cead3df8da066e717451387f99614027af0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page