Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liuxing/translator-cli
The command line app for translate.
https://github.com/liuxing/translator-cli
cli fanyi translation
Last synced: about 2 months 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T02:18:13.000Z (over 6 years ago)
- Last Synced: 2024-04-14T06:18:50.785Z (9 months ago)
- Topics: cli, fanyi, translation
- Language: JavaScript
- Homepage:
- Size: 226 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# translator-cli
[![Travis](https://www.travis-ci.org/liuxing/translator-cli.svg?branch=master)](https://www.travis-ci.org/liuxing/translator-cli) [![npm version](https://img.shields.io/npm/v/translator-cli.svg)](https://www.npmjs.com/package/translator-cli) [![npm downloads](https://img.shields.io/npm/dm/translator-cli.svg)](https://www.npmjs.com/package/translator-cli) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](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
$ translatorUsage: translator [options] [command]
Options:
-V, --version output the version number
-h, --help output usage informationCommands:
* 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