#! /usr/local/bin/perl ##### # htmlgen-abc # Creates HTML files for calling files. Will sort them alphanumerically # from first point of difference. # Copyright (c) Matthew J. Walker 1995 # Free to distribute, modify, etc. as long as this head remains. ##### $date = `date` ; chop($date); ##### # Check to make sure files have been passed to the script. if (!@ARGV) { print <<"EOH"; Usage: htmlgen-abc [files] This script will package a series of .gif files into .html files that reference them. It will link the files in the order they are passed on the command line, so if a wildcard is used they are ordered alpha- numerically, a position at a time. ie 1-10 would be 1,10,2,3,4 etc. To get sequential numbering correct you must use htmlgen-num, or number 01,02,03 etc. EOH exit ; } # ##### foreach $i (0 .. $#ARGV) { $page = $i+1 ; ($file = $ARGV[$i]) =~ s/gif/html/ ; #name of new html file ($title = $file) =~ s/\.html// ; #title of new html file in html $link_text = &CreateLinks($i); print "$file is being processed \n"; open(FILE, ">../$file") || die " Could not open $file for write!\n" ; print FILE <<"EOF" ;