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.

Using

To run translation:

$ md-translate path_to_folder_with_md_files

Arguments:

  • -k (--api_key) path_to_api_key_file (if you put api key file not to home folder)
  • -s (--service) [Yandex, Google] service to be used for translation
  • -S (--source_lang) land_code language code of source document (default: 'en')
  • -T (--target_lang) lang_code language code to translate in (default: 'ru')

It will find all .md files in folder you set and line by line, will translate. It will translate only paragraphs, not lists or any other markdown constructions.

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.0.5.tar.gz (4.5 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-0.0.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for md_translate-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b9848059e5fcdb7db8ee007631e62ad023c23267df536aac80a277bd6f4224ce
MD5 65160c9ca36d1ccf9ea1d8fd76d29dd0
BLAKE2b-256 46d05348f7e687b0c1750f52e98b5f2f99288fe5f3e0247a42032393b36a96e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: md_translate-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for md_translate-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e65f52118b562d1c781dd3763801b442e1f64f86b3f45eefe5f1de2a4606445
MD5 e04524e9ff79203d8bcd7e27917093ab
BLAKE2b-256 7320be2471829dbe74eee96189143eb748f4931172696ee71de9d3e722cf2936

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