@ 260802.2

200921.2 · 310f6501d32544e94fbf8f2df5e1035c3b11d136

url: tweak url{decode,encode} scripts

This makes them a bit more generally useful.

reading declarations

bin/urldecode

new file mode 100755@@ -0,0 +1,9 @@+#!/bin/sh++exec python3 -c "+import sys+import urllib.parse++stdin = sys.stdin.read()+print(urllib.parse.unquote(stdin), end='')+"

bin/urldecode-copy

deleted file mode 100755@@ -1,5 +0,0 @@-#!/bin/sh--x=$(python2 -c "import urllib; print urllib.unquote('$1'),")-echo $x-printf "%s" $x | xcp

bin/urlencode

new file mode 100755@@ -0,0 +1,10 @@+#!/bin/sh++# RFC 3986, please.+exec python3 -c "+import sys+import urllib.parse++stdin = sys.stdin.read()+print(urllib.parse.quote(stdin, safe='~'), end='')+"

bin/urlencode-copy

deleted file mode 100755@@ -1,6 +0,0 @@-#!/bin/sh--# RFC 3986, please.-x=$(python2 -c "import urllib; print urllib.quote('$1', safe='~'),")-echo $x-printf "%s" $x | xcp