Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CGW archive downloading tool

2 views
Skip to first unread message

Adam Thornton

unread,
Oct 17, 2006, 1:51:13 AM10/17/06
to
This is tested on Mac OS X and Linux (although it's not done running
yet). If you've got Perl and wget then it should work. Yes, I know
it's hideously ugly. Nevertheless, it seems to do the trick.

Note that it won't fetch a file if you already have a file by that name
in the current directory. So if you interrupt it in the middle of a
transfer, delete the file it was working on before re-running. However,
if you want to grab a bunch of files and then stop it and look at those
and re-run to get some more, it will do that fine.

====cut here====
#!/usr/bin/perl
# Snarf all the CGWs from the archive on Filefront
$YEAR=1981;
$MONTH=11;

for ($ISSUE = 1; $ISSUE < 101; $ISSUE++) {
if (($ISSUE == 21) or ($ISSUE == 23)) { $MONTH += 1; }
if ($ISSUE < 25) {
# First 24 did not have an underscore between the two month numbers
if ($MONTH < 9) { $m = "0" . $MONTH . "0" . ($MONTH+1); }
if ($MONTH == 9) { $m = "0910"; }
if ($MONTH > 9) {$m = $MONTH . $MONTH+1;}
$name = $YEAR . "_" . $m . "_issue" . $ISSUE . ".pdf";
} else {
# 25 - 100 do contain an underscore, and there are several double
# months
$d = 0;
if (($ISSUE == 25) or ($ISSUE == 29) or ($ISSUE == 31) or
($ISSUE == 34) or ($ISSUE == 38) or ($ISSUE == 39) or
($ISSUE == 73)) {
$d = 1;
}
if ($d) {
if ($MONTH < 9) {
$m = "0" . $MONTH . "_0" . ($MONTH + 1);
}
if ($MONTH == 9) {
$m = "09_10";
}
if ($MONTH > 9) {
$m = $MONTH . "_" . ($MONTH + 1);
}
$MONTH++;
} else {
$m = $MONTH;
if ($MONTH < 10) {
$m = "0" .$MONTH;
}
}
}
$name = $YEAR . "_" . $m . "_issue" . $ISSUE . ".pdf";
system("wget http://static.filefront.com/cgw/$name")
unless (-e $name);
$MONTH++;
if ($ISSUE < 25) { $MONTH++; };
if ($MONTH > 12) {
$MONTH = $MONTH - 12;
$YEAR++;
}
}

# Special issues of Computer Gaming Forum (1987)
for ($MONTH = 1; $MONTH < 3 ; $MONTH++) {
system("wget http://static.filefront.com/cgw/1987_SPECIAL_CGF%20$MONTH.pdf")
unless (-e $name);
}


====cut here====

Stephane Racle

unread,
Oct 17, 2006, 9:17:02 PM10/17/06
to
Or send me an e-mail at my CGW Museum address (c...@vintagegaming.org)
and I can get you a DVD. :-)

Stephane

Stephane Racle

unread,
Oct 17, 2006, 9:20:24 PM10/17/06
to
Ack. That's cgwm...@vintagegaming.org. And don't forget to grab the
index from the site (cgw.vintagegaming.org).
0 new messages