#!/usr/bin/perl
#
# MakeIndex
#
# Build HTML index of a set of html files.
# Extracts "
" segment from each file.
#
# 1) print header
# 2) process files to produce items
# Ie extract title component, and build cross-ref to actual file.
# 3) print trailer
$outputfile = "Index.html";
$includefile = "Intro.include";
if (!open(OUTPUT, ">".$outputfile)) {
die "Can't open output file $outputfile: $!\n";
}
select(OUTPUT);
# Print header
print "","\n";
print "","\n";
print "","\n";
print "$heading
","\n";
print "","\n";
print "
","\n";
# Print include file
open(INCLUDEFILE, $includefile);
while () { print; }
# Process the files
# HTML versions:
print "For on-line browsing (HTML):\n";
print "\n";
# Postscript versions:
print "For printing (postscript):\n";
print "","\n";
while () {
$TheFile = $_ ;
warn "Debug: PROCESSING $TheFile\n";
print "- ";
print " $TheFile\n";
}
print "
\n";
#Print trailer
print "
","\n";
print "","\n";
print "","\n";
print "","\n";