diff options
-rwxr-xr-x | dic | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,7 +1,6 @@ #! /bin/sh # usage: dic [--lang=LANG] WORD... # where LANG may be one of en, fr, es, it, ch, ru, pt, pl -# multiple WORDs may be seperated by + like this: multiple+words set -euf main() { @@ -26,8 +25,18 @@ main() { } GET() { - curl -sS -b 'LEOABTEST=T; browser=webkit%3B5%3Bajax' \ - "https://dict.leo.org/dictQuery/m-vocab/$lp/query.xml?tolerMode=nof&lp=$lp&lang=$lang&rmWords=off&rmSearch=on&search=$search&searchLoc=0&resultOrder=basic&multiwordShowSingle=on" + curl -GsS \ + -b 'LEOABTEST=T; browser=webkit%3B5%3Bajax' \ + --data-urlencode lang="$lang" \ + --data-urlencode lp="$lp" \ + --data-urlencode multiwordShowSingle=on \ + --data-urlencode resultOrder=basic \ + --data-urlencode rmSearch=on \ + --data-urlencode rmWords=off \ + --data-urlencode searchLoc=0 \ + --data-urlencode search="$search" \ + --data-urlencode tolerMode=nof \ + "https://dict.leo.org/dictQuery/m-vocab/$lp/query.xml" } simplify() { |