--- comics/fetch.pl.new 2013/02/27 14:56:26 1.11 +++ comics/fetch.pl.new 2013/03/12 13:09:34 1.13 @@ -9,7 +9,7 @@ use Getopt::Long; ## ## Some default values ## -my $ver = q/$Id: fetch.pl.new,v 1.11 2013/02/27 14:56:26 nick Exp $/; +my $ver = q/$Id: fetch.pl.new,v 1.13 2013/03/12 13:09:34 nick Exp $/; my $comicFile = "comics.conf"; my %comics = &readComicConfig ( $comicFile ); my %opts = &fetchOptions( ); @@ -117,9 +117,9 @@ sub readComicConfig ($$) { sub writeComic ($$) { my ( $comics, $comic, $date ) = @_; my $sd = substr( join( '', $days[$date->{'dow'}] ), 0, 3 ); - my $indexFile = $indexDir . "/index-" . $sd . - "-" . $date->{'year2'} . $date->{'mon2'} . - $date->{'day2'} . ".html"; + my $indexFile = $indexDir . "/index-" . $date->{'year2'} . + $date->{'mon2'} . $date->{'day2'} . "-" . + $sd . ".html"; my $content = <{$comic}{'fullName'}) ******* --> @@ -173,9 +173,9 @@ sub writeMainIndex ($$) { sub writeFooter { my ( $date ) = @_; my $sd = substr( join( '', $days[$date->{'dow'}] ), 0, 3 ); - my $indexFile = $indexDir . "/index-" . $sd . - "-" . $date->{'year2'} . $date->{'mon2'} . - $date->{'day2'} . ".html"; + my $indexFile = $indexDir . "/index-" . $date->{'year2'} . + $date->{'mon2'} . $date->{'day2'} . "-" . + $sd . ".html"; my $sysDate = `date`; open INDEX, ">>$indexFile"; @@ -213,9 +213,9 @@ sub checkDir ($$) { sub writeTitle ($$) { my ( $date ) = @_; my $sd = substr( join( '', $days[$date->{'dow'}] ), 0, 3 ); - my $indexFile = $indexDir . "/index-" . $sd . - "-" . $date->{'year2'} . $date->{'mon2'} . - $date->{'day2'} . ".html"; + my $indexFile = $indexDir . "/index-" . $date->{'year2'} . + $date->{'mon2'} . $date->{'day2'} . "-" . + $sd . ".html"; my $today = $days[$date->{'dow'}] . " " . $date->{'mon'} . "/" . $date->{'day'} . "/" . $date->{'year'}; open INDEX, ">$indexFile"; @@ -225,6 +225,7 @@ sub writeTitle ($$) { + Daily Comics for $today