Diff for /comics/fetch.pl.new between versions 1.31 and 1.32

version 1.31, 2024/12/13 16:03:49 version 1.32, 2025/04/02 13:29:10
Line 2 Line 2
   
 ###############################################################################  ###############################################################################
 # $Log$  # $Log$
   # Revision 1.32  2025/04/02 13:29:10  nick
   # Updated FBOW to use direct download which also required fixing the direct
   # download function.  Lastly, I removed the restriction for resizing images
   # so all comics are resized to a width of 800px.
   #
 # Revision 1.31  2024/12/13 16:03:49  nick  # Revision 1.31  2024/12/13 16:03:49  nick
 # This adds the ability to specify a comic as a link only with a default splash image.  # This adds the ability to specify a comic as a link only with a default splash image.
 #  #
Line 139  foreach my $comic ( sort keys %comics ) Line 144  foreach my $comic ( sort keys %comics )
             close(IMG);              close(IMG);
   
             system( "/usr/bin/convert -resize 800 $file $file" )              system( "/usr/bin/convert -resize 800 $file $file" )
             if ( $size > 800 )               # if ( $size > 800 ) 
      }       }
 }  }
   
Line 197  sub readComicConfig ($$) { Line 202  sub readComicConfig ($$) {
     $year += 1900;      $year += 1900;
     $mon = sprintf("%02d", ($mon + 1));      $mon = sprintf("%02d", ($mon + 1));
     $day = sprintf("%02d", $day);      $day = sprintf("%02d", $day);
       my $year_short = substr($year, -2);
   
         open FILEN, "<$comicFile";          open FILEN, "<$comicFile";
                 while (<FILEN>) {                  while (<FILEN>) {
Line 206  sub readComicConfig ($$) { Line 212  sub readComicConfig ($$) {
             }              }
                         if ( ( $_ !~ m/^#/ ) && ( $_ =~ m/,.*,/) ){                          if ( ( $_ !~ m/^#/ ) && ( $_ =~ m/,.*,/) ){
                 $_ =~ s/__YEAR__/$year/g;                  $_ =~ s/__YEAR__/$year/g;
                   $_ =~ s/__YR__/$year_short/g;
                 $_ =~ s/__MON__/$mon/g;                  $_ =~ s/__MON__/$mon/g;
                 $_ =~ s/__DAY__/$day/g;                  $_ =~ s/__DAY__/$day/g;
                                   
Line 348  sub writeFooter { Line 355  sub writeFooter {
 Generated on: <font size="2" color="green">$sysDate</font><br/>  Generated on: <font size="2" color="green">$sysDate</font><br/>
 Version: <font size="2" color="green">$ver</font><br />  Version: <font size="2" color="green">$ver</font><br />
 Config Version: <font size="2" color="green">$comicConfigVer</font><br />  Config Version: <font size="2" color="green">$comicConfigVer</font><br />
 CVS: <a href="http://demandred.dyndns.org:3000/cgi-bin/cvsweb/comics/">http://demandred.dyndns.org/cgi-bin/cvsweb/comics/</a>  CVS: <a href="http://demandred.dyndns.org/cgi-bin/cvsweb/comics/">http://demandred.dyndns.org/cgi-bin/cvsweb/comics/</a>
   <br />    <br />
     <a href="http://validator.w3.org/check?uri=referer"><img      <a href="http://validator.w3.org/check?uri=referer"><img
       src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a>        src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Transitional" height="31" width="88" border="0" /></a>
Line 413  sub directDownload ($$) { Line 420  sub directDownload ($$) {
         my $cDir  = $date->{'mon2'} . $date->{'year2'};          my $cDir  = $date->{'mon2'} . $date->{'year2'};
         my $cDate = $date->{'day2'};          my $cDate = $date->{'day2'};
   
         my $cmd = "wget --no-check-certificate -q $file --referer='" . $comics->{$comic}{'url'} ."' --user-agent=\"$USER_AGENT\" -O - | /usr/bin/convert - jpeg:images/$cDir/$comic-$cDate.jpg";          my $cmd = "wget --no-check-certificate -q $file --referer='" . $comics->{$comic}{'url'} ."' --user-agent=\"$USER_AGENT\" $comics->{$comic}{'url'} -O - | /usr/bin/convert - images/$cDir/$comic-$cDate.$comics->{$comic}{ext}";
   
           print("Command: $cmd\n");
   
         return system($cmd);          return system($cmd);
 }  }

Removed from v.1.31  
changed lines
  Added in v.1.32


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>