- ;Dictionaire Bilingue Anglais/Francais
- ;Utilisation: /Dico <mot>
- ;par arround - arround@eXagon.org - le 20/05/2003
-
- alias dico { sockclose dico | sockopen dico www.french-linguistics.co.uk 80 | set %dico.mot $1 }
- on *:sockopen:dico:{
- sockwrite -nt $sockname GET /cgi-bin/frdict.pl?entry= $+ %dico.mot HTTP/1.1
- sockwrite -nt $sockname Host: french-linguistics.co.uk $+ $str($crlf,2)
- sockwrite -nt $sockname
- }
- on *:sockread:dico:{
- sockread %dico
- if ($len(%dico) < 850) {
- tokenize 32 $regstrip(%dico)
- if ($chr(40) isin $1) {
- write dico.txt $1-
- }
- }
- }
- on *:sockclose:dico:{ check.dico }
- alias check.dico {
- var %a 1
- while %a <= $lines(dico.txt) {
- echo -a $+($+($chr(35),%a),$chr(58)) $remove($read(dico.txt,%a),$left($read(dico.txt,%a),3),$chr(126))
- inc %a
- }
- $iif($lines(dico.txt) > 1,write -c dico.txt)
- }
- alias regstrip { var %i,%a = $1-,%b = $regsub(%a,/<[^>]+>/g,,%i) | return $remove(%i,$chr(59),$chr(38)) }
;Dictionaire Bilingue Anglais/Francais
;Utilisation: /Dico <mot>
;par arround - arround@eXagon.org - le 20/05/2003
alias dico { sockclose dico | sockopen dico www.french-linguistics.co.uk 80 | set %dico.mot $1 }
on *:sockopen:dico:{
sockwrite -nt $sockname GET /cgi-bin/frdict.pl?entry= $+ %dico.mot HTTP/1.1
sockwrite -nt $sockname Host: french-linguistics.co.uk $+ $str($crlf,2)
sockwrite -nt $sockname
}
on *:sockread:dico:{
sockread %dico
if ($len(%dico) < 850) {
tokenize 32 $regstrip(%dico)
if ($chr(40) isin $1) {
write dico.txt $1-
}
}
}
on *:sockclose:dico:{ check.dico }
alias check.dico {
var %a 1
while %a <= $lines(dico.txt) {
echo -a $+($+($chr(35),%a),$chr(58)) $remove($read(dico.txt,%a),$left($read(dico.txt,%a),3),$chr(126))
inc %a
}
$iif($lines(dico.txt) > 1,write -c dico.txt)
}
alias regstrip { var %i,%a = $1-,%b = $regsub(%a,/<[^>]+>/g,,%i) | return $remove(%i,$chr(59),$chr(38)) }