Boxcar notifications for Vuze on Linux

If you’ve ever used Vuze on a Mac, you’ve been spoiled by the Growl integration.
Using it on something like Linux, however, and you don’t get those same nice notifications.
I’ve been experimenting with Boxcar for a while now because of its notification capability to iPhones.
I’ve also been Vuze on CentOS 5.6 and there is a real lack of notifications with the built-in app.
Vuze’s azexec “Command Runner” plugin gives you the flexibility of calling whatever commmand you want when a download has completed.
I’ve used the following script to push notifications from Vuze directly to my iPhone through Boxcar.
Marrying these two technologies together would make things a bit easier. Here’s how…

First, sign up for boxcar at http://www.boxcar.io to get a username and password to use below.
Next, save this script somewhere on your system. I’m using /usr/local/bin in this example.
Be sure to change the username and password to what you registerd with in the above step.

#!/bin/sh
HOSTNAME=`hostname`
APP=$1
shift
NOTICE=$*
USER=""
PASS=""
KEY=""
SECRET=""
/usr/bin/curl -d "notification[from_screen_name]=$HOSTNAME" -d "notification[message]=$APP Downloaded: $NOTICE" --user "$USER:$PASS" https://boxcar.io/notifications

  1. Get the contents of the azexec plugin installed into the ~/.azureus/azexec directory.
  2. Scan for new plugins.
  3. Load the azexec plugin
  4. In the plugin, I set the command to
    /usr/local/bin/boxcar.sh vuze "%N"
  5. save it all and start downloading!

If you’re particularly brave, get a custom provider account, fill in the KEY and SECRET fields according to your accoung, and add this to the shell script anywhere between the curl command and the URL


-d "secret=$SECRET"

and change the URL to

https://boxcar.io/devices/providers/$KEY/notifications/broadcast

which will let you set your own icons and sounds for the notifications.

Note that this setup uses curl, which can be downloaded and installed for Windows, and can be modified to use as a .bat file.

Advertisements