rTorrent notifications on your iPhone

As mentioned in my previous post I promised to explain how you can create Prowl push notifications using rTorrent and Prowl 4 Linux. It’s actually a variation of the rTorrent download log script that I talked about on in a earlier post. Instead of logging to a file, we are sending a prowl notification using the $d.get_name variable.

I recommend you first read about Logging downloads with rTorrent and get Prowl 4 Linux working before continuing.

For logging downloads with rTorrent we used the following script:

#!/bin/bash
dldate=`date '+%A %d %B %H:%M%P'`
echo -ne "$2 completed on $dldate\r\n" >> /home/flx/downloaded.txt
exit 0

The line that did all the work was:

echo -ne "$2 completed on $dldate\r\n" >> /home/flx/downloaded.txt

As mentioned in the earlier post it takes the second argument (the name of the torrent) and writes that to a file. Instead of writing it to a file, we are going to execute prowl.sh and use the torrent name as the argument for the description:

/home/flx/prowl.sh -1 rTorrent “$2 completed on $dldate”

The command creates a low priority notification called “rTorrent” and sends the torrentname and date of completion as description. It should look like this:

Ubuntu_9.10RC.iso completed on Monday 26 October 12:53pm

That’s all! Here is how it looks on Prowl:

prowl