| 1 | #! perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | package Comics::Plugin::S1ngle; | ||
| 7 | |||
| 8 | use parent qw(Comics::Fetcher::Direct); | ||
| 9 | |||
| 10 | our $VERSION = "0.01"; | ||
| 11 | |||
| 12 | sub register { | ||
| 13 | |||
| 14 | # S1ngle has strips ma, di, .., za (weekdays). | ||
| 15 | # Strips on the site are usually some days behind. | ||
| 16 | |||
| 17 | my @tm = localtime; | ||
| 18 | my $wd = $tm[6]; | ||
| 19 | $wd += 7 if $wd < 0; | ||
| 20 | $wd = 6 if $wd == 0; | ||
| 21 | $wd = qw( ma di wo do vr za )[$wd-1]; | ||
| 22 | |||
| 23 | shift->SUPER::register | ||
| 24 | ( { name => "S1ngle", | ||
| 25 | url => "http://www.s1ngle.nl/", | ||
| 26 | path => "strips/$wd.gif", | ||
| 27 | } ); | ||
| 28 | } | ||
| 29 | |||
| 30 | # Important: Return the package name! | ||
| 31 | __PACKAGE__; |