Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axetroy/translate-cli
A cli tool for translate text in terminal.
https://github.com/axetroy/translate-cli
cli cli-app nodejs translate
Last synced: about 1 month ago
JSON representation
A cli tool for translate text in terminal.
- Host: GitHub
- URL: https://github.com/axetroy/translate-cli
- Owner: axetroy
- License: mit
- Created: 2017-03-10T17:05:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T12:56:19.000Z (almost 6 years ago)
- Last Synced: 2024-12-13T11:53:00.670Z (about 2 months ago)
- Topics: cli, cli-app, nodejs, translate
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@axetroy/translate-cli
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
## translate-cli
[![Greenkeeper badge](https://badges.greenkeeper.io/axetroy/translate-cli.svg)](https://greenkeeper.io/)
A cli tool for translate text in terminal.
Use Baidu Translate API.
### Installation
```bash
npm install @axetroy/translate-cli -g
```### Usage
```
$ translate -hUsage: translate [content] [options]
Options:
-h, --help output usage information
-V, --version output the version number
-f, --from From Language, short locale name, like: en,zh,jp
-t, --to To Language, short locale name, like: en,zh,jp
``````bash
$ 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
```bash
$ git clone https://github.com/axetroy/translate-cli.git
$ cd ./translate-cli
$ yarn
$ ./bin/translate-cli hello world
```You can flow [Contribute Guide](https://github.com/axetroy/translate-cli/blob/master/contributing.md)
## License
The [MIT License](https://github.com/axetroy/translate-cli/blob/master/LICENSE)