tUse our own dict:// interface to urbandictionary. Improve autoup. - scripts - random scripts
 (HTM) git clone git://parazyd.org/scripts.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 1df7990d32656860dd6d464a9b3d6bed8e29861b
 (DIR) parent 985c888a2e93fc4efcfd825869b3f669071b563d
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Wed, 11 Apr 2018 11:12:40 +0200
       
       Use our own dict:// interface to urbandictionary. Improve autoup.
       
       Diffstat:
         M autoup                              |       4 ++--
         M dict                                |       8 +++++++-
         R urban -> notinpath/obsolete/urban   |       0 
         A urban                               |       2 ++
       
       4 files changed, 11 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/autoup b/autoup
       t@@ -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)
       t@@ -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)
 (DIR) diff --git a/dict b/dict
       t@@ -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)
 (DIR) diff --git a/urban b/notinpath/obsolete/urban
 (DIR) diff --git a/urban b/urban
       t@@ -0,0 +1 @@
       +dict
       +\ No newline at end of file