summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdic9
1 files changed, 4 insertions, 5 deletions
diff --git a/dic b/dic
index 7635b9a..f2bd9a8 100755
--- a/dic
+++ b/dic
@@ -11,17 +11,16 @@ main() {
*) usage; exit 23;;
esac
- # all three are used by GET
- search="$1"
- langlang="${2-en}de"
- lang="de"
+ search=$1
+ lang=de
+ lp=${2-en}de
GET | simplify | tac
}
GET() {
curl -sS -b 'LEOABTEST=T; browser=webkit%3B5%3Bajax' \
- "https://dict.leo.org/dictQuery/m-vocab/$langlang/query.xml?tolerMode=nof&lp=$langlang&lang=$lang&rmWords=off&rmSearch=on&search=$search&searchLoc=0&resultOrder=basic&multiwordShowSingle=on"
+ "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"
}
simplify() {