Linux下安装有道词典

        安装环境:Ubuntu32位操作系统

        参考网址:http://www.bc-sj.com/html/linux/rumen/ruanjianshiyong/2011/0201/2222.html

        1,下载有道安装包pyton-dict.1.0.1.zip,网址:http://sourceforge.net/projects/yodao-free/files/python-dict/ ,下载后解压得到的文件夹中有一个dict.py的文件,将其复制到home文件夹下或者进入其所在文件夹下,然后在终端执行命令python dict.py + 你要搜索的词,就可以看到解释了,如下:

alice@alice-Aspire-4738G:~$ python dict.py chinese
chinese
Translations from 有道词典
n. 中文,汉语;中国人
adj. 中国的,中国人的;中国话的
Translations from WordNet
any of the Sino-Tibetan languages spoken in China; regarded as dialects of a single language (even though they are mutually unintelligible) because they share an ideographic writing system
a native or inhabitant of Communist China or of Nationalist China
of or pertaining to China or its peoples or cultures
of or relating to or characteristic of the island republic on Taiwan or its residents or their language
Translations from yodao:
Chinese:    汉语
Chinese Taipei:    中华台北

        2,自定义命令alias,如果你觉得麻烦,可以自定义命令,比如 ll 命令就是“ls -al”的缩写,它是通过alias ll = "ls -al"来实现的。这里如果想要在终端下输入 youdao + 单词 就能获得解释那么你可以在命令行下执行alias youdao="python dict.py" ,然后source .bashrc使其生效,接下来执行 youdao + 单词,你就能看到单词的释义啦!




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值