YeXiaoRain / DICT

youdao python dictionary-cli and three nodejs dictionary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DICT

怎么安装

  • 下载 dict.py 到电脑里
curl -o dict.py https://raw.githubusercontent.com/YeXiaoRain/DICT/python3/DICT.py 
  • 编辑 ~/.bashrc
vim ~/.bashrc
  • 在末尾加上
alias y='python3 <yourpath>/DICT.py'

保存后执行source ~/.bashrc或重新开启终端可用

  • 使用:
y word or sentence
  • 也可以直接执行脚本进行交互式翻译(解决 要翻译的内容带有引号或命令行特殊符号的问题):

y

  • 也可以直接使用:
curl -s https://raw.githubusercontent.com/YeXiaoRain/DICT/python3/DICT.py | python3 - word or sentence

启用OpenapiYoudao

https://ai.youdao.com/创建应用

复制_config.iniconfig.ini并配置你的APP_IDAPP_SECRET

如果没有配置则不会调用OpenapiYoudao

其它翻译项目(如nodejs分支)

repo source comment modified
command-line-tool/dictionary youdaoapi 不支持句子 youdaodict
syaning/dict-en-zh youdao网页/shanbayapi shanbay源比较垃圾 -
Toybreak/cliDict bing 没有中->英 不支持句子 bingdict
justinleoye/tuzki-dict chrome插件 -

About

youdao python dictionary-cli and three nodejs dictionary


Languages

Language:Python 100.0%