Howdy all. I got my plug last week and in short order was torrenting
, serving media
and all that good stuff. One problem remained: making it easy for the wife to use.
To this end, I whipped up a simple bot that sits on Google talk and responds to commands
- where : reports local and global IPs - this one's more for my benefit
- ushare : refreshes uShare's media list
- ushare restart : the nuclear option - restarts ushare
- <url> : if there's a torrent at that url, add it to transmission via RPC
- iplayer <program> : Looks through the available list of the BBC iPlayer for the given program: if there's one match, a download is started; more than one match and it replies with the possibilities so you can narrow it down
- unrar : deals with torrents that have been split into multiple rar files, extracts and deletes the rars
- tell <who> <what> : relays a message to someone else, mainly used for passive-aggressive sniping so far
- status : Lists the progress of your iPlayer download and unrar processes, etc
If all else fails, it'll respond with a random nugget of (often scarily relevant) wisdom.
- I don't have to explain ssh to her indoors
- We've got a netbook that is slightly too slow to use the BBC's flash-based iPlayer application smoothly, even with the file pre-downloaded. This downloads and converts to a format that VLC handles with ease over samba
- We can start torrents/iPlayer downloads from anywhere (iPhone, etc) without having to mess about with opening ports on the firewall, worrying about dynamic IPs, etc
- It can hold a pretty good conversation, given that the responses are random
It's worked rather well so far, so I thought I'd share: All the code (plus a handy pre-built jar) can be found here
. It's written in java, so you'll need to "apt-get install openjdk-6-jre-headless" to get a JVM first. From there, it's just a case of running "java -jar SheevaSage.jar <config file>" in a screen session, where <config file> is a text file containing:
sheevasage.googleID = agoogleIDforyourbot@googlemail.com
sheevasage.googlePass = thepasswordforthatID
sheevasage.torrentdir = /the/path/to/your/torrent/dir
sheevasage.iplayerdir = /the/path/to/your/iplayer/dir
it uses transmission, ushare, unrar, killall and get_iplayer
to do the clever bits, so you'll have to have them installed.
Can anyone think of any other commands which would be useful?