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

Uploaded Source

Built Distribution

md_translate-0.0.5-py3-none-any.whl (7.5 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