Sorry it's been so long since my last post, but I've been really busy with my new job.. My total time per week either at work or commuting is about 65.5 hours, so I don't have heaps of time.
Anyway, for a while now I've been a fan of abandonware games, which are games that have gone out of copywrite and are now free to download. Obviously these are only really old games but to my mind some of the greatest ever games were made more than 20 years ago.
The problem with abandonware is that it can take a great amount of human time to get the abandonware files. This is because you often have to click through three or four pages per game, even though each game is often less than 1mb in size! I recently came across a site called c:\dos abandonware.
There's a page on this site that google sent me to which complains that you have JavaScript turned off and gives you a list off all the games on the site (with the links to download them). I thought to myself, why don't I make a nice little Perl script to download all of these games automatically. The first thing you will need to do is go to www.cdosabandonware.com/std_noscript.php and get the source. You can do that by right-clicking the web page and selecting view source. Then just copy and paste the source into a text editor of your choice. You could also do something like:
$ wget www.cdosabandonware.com/std_noscript.php
Then, you need to write your perl script. It's only four lines long and looks like this:
#!/usr/bin/perl -w
while() {
`wget $1` if (/"http:\/\/(.+)"/);
}
That's it! All you have to do is run it like this:
$ ./get.pl < source.html
Where get.pl is the perl script we've just made and source.html is the source from the c:/dos abandonware site.
A few things to note: this script will only work in linux. It should be easy to change it for ActivePerl in Windows, but I don't know how. Also, I currently estimate the total download size to be about 3gigabytes. I will update this post when my download completes, but until then you have been warned!
UPDATE: The total download for running this script was about 11 Gigabytes. Apparently the abandonware games are bigger than I expected.. It's OK for me because I've got plenty of download bandwidth left, but I suggest that you don't run this script unless you have bandwidth to burn!
Thursday, June 18, 2009
Subscribe to:
Posts (Atom)