- 论坛徽章:
- 0
|
恩,是看单词,在console 下 遇到不认识的英文单词就 dict 一下,然后用 sed 把要记录的内容过滤再重定位到一个txt文件里,同时用aplay 放一下这个单词的读音。因为在emacs 里面,我 也是用 dictionary.el 来驱动dict 查不认识的单词的,准备把emacs 里查的单词也可以重定位到一个文件里,这样就等于有了单词本了。
在x 界面也不太愿意用stardict ..感觉鼠标点来点去的 ,太慢。
呵呵,刚才看了下目录,其实不用把大写改小写的。 谢谢楼上几位的
--------------------------------------------------------------------
#! /bin/sh
dir_wav=/usr/share/WyabdcRealPeopleTTS
tempfile=/tmp/ale.dict.temp
if dict $1 > $tempfile
then
#echo "Found the definition"
sed -e '/^From /d' -e '1,4d' -e '/^$/d' < $tempfile |tee -a $HOME/my_dict.txt >&2
test=`echo $1|cut -c1`
aplay $dir_wav/$test/$1.wav
else
echo "Fail"
fi
-------------------------------------------------------------------------
因该可以不用 临时文件的吧? 再请教一下...
[ 本帖最后由 pigjj 于 2009-4-17 20:09 编辑 ] |
|