new-words

changeset 67:87bb1c5e6616

added de script to misc/
author Igor Chubin <igor@chub.in>
date Wed Mar 28 15:54:30 2012 +0200 (2012-03-28)
parents 53ba2847501f
children 846240941452
files misc/de
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/misc/de	Wed Mar 28 15:54:30 2012 +0200
     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 +