Sorry, I have no public web space. I am including the Perl script I use to generate the files (note that the forum will probably remove the line indentations). Just copy all the CDL files to a directory and run the perl script from within that same directory. It will generate an HTML file for each CDL and the frames.html file that you load into your browser. If anyone wants to donate the web space, I would be happy to send a ZIP file for posting.
Commenter-2
######################## Perl Script ##############################
my @cdl_files;
sub WriteFrameset {
open(FRAMESET, ">frames.html");
print FRAMESET <
END_OF_HEADER
close(FRAMESET);
}
sub WriteIndex {
# list patterns to be omitted from the index
my @index_files;
foreach $cdl_file (@cdl_files) {
next if ($cdl_file =~ /^draw/i);
next if ($cdl_file =~ /^Plugin$/);
next if ($cdl_file =~ /^swdraw/i);
next if ($cdl_file =~ /^testtopope/i);
next if ($cdl_file =~ /^xdedraw/i);
next if ($cdl_file =~ /^xsdraw/i);
next if ($cdl_file =~ /^wok/i);
next if ($cdl_file =~ /^test[_.]/i);
push(@index_files, $cdl_file);
}
print "CDL files: " . ($#cdl_files+1) . "\n";
print "Index files: " . ($#index_files+1) . "\n";
open(INDEX, ">index.html");
print INDEX <
CDL File Index
CDL File Index
function init() {
var files = [
END_OF_HEADER
my $i;
my $class;
for ($i = 0; $i < $#index_files; $i++) {
$class = $index_files[$i];
$class =~ s/\.cdl$//;
print INDEX "\"$class\",";
}
$class = $index_files[$#index_files];
$class =~ s/\.cdl$//;
print INDEX "\"$class\"";
print INDEX <" + files[i] + "\\n");
}
}
}
else {
for (var i=0; i" + files[i] + "\\n");
}
}
}
init();
END_OF_FOOTER
close(INDEX);
}
my $firstitem = 1;
sub LinkFrom {
my ($item, $from, $package) = @_;
if ($package eq "class") {
return "$item$from$package";
}
my $cdl = "${package}_${item}.cdl";
my $found = 0;
my $myfile;
foreach $myfile (@cdl_files) {
if ("$myfile" eq "$cdl") {
$found = 1;
last;
}
}
if ($found) {
return "$item$from$package";
}
else {
return "$item$from$package";
}
}
sub Convert {
my ($cdl_file) = @_;
my $html_file = $cdl_file;
$html_file =~ s/\.cdl$/.html/;
open(HTML, ">$html_file");
print HTML <
$cdl_file
CDL File Index
END_OF_HEADER
open(CDL, "<$cdl_file");
while () {
s/>/\>/g;
s/$_";
}
else {
s/(\w+)(\s+from\s+)(\w+)/LinkFrom($1,$2,$3)/eg;
}
print HTML "$_";
}
close(CDL);
print HTML <
END_OF_FOOTER
close(HTML);
}
# open the current directory and read all the CDL files
print "Building file list...\n";
opendir(DIR, ".");
@cdl_files = grep(/\.cdl$/, readdir(DIR));
closedir(DIR);
# generate the frames file
print "Generating frame set (frames.html)...\n";
WriteFrameset();
# write the index file
print "Generating file index (index.html)...\n";
WriteIndex(@cdl_files);
# convert the CDL files to HTML
foreach $cdl_file (@cdl_files) {
print "Converting: $cdl_file...\n";
Convert($cdl_file);
}
print "Done\n";