@axetroy/translate-cli
A cli tool for translate text in terminal.
Last updated 3 years ago by axetroy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @axetroy/translate-cli -g
SYNC missed versions from official npm registry.

translate-cli

A cli tool for translate text in terminal.

Use Baidu Translate API.

Installation

npm install @axetroy/translate-cli -g

Usage

$ translate -h

  Usage: translate [content] [options]

  Options:

    -h, --help         output usage information
    -V, --version      output the version number
    -f, --from <lang>  From Language, short locale name, like: en,zh,jp
    -t, --to <lang>    To Language, short locale name, like: en,zh,jp
$ translate
# translate REPL, will translate automatically, just need you type word then [Enter]

$ translate 你好世界
# output >>> Hello world

# or you can reverse it

$ translate Hello world
# output >>> 你好世界

# or you can use stream pipe

$ cat ./test
# output >>> Hello world
$ cat ./test | translate
# output >>> 你好世界

Contribute

$ git clone https://github.com/axetroy/translate-cli.git
$ cd ./translate-cli
$ yarn
$ ./bin/translate-cli hello world

You can flow Contribute Guide

License

The MIT License

Current Tags

  • 0.1.2                                ...           latest (3 years ago)

2 Versions

  • 0.1.2                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |