# HG changeset patch # User Igor Chubin # Date 1332942870 -7200 # Node ID 87bb1c5e66161db3ce9904cdd6ee85bf164f02dd # Parent 53ba2847501ff99f31f92194dbb14a8a8799f4c4 added de script to misc/ diff -r 53ba2847501f -r 87bb1c5e6616 misc/de --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/de Wed Mar 28 15:54:30 2012 +0200 @@ -0,0 +1,45 @@ +#!/bin/sh + +MY_NAME=$(echo $0 | sed s@.*/@@) +case "$MY_NAME" in +ru-de) + DICTNAME="Universal (Ru-Ge)" + ;; +en) + DICTNAME="LingvoUniversal (En-Ru)" + ;; +fr) + DICTNAME="Universal (Fr-Ru)" + ;; +*) + DICTNAME='Universal (Ge-Ru)' + ;; +esac + +_dict() +{ + if [ "$FULL" = YES ] + then + sdcv -n -u "$DICTNAME" "$1" | fgrep -v .wav + else + sdcv -n -u "$DICTNAME" "$1" | grep -v — | fgrep -v .wav + fi +} + +( + myname="`echo $0 | sed s@.*/@@`" + _dict "$@" + if [ -e "$ORIGINAL_TEXT" ] + then + echo . . . . . . . . . . . . . . . . . . . . . . . . . ; echo + if [ -z "$GREP_SENTENCES" ] + then + grep-sentences "$*" "$ORIGINAL_TEXT" + else + $GREP_SENTENCES "$@" | head -15 + fi + else + echo `date +%s` "$@" >> ~/Langs/Deutsch/${MY_NAME}.log + fi +) +