diff options
author | tv <tv@krebsco.de> | 2017-08-30 17:50:42 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-08-30 17:50:42 +0200 |
commit | beeca40313f68874e05568f4041423c16202e9da (patch) | |
tree | dc68738158f508da65dff757b14a79622cdfe547 | |
parent | 607199cc67f143387d34e43851b9031082dfd29c (diff) |
-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() { |