Jamie Bennett Speaks

Thoughts from Jamie Bennett

Archive for March, 2009

Start them young!

without comments

A 13 year old boy named Dmitri Gaskin has just given a short talk at DrupalCon DC. What makes this even more amazing is the fact that Dmitri has already been developing drupal software for 3 years (this site is based on drupal) and that last year he was a Google Summer of Code mentor and will be again this year!

When work is seemingly getting you down and you think you are struggling to get to the dizzy heights of open source stardom even though your trying hard, think again. At 13 years old I think I was still playing with action men!

Written by Jamie Bennett

March 27th, 2009 at 6:59 pm

Posted in Uncategorized

rsstorrent version 0.2

without comments

Some rss feeds contain url’s that use something called content-disposition. From the HTTP/1.1 spec:

"The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. This usage is derived from the definition of Content-Disposition in RFC 1806 [35].

content-disposition = "Content-Disposition" ":"
disposition-type *( ";" disposition-parm )
disposition-type = "attachment" | disp-extension-token
disposition-parm = filename-parm | disp-extension-parm
filename-parm = "filename" "=" quoted-string
disp-extension-token = token
disp-extension-parm = token "=" ( token | quoted-string )"

All this means is that when you request a file from a site that uses content-disposition, you probably won’t get the filename that you expected. This used to trip up rsstorrent, until now. As a quick fix, I have enabled wget support which is used when rsstorrent comes across content-disposition in the header field of any torrent address. This may not be the best solution but it does work. I’m looking for a better solution but wget is a pretty ubiquitous application and fits in with the lightweightness of rsstorrent. It does mean that rsstorrent now depends on wget and while I was at it, I upgraded pythons urllib module to urllib2 as urllib is being depreciated.

Go download the latest version from code.google.com or get the git repository from github.com.

Written by Jamie Bennett

March 24th, 2009 at 7:23 pm

Posted in Uncategorized

Ubuntu running on the Nokia N8x0 tablets

with one comment

Wow, just wow. The fruits of the arm port of Ubuntu are starting to flourish, behold, Ubuntu 9.04 on the Nokia N8x0 tablets.

Written by Jamie Bennett

March 15th, 2009 at 7:16 pm

Posted in Uncategorized

Automatically download torrents with rsstorrent and rtorrent

with 3 comments

Have you ever wanted to automatically download torrents when they become available, not just when you manage to remember them? Have you ever wanted to have your torrents sat waiting for you when you come home from work? Do you want someone to give you a step by step rundown on how to do this? If the answer is yes to these questions, this how-to is for you.

Prerequisites: or what you need first

For this how-to you need the following software.

See the individual packages web sites for instructions on how to install them.

Setting up rtorrent

rtorrent has an excellent feature that enables you to drop .torrent files into a specified directory and it will automatically start downloading. To enable this you first need to edit the .rtorrent.rc found in your home directory,

You need to change the line that reads something like

#schedule = watch_directory,5,5,load_start=


schedule = watch_directory,5,5,load_start=/home/jamie/downloads/torrents_files

Obviously change the load_start directory to the one that you want to use.

rtorrent should then be run in the background all the time. It will watch the directory and any .torrent files you drop in there will be automatically downloaded. I use the screen command to have rtorrent always running. Start it with:

screen rtorrent

Type [ctrl]-a [ctrl]-d to detach the screen and go back to the command prompt. rtorrent will still be running.

Next step, setup rsstorrent.

Setting up rsstorrent

rsstorrent is a simple python script to download and check rss files that contains torrent information. It will figure out if a new torrent has been added to the feed since the last time it checked and if so, it will download the .torrent file into a directory of your choosing. Obviously when used in conjunction with rtorrent, these two are pretty powerful.

You can put the rsstorrent.py file anywhere that you have access to. I put it in my home directory at:


Edit the script with your favorite editor and change only the top few variables:

# List of url feed to be parsed.
DOWNLOAD_DIR = "/home/jamie/downloads/torrents/"
TIMESTAMP = "/home/jamie/downloads/rsstorrent.stamp"

FEEDS is a list of rss feed urls that contain the torrent information. From the example above I have used the popular http://www.feedmytorrents.com site to get a random feed, this one is for the tv series Lost.

A little side note here. Please do not download any illegal torrent files or any files you do not have permission to own. OK, with that out of the way, add as many feed urls as you like, in the format shown above, to the FEEDS list. You will also want to change the DOWNLOAD_DIR and TIMESTAMP variables. Change DOWNLOAD_DIR to the same directory that you used when setting up rtorrent and the TIMESTAMP path can be anywhere that rsstorrent is allowed to save it timestamp information.

Once you have this setup, your ready to go. If you just want to test it out, change the VERBOSE variable to True and run rsstorrent:

python /home/jamie/scripts/rsstorrent.py

If all went according to plan you should see ... nothing downloaded. Why? Well on first run, rsstorrent has no timestamp information so it has to use the current time as a starting point. Rest assured, if you only get the "No new torrents to download" message, everything should be working right.

If you run rsstorrent again later, it will use the timestamp file to determine if any new .torrent files need to be downloaded.

Automating the process

To completely automate the process, rsstorrent can be called from cron. Edit the /etc/crontab file and add an entry for rsstorrent, something like this.

30 */6 * * * jamie cd /home/jamie/scripts && python ./rsstorrent.py

This line means that cron will call rsstorrent every 6 hours.


So there you have it. cron calls rsstorrent periodically to determine if any new .torrent files are available. If they are, the files are downloaded to a directory that rtorrent 'watches'. If rtorrent see's any new .torrent files in this directory, it downloads the torrent automatically.

Now all you need to do is sit back and see your legal torrents download without lifting a finger.

Written by Jamie Bennett

March 11th, 2009 at 4:16 pm

Posted in Uncategorized

Questionable Karma?

without comments

A little lightheartedness.

I just looked at my Maemo profile today and was greeted with this …

A ‘devilish’ Maemo user?

Written by Jamie Bennett

March 10th, 2009 at 11:00 am

Posted in Uncategorized


without comments

The date for the second homecamp has been announced, Saturday 25th April 2009, 10am until 6pm, at Bash Creations, 65-71 Scrutton Street, London, EC2A 4PJ.

So what is homecamp I hear you ask, well …

[googlemaps http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=65+-+71+Scrutton+Street,+London,+EC2A+4PJ&sll=51.509912,-0.129361&sspn=0.100214,0.30899&ie=UTF8&t=h&s=AARTsJqPd-ErkdBxBCv5KvS11XqkYfWsRA&ll=51.524833,-0.081217&spn=0.004673,0.00912&z=16&iwloc=cent&output=embed&w=425&h=350]

From the homecamp website:

“Home Camp is an unconference about using technology to monitor and automate the home for greener resource use and to save costs. This is about low energy devices and servers, reducing your electricity bills, monitoring your mouse traps, home automation, monitoring your water usage, using solar power. This is a hack day.”

For more information, the homecamp blog can be found here and a link to the first event is here.

The second homecamp promises to be great, don’t miss it!

Written by Jamie Bennett

March 4th, 2009 at 2:51 pm

Posted in Uncategorized

Recent Reading

without comments

I not a prolific reader by any stretch of the imagination, in fact the opposite is true, but one of my new years resolutions was to make a conscious effort to read more. Here is a short list of the books I’ve read in January and February. I’m starting to pick up the pace now and I’m really enjoying reading again.

  1. Agile Project Management with Scrum (Microsoft Professional) by Ken Schwaber
    Good book on SCRUM and Agile principles. The pace of the book seemed just right and there’s enough substance there to make you want to go back and skim read it again.
  2. Test Driven Development: By Example – by Kent Beck
    Not a bad book but not great. Tries to introduce the reader to the methods involved with Test Driven Development (TTD) by using very simple examples. Unfortunately if you have any experience with this methodology already (which is where I’m coming from), at least the first half of the book is useless and the second half doesn’t introduce much. Good for a introduction, nothing more.
  3. Eat That Frog!: Get More of the Important Things Done, Today! by Brian Tracy
    I like to read these organizational, somewhat motivational books to see if I can glean any useful information from them. Unfortunately this had very little.
  4. Painless Project Management with FogBugz by Mike Gunderloy
    We use Fogbugz at work, which, despite the steep fee you have to pay for it, is actually not a bad piece of software. This book is the definitive guide to everything you need to know about the tool and puts a project management spin on it. Good read if you use Fogbugz.
  5. Predictably Irrational: The Hidden Forces That Shape Our Decisions by Dan Ariely
    Not bad. Over-hyped and of dubious use but worth a read.
  6. Freakonomics: A Rogue Economist Explores the Hidden Side of Everything by Steven D. Levitt (Author), Stephen J. Dubner
    This surprisingly covers a lot of ground (the exact same examples in some cases) that Predictably Irrational does although this seems to do it better. A good read and some thought provoking material.
  7. Hot, Flat and Crowded: Why the World Needs a Green Revolution – and How We Can Renew Our Global Future by Thomas L. Friedman
    Best of the bunch of books I’ve read this year. If you can look past the constant use of buzz words by Thomas L. Friedman and dig deeper into the meaning behind what he is saying, the subject material is fascinating.

Written by Jamie Bennett

March 2nd, 2009 at 9:24 am

Posted in Uncategorized

BathCamp #2 – Arduino

without comments

BathCamp number 2 is happening in only two days. This time the topics are on the subjects of Arduino and the excellent Current Cost units (which can be seen in action on this very site here).

Ben Tomlinson, Creative Director of London agency Ico Design will be hosting the Arduino talk and Dale Lane will be talking about Current Cost.

This promises to be a great night, see you there.

Written by Jamie Bennett

March 2nd, 2009 at 8:07 am

Posted in Uncategorized