#!/bin/perl
$the_ELIST = "TRICKLE-L";
$the_elist = "trickle-l";
open( HTML, ">index.html" );
print( HTML "<HTML>\n" );
print( HTML "<TITLE>About the $the_ELIST elist</TITLE>\n" );
print( HTML "<H1>This is the WebReader for the $the_ELIST elist</H1>\n" );
print( HTML "<H2>courtesy of SunSITE.unc.edu</H2>\n" );
print( HTML "<HR><HR>\n" );
print( HTML "<A HREF=\"FAQ.$the_elist.html\">$the_ELIST FAQ</A><P>\n" );
system( "ls tri_*.html | sort -r >dir.index" );
system( "ls log*.*.html | sort -r >>dir.index" );
open( DIRLIST, "dir.index" );
while( <DIRLIST> ) { 
		chop;
		$x=0;
		open( TARGET, $_ );
		do {
			$target = <TARGET>;
			$x += 1;
			} until $x == 3;	
		print( HTML  "<A HREF=\"$_\">$target</A><BR>\n" );
		close( TARGET );
		}
close( DIRLIST );
print( HTML "<HR><HR>Document created by <B>Steve Modena</B>" );
print( HTML "<EM>AB4EL</EM>modena@SunSITE.unc.edu\n<HR>" );
print( HTML "</HTML>\n" );
close( HTML );
