/ Published in: Perl
Show jpegs one-per-page on a series of hyperlinked web pages. Purpose was to provide a linear viewing mechanism for jpegs on my Palm Tungsten C.
Expand |
Embed | Plain Text
#! /usr/bin/perl -w use strict; ############################################################ # # # # # # # NOAH SUSSMAN # # # # showserial.pl # # # # Created 10/8/3 at 1.41am # # # # Show jpegs one-per-page on a series of hyperlinked # # web pages. Purpose is to provide a good _linear_ # # viewing mechanism for jpegs on the palm. # # Adapted from showsm.pl # # # # # ############################################################ my @images; while (<*\.jp*>) { } while (<*\.jp*>) { #regex captures any filename with extension beginning "JP" my $next_file; $next_file = $images[0]; #read the next filename into $next_file my $out="$_"; $out =~ s/jpeg/html/gio; if ($next_file){ #print $next_file; $next_file =~ s/jpeg/html/gio; print OUT "<a href=\"$next_file\">"; } print OUT "<html><head><title>$_</title></head><body>\n"; print OUT "</body></html>"; if ($next_file){ print OUT "</a>"; } }
You need to login to post a comment.
