From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 20 Mar 2007 14:57:32 +0100 From: Tomasz Sobieszek To: 9fans@cse.psu.edu Message-ID: <20070320135732.GA20958@quasi2.quasi.domain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Subject: [9fans] An interface to a www russian-english dictionary Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 29eb808a-ead2-11e9-9d60-3106f5b1d025 I needed a russian-english dictionary. Having found one at www.rambler.ru= , here's what I did to make using it bearable. A /bin/rudict script: #!/bin/rc query=3D`{ascii -8 `{echo $1 | tcs -t cp1251} | sed 's/^/%/g' | tr -d \x0= a | sed 's/.$//'} hget 'http://www.rambler.ru/dict/scripts/go.cgi?query=3D' ^ $query = ^ '&where=3Druen' \ | tcs -f cp1251 \ | htmlfmt -c utf8 \ | sed -n '/^1.*/,/=D0=9E =D1=81=D0=BB=D0=BE=D0=B2=D0=B0=D1=80=D0=B5/p' \ | sed '/=D0=9F=D0=BE=D0=BB=D0=BD=D0=BE=D1=81=D1=82=D1=8C=D1=8E...|=D0=9E = =D1=81=D0=BB=D0=BE=D0=B2=D0=B0=D1=80=D0=B5/d' A plumbing rule: # Russian text type is text data matches '[a-zA-Z=C2=A1-=EF=BF=BF]+' data matches '[=D0=81-=D1=91]+' plumb start show rudict $0 Where /bin/show is: #!/bin/rc $1 $2 | plumb -i -d edit -a 'action=3Dshowdata filename=3D'/$1/$2 Tomek