Archive for the ‘Uncategorized’ Category
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:
[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.
FEEDS = [
DOWNLOAD_DIR = "/home/jamie/downloads/torrents/"
TIMESTAMP = "/home/jamie/downloads/rsstorrent.stamp"
VERBOSE = False
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
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.
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.
A little lightheartedness.
I just looked at my Maemo profile today and was greeted with this …
A ‘devilish’ Maemo user?
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 …
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.”
The second homecamp promises to be great, don’t miss it!
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.
- 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.
- 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.
- 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.
- 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.
- Predictably Irrational: The Hidden Forces That Shape Our Decisions by Dan Ariely
Not bad. Over-hyped and of dubious use but worth a read.
- 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.
- 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.
This promises to be a great night, see you there.
There is a good, but short, article about the state of power management on the next generation Maemo devices at lwn.net (subscription required or free but you have to wait until Thursday).
In the article, Nokia’s Peter De Schrijver talks about the 4 modes of power management that will be available in the next platform, “on”, “inactive”, “retention” and “off”. These modes will govern how the device draws power and careful optimizations will ultimately dictate how long the battery life of these new devices will last.
Its good to see that careful attention is being shown to this often neglected area. For example, the very functional Android based G1 mobile phone is hampered by its ridiculously short battery life. It doesn’t matter that the phone has some killer apps, or that its running Linux under the hood, if the battery runs down in less than a day. Lets hope that Nokia can tame the OMAP 3 architecture into lasting at least as long as its predecessors.
It looks like this code for the power management optimizations will be ready soon, quoting the lwn.net article, Peter De Schrijver said,
The “retention” state works. Basic “off” mode works on most development boards; drivers are being adapted for “off” mode now and will be ready at the end of February.
So Nokia today have announced that they are to add the LGPL license to Qt. What does this mean for Qt and specifically Maemo? Well …
Open source code repositories
Qt will now be available in a publicly-accessible Git repository, meaning changes can easily be tracked and patches can be created more readily. For the first time developers can see exactly the direction Qt is taking and for any developer investing time and often money in their software and toolkit of choice, this is a big plus.
More commercial software
The switch to the LGPL means proprietary software can be created with the Qt toolkit. The commercial licensing that Qt previously had (you can distribute your software for free under the GPL but closed source projects require a license fee) meant that Qt hasn’t become as widespread as maybe it should of. I know of several projects that chose to use the less restrictive licensing of the GTK toolkit for this very reason. Lets hope the new license encourages more software, free or otherwise.
Often open source developers frown upon closed source projects but lets not forget the model that the iphone has. It has free and commercial software side by side. Often the commercial software is of a nominal fee, 99 cents or 59 pence here in the UK and I for one would gladly pay small amounts of money to see good software on my Maemo device.
Cross platform software
Qt is truly cross-platform, running on Windows, Mac, Linux and even Symbian. Developers that would usually target one platform can now use a toolkit that, with a tweak or two, can happily run on many. This can only open the flood gates for a slew new applications on the Maemo platform. Maybe this new software wasn’t originally targeted for Maemo, but when companies and individuals realize that they can offer their software to Maemo users with very little effort on their part, maybe we will see things that otherwise would never of worked on our tablets materialize.
Qt can now become a standard. There really is no excuse not to consider Qt when developing cross platform software. From the companies that need to make money with their software products to the individuals who do it for fun and everyone in between, all can use the same powerful, cross-platform toolkit.
Today, Nokia could of just changed the playing field for developers.
For those people that do not know what BathCamp is, check out the introduction from the BathCamp website.