The program works as expected. Some improvements possible:
* Use w3m also for calling (limit complexity)
* Consider make a short version for std out
* Force w3m quit without confirmation (that is how mutt is using w3m)
json2yaml \
yaml2json \
ip-check \
+folkets \
bash-completion = \
--- /dev/null
+#!/bin/bash
+
+# provides translatsions with Folkets lexicon
+
+set -e
+
+BASE="https://folkets-lexikon.csc.kth.se"
+LOC="folkets/service"
+LANG="both"
+INTERFACE="sv"
+LOG="/tmp/folkets/error.out"
+HTML="/tmp/folkets/out.html"
+
+word="$1"
+
+url="$BASE/$LOC"
+
+form="
+ --data-urlencode word=$word
+ --data-urlencode lang=$LANG
+ --data-urlencode interface=$INTERFACE
+"
+
+mkdir -p $(dirname $LOG $HTML)
+
+curl -v -L --get ${form} ${url} 2> $LOG | w3m -T text/html
+
+# Consider make also the call with w3m
+# Consider put on stdout