kanji() { grep $1 /usr/share/gjiten/dics/edict.utf8 | sed "s/\///" | sed "s/\//\; /g"| grep $1 } kanjip() { grep $1 /usr/share/gjiten/dics/edict.utf8 | grep "(P)" | sed "s/\///" | sed "s/\//\; /g"| grep $1 } edict() { export GREP_COLOR='1;36' while true; do echo -n "edict > " read -e QUERY history -s "$QUERY" clear grep --color=always "$QUERY" /usr/share/gjiten/dics/edict.utf8 | \ sed "s/\///" | sed "s/\//\; /g" | head -200 | \ ~/Japanese/scripts/highlight | grep "$QUERY" done } kenkyusha() { if [ ! -e /storage/CDs/kenkyusha/CATALOGS ]; then mount /storage/CDs/kenkyusha.iso fi while true; do echo -n "kenkyusha > " read -e QUERY history -s "$QUERY" term=${QUERY/ */} content=${QUERY/* } if [ $term = $content ]; then content="1"; fi clear echo -e "select 1\nsearch $term\ncontent $content" | \ eblook /storage/CDs/kenkyusha | \ sed "s/<[^<]*>//g" | \ sed "s/eblook>//g" | \ tail -n +2 | ~/Japanese/scripts/highlight done } heisig() { cp ~/Japanese/heisig_keywords /tmp/heisig_tmp1 for i in $*; do grep -i --color=always "$i" /tmp/heisig_tmp1 > /tmp/heisig_tmp2 mv /tmp/heisig_tmp2 /tmp/heisig_tmp1 done cat /tmp/heisig_tmp1 rm /tmp/heisig_tmp1 }