
what you get: pushes u iphone notifications when a new torrent is added (manual, rss .. whatever)
what you need: an iphone (surprise), a http://notifo.com/ account, you have to create a service there and subscribe yourself as a user to this service .. read the faq over there, linux, notifio on your iphone (free)
create a bash script (whatever.sh) and include this code, make it executable
Code: Select all
#this command gets a list (names only) of your current downloads
transmission-remote IP_OF_YOUR_TRANSMISSION_SERVER:PORT -n USERNAME:PASSWORD -l | sed 's/^[ \t]*//' | sed 's/ */\//g' | sed 's/^[ \t]*//;s/[ \t]*$//' | tr [:blank:] '.' | awk -F/ '{print }' | head -n -1 | tail -n +2 | cut -d'/' -f 9 > torrentlist_new.txt
#this command checks if there where changes
diff -i -b -B -q torrentlist_new.txt torrentlist_old.txt > /dev/null
#if there where changes
if [ ! $? -eq 0 ]; then
for i in $(diff -b -w torrentlist_new.txt torrentlist_old.txt | grep '<' | cut -d' ' -f 2); do
curl -k -u YOURNOTIFIOSERVICENAME:YOURNOTIFIOSERVICEAPIKEY -d "to=YOURNOTIFIOUSERNAME&msg=%22$i%22&title=new+torrent&uri=http%3A%2F%2FYOURTRANSMISSIONIP:PORT%2F" https://api.notifo.com/v1/send_notification;
mv torrentlist_new.txt torrentlist_old.txt
done
else
#if there where no changes
mv /torrentlist_new.txt torrentlist_old.txt
fi
Code: Select all
transmission-remote IP_OF_YOUR_TRANSMISSION_SERVER:PORT -n USERNAME:PASSWORD -l | sed 's/^[ \t]*//' | sed 's/ */\//g' | sed 's/^[ \t]*//;s/[ \t]*$//' | tr [:blank:] '.' | awk -F/ '{print }' | head -n -1 | tail -n +2 | cut -d'/' -f 9 > torrentlist_old.txt
Code: Select all
* * * * * sh /where/ever/your/put/it/script.sh #torrents