1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/usr/bin/perl -w
my @files = `ls -d *\-*`;
chomp(@files);
#
# Put in some boilerplate stuff -- Cribbed from the Erlang distribution.
#
print "<html>\n<head>\n";
print " <title>Erlang Library Modules Index</title>\n";
print " <style type=\"text/css\">\n";
print "<!--\n";
print " body { background: white; margin: 3em }\n";
print " body { font-family: Verdana, Arial, Helvetica, sans-serif }\n";
print " h1 h2 h3 h4 { font-family: Verdana, Arial, Helvetica, sans-serif }\n";
print " h1 { font-size: 48 }\n";
print " p li { font-family: Verdana, Arial, Helvetica, sans-serif }\n";
print "-->\n";
print " </style>\n";
print "</head>\n";
print "<body bgcolor=white>\n";
print "<center><h1>Index of Library Functions</h1></center><hr>\n";
print "<table border=0 cellspacing=10 width=\"100%\">\n";
my($filename);
foreach $filename (@files) {
my($name) = $filename;
$name =~ s/[\d\.\-]//g;
print STDERR "Incorporating $filename\n";
print '<tr><td><strong><a href="' . $filename;
print '/doc/html/index.html">' . $name . '</strong></td>';
#
# Get short description
#
print "<td>";
my(@info) = `grep "short:" $filename/info`;
foreach $line (@info) {
$line =~ s/^short://;
print $line;
}
print "</td></tr>\n";
}
#
# Closing boilerplate
#
print "</body></html>\n";
print STDERR "Finished generating index.\n";
|