Skip to main content

Simple command-line tool for translating

Project description

pytra

Preface

pytra is a simple command-line tool that translates stuff. It uses googletrans library for this purposes. pytra is capable of translating (and detecting the source language) words, sentences and even files.

Installation

Using pip

python>3.7 required:

 $ pip install pytra

Usage

pytra is very easy to use. It has several subcommands:

  • detect -- detect languages
  • detect-file -- detect file's language.
  • show-language-code -- show language codes.
  • translate -- translate stuff
  • translate-file -- text file to translate

Also soon pytra will be capable of pipelining

You can use -h or --help option with each subcommand for more details as follows:

 $ pytra <subcommand> [-h|--help]

Examples

Translate a sentence to French:

$ pytra translate "hello, world" -t fr
Bonjour le monde

Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytra-0.3.tar.gz (3.5 kB view hashes)

Uploaded source

Built Distribution

pytra-0.3-py3-none-any.whl (5.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page