
TinyURL
Source (link to git-repo or to original if based on someone elses unmodified work):
Note: No longer needs curl, works with Curl and wget
(Thanks Billy Oliva)
Just copy it to /usr/share/apps/konversation/scripts/ (system wide) or to ~/.kde/share/apps/konversation/scripts/ (for just your user)
v1.0
1st release
V1.1
Now uses env
Now checks for an argument (URL)
Now alerts user if it fails to get a URL
V1.1.1
(Minor update)
Added ability to use a NickName in the message.
V1.2
Doesn't depend on Curl any more, works with Curl or Wget
Displays and error and usage when no URL is given
Included README and INSTALL files
V1.3
Rewritten so that you can include a message/description with the link
Ratings & Comments
5 Comments
A few other places where I'd love to be able to use this: Kopete, Konqueror, probably KMail and maybe KNode (newsgroup users tend to be a little paranoic :D)
#!/bin/bash PORT=$1 SERVER=$2 TARGET=$3 NICK=$5 export URL="$4" TINYURL="$(curl -s -i http://tinyurl.com/create.php?url=$URL|grep "The following URL" -A3|tail -1|awk -F\> '{print $3}'|sed 's,</b,,')" echo $@ echo $TINYURL dcop $PORT default say $SERVER "$TARGET" "$5: $TINYURL"
Thanks for the idea, it's now been added to the script :)
Heh, nice. I don't have curl installed and I didn't feel like install it, so I changed the curl command for wget and it worked
The script now checks for curl and used wget if it's not found, thanks :)