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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file md_translate-1.0.0.tar.gz.

File metadata

  • Download URL: md_translate-1.0.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.3.0-1031-azure

File hashes

Hashes for md_translate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f425bd20f62a782b5de3d57208137609d1f6dd3aab8b0f7b4c13428fcaf396f9
MD5 4ec49794a6b1418186410fbe7afe4d1a
BLAKE2b-256 f098bd6eb11488a33108e2b6a58f17c63ac2932fcfdef9db7d8ba23e1cd8f685

See more details on using hashes here.

File details

Details for the file md_translate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: md_translate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.3.0-1031-azure

File hashes

Hashes for md_translate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9088d05178588d12cecc0b77200a36726a4a7ec6634652c16c4e543493b41ca6
MD5 9ce8c933d8416d92d62c040913689483
BLAKE2b-256 f4a67e99d77ef6961de2c62e36b3067b032df1b3aa8dc8cd9334b06aae11ac70

See more details on using hashes here.

Supported by

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