ding-trans
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -34,14 +34,17 @@ #! /usr/bin/env node | ||
//查词 | ||
sendInfo(queryStr); | ||
// console.log(queryStr); | ||
sendInfo(querystring.unescape(queryStr)); | ||
} | ||
//发送请求 | ||
function sendInfo(query) { | ||
function sendInfo(queryStr) { | ||
axios | ||
.post("http://47.95.239.198:9521/translate", { | ||
data: { text: query, source_lang: "auto", target_lang: "ZH" }, | ||
data: { text: queryStr, source_lang: "auto", target_lang: "ZH" }, | ||
}) | ||
.then((res) => { | ||
console.log(`${"翻译: ".green.bold}${res.data}`); | ||
console.log(`=============================================== \n`.rainbow); | ||
console.log( | ||
`${"🚀🚀🚀 翻译: ".green.bold}${querystring.unescape(res.data)}` | ||
); | ||
console.log(`\n===============================================`.rainbow); | ||
}); | ||
} |
{ | ||
"name": "ding-trans", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "a translation cli", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,14 @@ # ding-trans (ding 翻译) | ||
#### new! 新增 deepl 翻译(英译中,吊打其他翻译,基于深度学习) | ||
```sh | ||
dd <content> | ||
# eg. | ||
dd hello world | ||
``` | ||
![](https://assets.fedtop.com/picbed/20220706142743.png) | ||
![](https://assets.fedtop.com/picbed/20220706143047.png) | ||
##### 查单词: | ||
@@ -13,0 +25,0 @@ |
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
7111
176
64