t

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2017 License: MIT Imports: 16 Imported by: 0

README

t

Japanese <-> English translate in terminal

Require

Use Watson Language Translator
  • Service credentials
    • username (different from your Bluemix account)
      • export T_WATSON_LANGUAGE_TRANSLATOR_API_USERNAME=<Your Watson Language Translator API username>
    • password (different from your Bluemix account)
      • export T_WATSON_LANGUAGE_TRANSLATOR_API_PASSWORD=<Your Watson Language Translator API password>

Install

You can download binary from release page and place it in $PATH directory.

Usage

t [input text]

or

echo [input text] | t

  option:
    -v --version: show version

  t translates input text specified by argument or STDIN using Watson Language Translation API.
  Source language will be automatically detected.

  export T_WATSON_LANGUAGE_TRANSLATOR_API_USERNAME=<Your Watson Language Translator API username>
  export T_WATSON_LANGUAGE_TRANSLATOR_API_PASSWORD=<Your Watson Language Translator API password>

  Example:
    $ t Good morning!
    おはようございます!
    $ t おはようございます!
    Good morning!

Note

  • No available in mintty 😭 (isatty() not working)
  • The text must be the UTF-8 when using a pipe input
    • exec echo "UTF-8 text" | t

Supported

Todo

Development

Require
  • unix shell(e.g. bash, zsh)
    • msys2 on windows (or WSL)
  • golang >= 1.7
  • make
  • glide
  • docker
  • editor/IDE with editorconfig plugin
  • github token

Reference

Many thanks!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL