• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  General Category / Success stories / Re: get_iplayer on: January 30, 2010, 08:37:28 AM
This is great stuff! I've now added iPlayer-downloading capability to my chatbot.

To save anyone else from fumbling around cack-handledly trying to get the thing working, here's what I learned today:

Download the get_iplayer deb file and attempt to install it
Code:
wget http://linuxcentre.net/get_iplayer/packages/get-iplayer-current.deb
dpkg -i get-iplayer-current.deb

It'll probably complain about missing dependencies, and advise you to run
Code:
apt-get -f install
Do so, and then do the dpkg command again. I hope that worked for you, because it did for me.

So that's get_iplayer installed, now onto flvstreamer: You have two options:
1) You trust me and stick the attached flvstreamer_arm into /usr/bin, or
2)
Code:
apt-get install build-essentials
wget http://mirrors.aixtools.net/sv/flvstreamer/source/flvstreamer-1.9.tar.gz
tar xf flvstream-1.9.tar.gz
cd flvstreamer1.9
<put the attached MakefileARM in this directory, obviously reading through to ensure I'm not up to anything naughty>
make -f MakefileARM flvstreamer
cp flvstreamer_arm /usr/bin

Now you need to configure get_iplayer:
Code:
get_iplayer --prefs-add --flvstreamer=/usr/bin/flvstreamer_arm
get_iplayer --prefs-add --mode=flashhigh

Hopefully that'll do it!

hmm, reading back over this, it should probably be in the wiki...
2  General Category / Success stories / Re: Google talk interface on: January 23, 2010, 02:57:50 AM
I have had an uncaught exception from one the smack threads, but it's only happened the once so I haven't investigated very far. I've added more error logging now, but assuming that fixing the exception is too much work, I'll probably just wrap the whole thing in a persistence layer, i.e.: Start the sage in it's own process and watch the err printstream for exceptions being printed, and then just restarting the whole thing. There's no important state being preserved in the sage, so it's no problem just to kill and restart the process.
3  General Category / Success stories / Google talk interface on: January 16, 2010, 06:41:12 AM
Howdy all. I got my plug last week and in short order was torrenting, sharing, 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.

Nice features:
  • 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:
Code:
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?
Pages: [1]