ding-trans
Advanced tools
Comparing version 1.0.3 to 1.0.31
@@ -10,3 +10,5 @@ #! /usr/bin/env node | ||
let colors = require("colors"); | ||
require("colors"); | ||
// let colors = require("colors"); | ||
// console.log("测试文本".bold.red); | ||
let argv = require("yargs").argv, | ||
@@ -36,2 +38,3 @@ queryStr = encodeURI(argv._.join(" ")), | ||
webTitle = "网络释义:", | ||
machineTrans = "", | ||
webTrans = "", | ||
@@ -41,3 +44,4 @@ template = ""; | ||
let basic = data.basic, | ||
web = data.web; | ||
web = data.web, | ||
translation = data.translation; | ||
@@ -62,2 +66,3 @@ if (basic ? basic : "") { | ||
translation ? (machineTrans = translation) : false; | ||
template = | ||
@@ -71,3 +76,6 @@ pronTitle.red.bold + | ||
webTitle.blue.bold + | ||
webTrans; | ||
webTrans + | ||
"\n" + | ||
"机器翻译:".green.bold + | ||
machineTrans; | ||
@@ -89,2 +97,3 @@ console.log(template); | ||
}; | ||
// let options = ` http://aidemo.youdao.com/trans?q=${query}&&from=Auto&&to=Auto`; | ||
@@ -100,3 +109,3 @@ // 处理响应的回调函数 | ||
// 数据接收完成 | ||
console.log("\n"); | ||
// console.log("\n"); | ||
console.log("---------------"); | ||
@@ -103,0 +112,0 @@ }); |
{ | ||
"name": "ding-trans", | ||
"version": "1.0.3", | ||
"version": "1.0.31", | ||
"description": "a translation cli", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,10 +11,14 @@ # ding-trans (ding 翻译) | ||
``` | ||
```shell | ||
ding hello | ||
#或者 | ||
ding better late than never. | ||
``` | ||
![1621489715(1).jpg](http://ww1.sinaimg.cn/large/75314ac9ly1gqouh4l13sj20g6073749.jpg) | ||
![汪荣顶.jpg](http://ww1.sinaimg.cn/large/75314ac9ly1gqouh4l13sj20g6073749.jpg) | ||
### 支持我 | ||
![汪荣顶.jpg](http://ww1.sinaimg.cn/large/75314ac9ly1gqqfqpfhnjj20ej05fmx4.jpg) | ||
See [荣顶](https://www.fedtop.com). | ||
### 想看更多好玩的东西? | ||
我的官方网站->See [荣顶:https://www.fedtop.com](https://www.fedtop.com). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3811
95
24