Skip to main content

CLI tool to translate markdown files

Project description

codecov

MD Translate

CLI tool to translate .md files from English to Russian and back.

Can use Yandex Translation API and Google Cloud translation.

Installation

Install project:

$ pip install md-translate

Settings file

You can store your default settings in .json file.

Settings file content example:

{
  "source_lang": "ru",
  "target_lang": "en",
  "service_name": "Google",
  "api_key": "API_KEY_IN_FILE"
}

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

Usage

$ md-translate [-h] [-c CONFIG_PATH] [-K API_KEY]
               [-s {Yandex,Google}] [-S {ru, en}] [-T {ru, en}]
               [path]

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

Optional arguments:

  • -h, --help, show this help message and exit
  • -c CONFIG_PATH, --config_path CONFIG_PATH, Path to config_file
  • -K API_KEY, --api_key API_KEY, API key to use Translation API
  • -s {Yandex,Google}, --service_name {Yandex,Google}, Translating service
  • -S SOURCE_LANG, --source_lang SOURCE_LANG, Source language
  • -T TARGET_LANG, --target_lang TARGET_LANG, Target language

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

md_translate-1.0.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

md_translate-1.0.0-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

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