https://github.com/liuxing/translator-cli
The command line app for translate.
https://github.com/liuxing/translator-cli
cli fanyi translation
Last synced: about 1 year ago
JSON representation
The command line app for translate.
- Host: GitHub
- URL: https://github.com/liuxing/translator-cli
- Owner: liuxing
- License: mit
- Created: 2018-05-14T08:17:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T02:18:13.000Z (about 8 years ago)
- Last Synced: 2025-04-23T23:07:18.021Z (about 1 year ago)
- Topics: cli, fanyi, translation
- Language: JavaScript
- Homepage:
- Size: 226 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# translator-cli
[](https://www.travis-ci.org/liuxing/translator-cli) [](https://www.npmjs.com/package/translator-cli) [](https://www.npmjs.com/package/translator-cli) [](https://standardjs.com)
> The command line app for translate
## Install
```bash
$ npm install -g translator-cli
```
## Features
- translates words, phrases between English and Chinese
- easy and fast switch between different API (e.g. youdao、iciba)
## Usage
```bash
$ translator
Usage: translator [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
* Query words
query|q Query words
ls List all the source
use Change source to source
```
Of course, you can also use `fanyi` or `fy ` like:
```bash
$ fanyi
# ···
# or
$ fy
# ...
```
### Query words
```bash
$ fy
# e.g.
$ fy test # or: fy query test、fy q test
test [ test ] ~ fanyi.youdao.com
- n. 试验;检验
- vt. 试验;测试
- vi. 试验;测试
- n. (Test)人名;(英)特斯特
1. Test
测试,测验,检验
2. Test Drive
Test Drive,Test Drive,无限狂飙
3. Test Engineer
测试员,测试工程师,软件测试工程师
```
### Change source
List all the source
```bash
$ fy ls
* youdao -> http://fanyi.youdao.com
iciba -> http://dict-co.iciba.com
```
Change source to source
```bash
$ fy use iciba
source has been set to: iciba
```
## LICENSE
[MIT](https://github.com/liuxing/translator-cli/blob/master/LICENSE) @ Liu Xing