]> git.sven.stormbind.net Git - sven/scripts.git/commitdiff
Remove nd.gd service - dead
authorSven Hoexter <sven@timegate.de>
Sun, 22 Jun 2014 15:30:37 +0000 (17:30 +0200)
committerSven Hoexter <sven@timegate.de>
Sun, 22 Jun 2014 15:30:37 +0000 (17:30 +0200)
home/mtinyurl.tcl

index 2618a311c80ea4fbf860f9ec1726ff617269d1a5..84f8f54f0d77fefed583c6eac53657e9fa8aab50 100755 (executable)
@@ -25,6 +25,9 @@ exec tclsh "$0" ${1+"$@"}
 # For updates see http://sven.stormbind.net/misc/
 
 ### Changelog
 # For updates see http://sven.stormbind.net/misc/
 
 ### Changelog
+# Version: 0.4 2014-06-22
+# Remove nd.gd support - dead
+#
 # Version: 0.3 2010-08-27
 # - Added http://nd.gd as the -n option, currently a pretty stupid
 #   service which just started linear counting at /01.
 # Version: 0.3 2010-08-27
 # - Added http://nd.gd as the -n option, currently a pretty stupid
 #   service which just started linear counting at /01.
@@ -47,7 +50,7 @@ package require struct
 package require cmdline
 
 #GLOBAL VALUES
 package require cmdline
 
 #GLOBAL VALUES
-set VERSION "0.2"
+set VERSION "0.4"
 set USERAGENT "mtinyurl.tcl version $VERSION by http://sven.stormbind.net/misc"
 
 
 set USERAGENT "mtinyurl.tcl version $VERSION by http://sven.stormbind.net/misc"
 
 
@@ -66,13 +69,6 @@ proc use_j {args_j} {
     maketiny $uri $curlopts $shortname
 }
 
     maketiny $uri $curlopts $shortname
 }
 
-proc use_n {args_n} {
-    set uri http://nd.gd
-    set curlopts "[http::formatQuery longurl http://$args_n]&OMG%21+SHORT_ME%21"
-    set shortname "http://nd.gd/"
-    maketiny $uri $curlopts $shortname
-}
-
 proc maketiny {uri curlopts shortname} {
     global USERAGENT
     set chandle [curl::init]
 proc maketiny {uri curlopts shortname} {
     global USERAGENT
     set chandle [curl::init]
@@ -107,7 +103,6 @@ proc main {argv0 argv} {
     set options {
        {t.arg -1 "Use http://tinyurl.com service to create a short URL"}
        {j.arg -1 "Use http://jbot.de service to create a short URL (default)"}
     set options {
        {t.arg -1 "Use http://tinyurl.com service to create a short URL"}
        {j.arg -1 "Use http://jbot.de service to create a short URL (default)"}
-       {n.arg -1 "Use http://nd.gd service to create a short URL"}
     }
     set saneargv0 [::cmdline::getArgv0]
     set usage "$saneargv0 \[options]  URL"
     }
     set saneargv0 [::cmdline::getArgv0]
     set usage "$saneargv0 \[options]  URL"
@@ -115,7 +110,6 @@ proc main {argv0 argv} {
        puts $usage
        puts "-t Use http://tinyurl.com service to create a short URL"
        puts "-j Use http://jbot.de service to create a short URL (default)"
        puts $usage
        puts "-t Use http://tinyurl.com service to create a short URL"
        puts "-j Use http://jbot.de service to create a short URL (default)"
-       puts "-n Use http://nd.gd service to create a short URL"
        exit 1
     }
 
        exit 1
     }
 
@@ -129,13 +123,8 @@ proc main {argv0 argv} {
        use_j $args(j)
     }
 
        use_j $args(j)
     }
 
-    # Handle -n for http://nd.gd
-    if {$args(n) != -1} {
-       use_n $args(n)
-    }
-
     # No option given? Fall back to a default service (jbot.de)
     # No option given? Fall back to a default service (jbot.de)
-    if {$args(j) == -1 && $args(t) == -1 && $args(n) == -1} {
+    if {$args(j) == -1 && $args(t) == -1 } {
        use_j $saneargv
     }
 
        use_j $saneargv
     }