From: Tomasz Sobieszek <sobieszek@math.uni.lodz.pl>
To: 9fans@cse.psu.edu
Subject: [9fans] An interface to a www russian-english dictionary
Date: Tue, 20 Mar 2007 14:57:32 +0100 [thread overview]
Message-ID: <20070320135732.GA20958@quasi2.quasi.domain> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 725 bytes --]
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=`{ascii -8 `{echo $1 | tcs -t cp1251} | sed 's/^/%/g' | tr -d \x0a | sed 's/.$//'}
hget 'http://www.rambler.ru/dict/scripts/go.cgi?query=' ^ $query ^ '&where=ruen' \
| tcs -f cp1251 \
| htmlfmt -c utf8 \
| sed -n '/^1.*/,/Ð ÑловаÑе/p' \
| sed '/ÐолноÑÑÑÑ...|Ð ÑловаÑе/d'
A plumbing rule:
# Russian text
type is text
data matches '[a-zA-Z¡-￿]+'
data matches '[Ð-Ñ]+'
plumb start show rudict $0
Where /bin/show is:
#!/bin/rc
$1 $2 | plumb -i -d edit -a 'action=showdata filename='/$1/$2
Tomek
reply other threads:[~2007-03-20 13:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070320135732.GA20958@quasi2.quasi.domain \
--to=sobieszek@math.uni.lodz.pl \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).