linux下的简易有道字典
2013-11-18 16:02
316 查看
好东西, 自己也想实现,可惜水平。。。。。原文地址:linux下的简易有道字典作者:Ree影子说实话在win下有的有道字典的确很不错,特别是看一些英文资料的时候(咱英语不行),就特别有帮助。
不过现在在linux下,就在想有没有linux下的有道字典呢,在网上查了一下,失望而归。。。
但是找到了有人有python写的一个简易的linux版有道字典,还是不错了。
可以在http://sourceforge.net/projects/yodao-free/files/python-dict/下载。
下载后解压得到的是一个叫dict.py的脚本。
在命令行中输入 python dict.py
单词 就能查找单词了。
如 python dict.py English得到的结果就是:
Translations from Dict.cn
adj. 英国的,英国人的
n. 英语
Translations from WordNet
an Indo-European language belonging to the West Germanic branch;
the official language of Britain and the United States and most of
the commonwealth countries
the people of England
the discipline that studies the English language and
literature
(sports) the spin given to a ball by striking it on one side or
releasing it with a sharp twist
of or relating to or characteristic of England or its culture or
people
Translations from yodao:
English:
英语
College
English:
大学英语
接着,用shell打造一下。
sudo cp dict.py /usr/bin
sudo vim dict youdao
然后打入脚本程序:
#! /bin/bash
echo -n "input word>>"
while read -u0 in
do
python dict.py ${in}
echo -n "input word>>"
done
于是,你就是可以随时在命令行下使用这个有道字典了。
ree@ree-laptop:~/bin$ youdao
input:chinese
chinese
Translations from Dict.cn
adj. 中国的
n. 汉语,中国人
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
gooseberry:
猕猴桃
input:
完。。。
早上小记。。
不过现在在linux下,就在想有没有linux下的有道字典呢,在网上查了一下,失望而归。。。
但是找到了有人有python写的一个简易的linux版有道字典,还是不错了。
可以在http://sourceforge.net/projects/yodao-free/files/python-dict/下载。
下载后解压得到的是一个叫dict.py的脚本。
在命令行中输入 python dict.py
单词 就能查找单词了。
如 python dict.py English得到的结果就是:
Translations from Dict.cn
adj. 英国的,英国人的
n. 英语
Translations from WordNet
an Indo-European language belonging to the West Germanic branch;
the official language of Britain and the United States and most of
the commonwealth countries
the people of England
the discipline that studies the English language and
literature
(sports) the spin given to a ball by striking it on one side or
releasing it with a sharp twist
of or relating to or characteristic of England or its culture or
people
Translations from yodao:
English:
英语
College
English:
大学英语
接着,用shell打造一下。
sudo cp dict.py /usr/bin
sudo vim dict youdao
然后打入脚本程序:
#! /bin/bash
echo -n "input word>>"
while read -u0 in
do
python dict.py ${in}
echo -n "input word>>"
done
于是,你就是可以随时在命令行下使用这个有道字典了。
ree@ree-laptop:~/bin$ youdao
input:chinese
chinese
Translations from Dict.cn
adj. 中国的
n. 汉语,中国人
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
gooseberry:
猕猴桃
input:
完。。。
早上小记。。
相关文章推荐
- 在Linux(Luna)下向Launch启动器中添加图标
- php solr配置mmseg4j分词(widows和Linux都可以,注意地址的配置就好)
- linux C:将域名转化为IP地址
- Linux下查看版本号的命令
- linux环境下的python安装过程(含setuptools)
- Linux 用户组管理
- linux下文件合并、分割、去重
- CentOS安装KDE和Gnome
- 如何在linux上通过GRUB添加内核参数
- 让Linux更加可用(Accessibility)
- linux驱动学习2(kpd驱动初步分析)
- Linux yum 介绍
- Linux LVS安装和配置笔记
- linux下lamp 源码安装详解(次内容可以直接复制当作自动安装脚本)
- linux ubuntu 如何解决warning: no newline at end of file?
- windows和linux下如何远程获取操作系统版本和主机名
- 【linux学习笔记】 sort
- VirtualBox安装增强功能(CentOS6.3)
- linux实现抓包 (使用原始套接字数据连路层协议)
- Linux的route命令