Simple but feature-complete command-line dictionary
English | 简体中文
debain
sudo apt-get install golang-go
macos
brew update && brew upgrade && brew install go
Edit your ~/.bash_profile to add the following line:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Save and exit your editor. Then, source your ~/.bash_profile.
source ~/.bash_profile
Edit your ~/.zshrc file to add the following line:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Save and exit your editor. Then, source your ~/.zshrc.
source ~/.zshrc
go get -u github.com/woorui/dict
baidu
youdao
-
key: baidu
value: YOUR_BAIDU_APPID-YOUR_BAIDU_SECRET
-
key: youdao
value: YOUR_YOUDAO_APPKEY-YOUR_YOUDAO_ADDSECRET
note. key is api source, value is strings.Join([]string{APPID, SECRET}, "-"})
If you want both, add two key-value, If you want one of them, add key-value you want.
dict -file TYPING_YOUR_CONFIG_FILE_WHEN_FIRST_USING
> hello
来源 原文 译文 音标 详情
百度 hello 你好
有道 hello 你好 həˈləʊ int. 喂;哈罗,你好,您好, n. 表示问候,
惊奇或唤起注意时的用语, n. (Hello) 人名;(法)埃洛
> 你好
来源 原文 译文 音标 详情
百度 你好 Hello
有道 你好 hello hello, hi, how do you do