Skip to main content

CLI tool to translate markdown files

Project description

MD Translate

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

Can use Yandex Translation API and Google Cloud translation.

Installation

Install project:

$ pip install md-translate

Create a file, named .md_translate_api_key in your home folder or wherever you want put your API key into it.

Settings file

You can store your default settings in .ini file.

By default, place for settings file is ~/.md_translate_config.ini, but you can place it wherever you want.

Settings file content example:

[Settings]
# (would be changed to store exactly API KEY)
api_key = <path to api_key file> 
service = Yandex
source_lang = en
target_lang = ru

Usage

$ app.py [-h] [-c CONFIG_PATH] [-k API_KEY_FILE | -K API_KEY]
              [-s {Yandex,Google}] [-S SOURCE_LANG] [-T TARGET_LANG]
              [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_FILE, --api_key_file API_KEY_FILE, Path to Translation Service API key file
  • -K API_KEY, --api_key API_KEY, API key to use Translation API
  • -s {Yandex,Google}, --service {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-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distributions

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

md_translate-0.1.1-py3.6.egg (15.8 kB view details)

Uploaded Egg

md_translate-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: md_translate-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for md_translate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5dd8b9dbbd0b149849d04d2c1a84385685fd2b9fd4da05f742b4704a7e86a1a8
MD5 918c0de6f7fe0312a9fc9ac39a0787da
BLAKE2b-256 dd0957cd1f313d1ea8aa25e83cfcb50f5bc06dd7cc5f1eed183fd59546b4847a

See more details on using hashes here.

File details

Details for the file md_translate-0.1.1-py3.6.egg.

File metadata

  • Download URL: md_translate-0.1.1-py3.6.egg
  • Upload date:
  • Size: 15.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for md_translate-0.1.1-py3.6.egg
Algorithm Hash digest
SHA256 a0dcb3da059841e48e0c8467c06a42dc718bc2d23cd71a09cb92719ea6c0c42e
MD5 3a405a0c6ef1f81623253e2781bf4877
BLAKE2b-256 57938bbbba065616cdc920f8d6a804b668810d5f9fcf2821113aa73c9c92a46e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: md_translate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for md_translate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ffe1c3b9a4a00e635c147b4eb041ff421ff52fa02254157be352b3a3519a021
MD5 cf5ee0f25500902392e9f233dd47b788
BLAKE2b-256 d28431d099b2fd6d132333a4437fcdc613753c44148087f215b0b61dedc25ac1

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