new-words

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/misc/de	Sun Sep 23 16:07:29 2012 +0300
     1.3 @@ -0,0 +1,45 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +MY_NAME=$(echo $0 | sed s@.*/@@)
     1.7 +case "$MY_NAME" in
     1.8 +ru-de)
     1.9 +    DICTNAME="Universal (Ru-Ge)"
    1.10 +    ;;
    1.11 +en)
    1.12 +    DICTNAME="LingvoUniversal (En-Ru)"
    1.13 +    ;;
    1.14 +fr)
    1.15 +    DICTNAME="Universal (Fr-Ru)"
    1.16 +    ;;
    1.17 +*)
    1.18 +    DICTNAME='Universal (Ge-Ru)'
    1.19 +    ;;
    1.20 +esac
    1.21 +
    1.22 +_dict()
    1.23 +{
    1.24 +  if [ "$FULL" = YES ]
    1.25 +  then
    1.26 +    sdcv -n -u "$DICTNAME" "$1" | fgrep -v .wav
    1.27 +  else
    1.28 +    sdcv -n -u "$DICTNAME" "$1" | grep -v — | fgrep -v .wav
    1.29 +  fi
    1.30 +}
    1.31 +
    1.32 +(
    1.33 +    myname="`echo $0 | sed s@.*/@@`"
    1.34 +    _dict "$@"
    1.35 +    if [ -e "$ORIGINAL_TEXT" ]
    1.36 +    then
    1.37 +        echo . . . . . . . . . . . . . . . . . . . . . . . . . ; echo
    1.38 +        if [ -z "$GREP_SENTENCES" ]
    1.39 +        then
    1.40 +            grep-sentences "$*" "$ORIGINAL_TEXT"
    1.41 +        else
    1.42 +            $GREP_SENTENCES "$@" | head -15
    1.43 +        fi
    1.44 +    else
    1.45 +        echo `date +%s` "$@" >> ~/Langs/Deutsch/${MY_NAME}.log
    1.46 +    fi
    1.47 +)
    1.48 +