Skip to main content

A simple command line utility for translating text using Google Translate.

Project description

https://travis-ci.org/jjangsangy/py-translate.svg?branch=master

py-translate is a CLI Tool for Google Translate written in Python!

Author:Sang Han, 2014
License:Apache Software License v2
Version:0.1.2

The end goal is a simple application for translating text in the terminal. Text can be generated interactively or programmatically in the shell environment. Through command line arguments, file descriptors or pipes generating translated output that can be piped to a file or displayed on the terminal.

Features

  • Simple command line parsing!
  • Written in pure Python!
  • Backwards compatible with Python 2.7
  • Supports all language from Google Translate API
  • Speed: Unix Pipes
  • Native UTF-8 Support

Usage

translate [options] [source] dest

py-translate is a CLI Tool for Google Translate written in Python

optional arguments
-h, --help       show this help message and exit
-V, --version  show program's version number and exit

Filter through Unix Pipes

$ echo 'Hello World!' | translate zh-TW
你好世界!

$ echo 'Goodbye!' | translate ko
안녕히 가세요!

Redirect from File

$ translate zh-TW < "alice.txt"

阿麗思道:「你不是說你要告訴你的歷史嗎?告訴我你為甚麼恨—那個—那些—C和D,」
她末了兩個字母輕輕兒地說的,怕回來又得罪了牠。

那老鼠對著阿麗思嘆了一口氣道,「唉﹗我的身世說來可真是又長又苦又委屈呀—」

阿麗思聽了,瞧著那老鼠的尾巴說,「你這尾是曲啊﹗可是為甚麼又叫它苦呢﹗」
她就一頭聽著那老鼠說話,一頭在在心上納悶,所以她聽的那老鼠講的「尾曲」
的歷史是差不多像這個樣了的

Documentation

Documentation is available at https://py-translate.readthedocs.org/

Project details


Release history Release notifications

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
py_translate-0.1.2-py2.py3-none-any.whl (8.7 kB) Copy SHA256 hash SHA256 Wheel 3.4 Apr 4, 2014
py-translate-0.1.2.tar.gz (9.8 kB) Copy SHA256 hash SHA256 Source None Apr 4, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page