
开发并发布一个健壮的 npm 包:https://mp.weixin.qq.com/s/RE0EWyAHep5fKc_6XRJ7bw
Github: https://github.com/liuxing/translator-cli
Npm: https://www.npmjs.com/package/translator-cli
主要使用了 commande superagent xml2js chalk
主要功能:
使用方法
$ npm install -g translator-cli $ translator Usage: translator [options] [command] Options: -V, --version output the version number -h, --help output usage information Commands: query <words> Query words ls List all the source use Change source to source Examples
$ translator query test # fanyi query test test [ test ] ~ fanyi.youdao.com - n. 试验;检验 - vt. 试验;测试 - vi. 试验;测试 - n. (Test)人名;(英)特斯特 1. Test 测试,测验,检验 2. Test Drive Test Drive,Test Drive,无限狂飙 3. Test Engineer 测试员,测试工程师,软件测试工程师 1 hjdtl May 26, 2018 <a href="https://imgchr.com/i/Cfh4Q1"><img src="https://s1.ax1x.com/2018/05/26/Cfh4Q1.md.jpg" alt="Cfh4Q1.jpg" border="0" /></a> |
2 nine99 May 26, 2018 支持! |
3 jerrry May 26, 2018 via Android 有没有考虑过精简一下命令长度,目前用的直接 $ yd 词汇 |
4 guansixu May 26, 2018 对啊,命令有点长啊 |
5 iloahz May 26, 2018 楼上们可以试试用 alias 呀 |
8 Aug May 26, 2018 via Android 还行 |
11 sunjourney May 27, 2018 没看明白测试用例在测什么。。。 |
12 liuxing OP @sunjourney 为了测试而测试 哈哈哈 |
13 WendellSun Jun 1, 2018 via Android |