[netcomics-devel] Patch for module 'lib/keenspace'
Brought to you by:
elliotglaysher,
hochstrb
|
From: Eddy C. <eco...@gm...> - 2005-06-23 05:11:50
|
Hi Netcomics developers, I have created a patch that modifies the module 'lib/keenspace' to include the comic "Two Lumps: The Adventures of Ebenezer and Snooch" [http://twolumps.keenspace.com/]. It has been running happily in my nightly cron for a while now. Feel free to apply... Regards, Eddy Corbett. ********** start of diff ********** --- keenspace.1.15 2005-06-22 16:12:32.000000000 +1000 +++ keenspace 2005-06-23 15:05:42.000000000 +1000 @@ -1,6 +1,6 @@ #-*-CPerl-*- foreach (qw(heaven framed stereo fce sketch roses flint - zap spork tang ais forbez oddjobs ua)) { + zap spork tang ais forbez oddjobs ua twolumps)) { $hof{$_} =3D 0; }; foreach (qw(attwf)) { @@ -597,6 +597,29 @@ } +#Two Lumps: The Adventures of Ebenezer and Snooch +sub twolumps { + my $time =3D shift; + my @ltime =3D gmtime($time); + my $date =3D strftime("%Y%m%d", @ltime); + + # exception tables last updated June 19, 2001 + my @missing =3D (); + my @extra =3D (20040316, 20040620, 20040821, 20041102, 20041214); + + # comic published on Mon, Wed, and Fri + return undef if + ( ($date < 20040316) || # first comic 16-Mar-2004 + (grep(/$date/,@missing)) || + ($ltime[6] !~ /[135]/ && !grep(/$date/,@extra)) ); + + my $title =3D "Two Lumps: The Adventures of Ebenezer and Snooch"; + my $author =3D "J. Grant and Mel Hynes"; + my $url =3D "twolumps"; + + return keenspace($title,$author,$date,$url); +} + #Untitled Again sub ua { my $time =3D shift; ********** end of diff ********** |