/usr/share/konversation/scripts/tinyurl is in konversation-data 1.6-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #!/usr/bin/env bash
#
# Creates a TinyURL from a long URL
# Licensed under GPL v2 or later at your option
# Copyright 2007 Terence Simpson
SERVER=$1
TARGET=$2
export URL="$3"
NICK="$4"
if test ! -z $URL; then
if test $(which curl); then
TINYURL="$(curl -s -i http://tinyurl.com/api-create.php?url=$URL|tail -1)"
else
TINYURL="$(wget -T10 -t2 -qO- http://tinyurl.com/api-create.php?url=$URL|tail -1)"
fi
else qdbus org.kde.konversation /irc error "No url given: usage is \"/tinyurl URL [NickName]\""
exit 1
fi
if test -z $TINYURL; then
qdbus org.kde.konversation /irc error "Unable run tinyurl script, please make sure you have curl or wget installed"
else
if test ! -z $NICK; then
qdbus org.kde.konversation /irc say $SERVER "$TARGET" "${NICK}: $TINYURL"
else
qdbus org.kde.konversation /irc say $SERVER "$TARGET" "$TINYURL"
fi
fi
|