--- comics/fetch.pl.new 2011/09/18 14:04:29 1.3 +++ comics/fetch.pl.new 2011/09/23 01:36:54 1.4 @@ -7,7 +7,7 @@ use Data::Dumper; ## ## Some default values ## -my $ver = q/$Id: fetch.pl.new,v 1.3 2011/09/18 14:04:29 nick Exp $/; +my $ver = q/$Id: fetch.pl.new,v 1.4 2011/09/23 01:36:54 nick Exp $/; my $comicFile = "comics.conf"; my %comics = &readComicConfig ( $comicFile ); my %dates = &fetchDates(); @@ -26,7 +26,7 @@ print STDOUT "Starting comic fetch at $D ## &checkDir ( [ $imageDir, $indexDir ] ); -&writeTitle ( \%dates ); +#&writeTitle ( \%dates ); foreach my $comic ( sort keys %comics ) { next if ( $comic =~ m/config/ ); @@ -34,6 +34,17 @@ foreach my $comic ( sort keys %comics ) &writeComic ( \%comics, $comic, \%dates ); } +my $D = `date +%d`; chomp $D; +print "Finding in $imageDir/*-$D.jpg\n"; +foreach my $file ( glob( "$imageDir/*-$D.jpg" ) ) +{ + my $size = `/usr/bin/identify $file`; + $size =~ s/.*\s(\d+)x\d+.*/$1/; + + system( "/usr/bin/convert -resize 640 $file $file" ) + if ( $size > 640 ) +} + ## &writeMainIndex ( \%dates ); &writeFooter( \%dates );