new-words

annotate misc/de @ 68:846240941452

added -C key: compress to lines; fixed bug with #90-line
author Igor Chubin <igor@chub.in>
date Sun Sep 23 16:07:29 2012 +0300 (2012-09-23)
parents
children
rev   line source
igor@67 1 #!/bin/sh
igor@67 2
igor@67 3 MY_NAME=$(echo $0 | sed s@.*/@@)
igor@67 4 case "$MY_NAME" in
igor@67 5 ru-de)
igor@67 6 DICTNAME="Universal (Ru-Ge)"
igor@67 7 ;;
igor@67 8 en)
igor@67 9 DICTNAME="LingvoUniversal (En-Ru)"
igor@67 10 ;;
igor@67 11 fr)
igor@67 12 DICTNAME="Universal (Fr-Ru)"
igor@67 13 ;;
igor@67 14 *)
igor@67 15 DICTNAME='Universal (Ge-Ru)'
igor@67 16 ;;
igor@67 17 esac
igor@67 18
igor@67 19 _dict()
igor@67 20 {
igor@67 21 if [ "$FULL" = YES ]
igor@67 22 then
igor@67 23 sdcv -n -u "$DICTNAME" "$1" | fgrep -v .wav
igor@67 24 else
igor@67 25 sdcv -n -u "$DICTNAME" "$1" | grep -v — | fgrep -v .wav
igor@67 26 fi
igor@67 27 }
igor@67 28
igor@67 29 (
igor@67 30 myname="`echo $0 | sed s@.*/@@`"
igor@67 31 _dict "$@"
igor@67 32 if [ -e "$ORIGINAL_TEXT" ]
igor@67 33 then
igor@67 34 echo . . . . . . . . . . . . . . . . . . . . . . . . . ; echo
igor@67 35 if [ -z "$GREP_SENTENCES" ]
igor@67 36 then
igor@67 37 grep-sentences "$*" "$ORIGINAL_TEXT"
igor@67 38 else
igor@67 39 $GREP_SENTENCES "$@" | head -15
igor@67 40 fi
igor@67 41 else
igor@67 42 echo `date +%s` "$@" >> ~/Langs/Deutsch/${MY_NAME}.log
igor@67 43 fi
igor@67 44 )
igor@67 45