scripts

random scripts
git clone git://parazyd.org/scripts.git
Log | Files | Refs

commit 1df7990d32656860dd6d464a9b3d6bed8e29861b
parent 985c888a2e93fc4efcfd825869b3f669071b563d
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 11 Apr 2018 11:12:40 +0200

Use our own dict:// interface to urbandictionary. Improve autoup.

Diffstat:
Mautoup | 4++--
Mdict | 8+++++++-
Rurban -> notinpath/obsolete/urban | 0
Aurban | 2++
4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/autoup b/autoup @@ -22,7 +22,7 @@ esac test -z "$1" && exit 1 || filename=$(basename $1) case "$filename" in - *_scrot.png|*_scrot.jpg) + *_scrot.*|mpv-shot*.*) webdir=tmp/screenshots num=$(echo $(lynx -dump https://$server/pub/tmp/screenshots \ | tail -n1 | tr -d '[a-z]./:' | awk '{print $2}') + 1 | bc) @@ -31,7 +31,7 @@ case "$filename" in elif [ "$num" -lt 1000 ]; then num="0$num" fi - filename="screenshot${num}.png" + filename="screenshot${num}.${filename##*.}" goph=I ;; *.png|*.jpg|*.jpeg|.JPG|.JPEG) diff --git a/dict b/dict @@ -7,7 +7,13 @@ case "$(basename $0)" in ;; dict) - curl -s dict://dict.org/d:$1 + term="$*" + curl -s dict://dict.org/d:"'$term'" + ;; + + urban) + term="$*" + curl -s dict://parazyd.org/d:"'$term'" ;; wttr) diff --git a/urban b/notinpath/obsolete/urban diff --git a/urban b/urban @@ -0,0 +1 @@ +dict+ \ No newline at end of file