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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
#!/usr/bin/perl -w
print "<div id=\"table\">
<table cellpadding =\"5\">
<tr><th>LIBRARY</th> <th>DATATYPES</th> <th>FUNCTIONS</th> <th>NOTES</th> </tr>
";
%ignorefiles = (
"index" => "indexfile",
"ajgraphxml" => "old graph XML code",
"pcre" => "PCRE library",
"pcre_study" => "PCRE library",
"pcre_chartables" => "PCRE library",
"pcre_printint" => "PCRE library",
"pcre_get" => "PCRE library",
"pcreposix" => "PCRE library",
);
%knownfiles = (
"ajacd" => "AJAX Command Definitions",
"ajalign" => "Alignments",
"ajarr" => "Array handling",
"ajassert" => "Assert function",
"ajbase" => "Base code functions",
"ajcall" => "Call registration functions",
"ajcod" => "Codon analysis functions",
"ajdan" => "DNA melting functions",
"ajdmx" => "Domainatrix package functions",
"ajdom" => "DOM parser for XML",
"ajdomain" => "Domain package functions",
"ajexcept" => "Exception handling",
"ajfeat" => "Feature table functions",
"ajfeatdata" => "Feature table data",
"ajfile" => "<i>File handling</i>",
"ajfmt" => "Formatted input and output",
"ajgraph" => "Graphical output",
"ajgraphstruct" => "Graphical output data structures",
"ajhist" => "Histogram graphical data",
"ajindex" => "Data indexing functions",
"ajjava" => "Java API functions",
"ajlist" => "Lists",
"ajmath" => "Maths utilities",
"ajmatrices" => "Comparison matrix functions",
"ajmem" => "Memory allocation",
"ajmess" => "Message handling",
"ajnam" => "Names: variables and database definitions",
"ajnexus" => "Nexus data format",
"ajpat" => "Pattern matching functions",
"ajpdb" => "Protein databank data format",
"ajpdbio" => "Protein databank I/O",
"ajphylo" => "Phylogenetic data functions",
"ajrange" => "Sequence range specifications",
"ajreg" => "Regular expressions",
"ajreport" => "Feature report output",
"ajseq" => "Sequence handling functions",
"ajseqabi" => "Sequence ABI traces",
"ajseqdata" => "Sequence data",
"ajseqdb" => "Sequence data access methods",
"ajseqread" => "Sequence input functions",
"ajseqtype" => "Sequence type checking",
"ajseqwrite" => "Sequence output functions",
"ajsort" => "Sort utility functions",
"ajstr" => "<i>String manipulation</i>",
"ajsys" => "System utilities",
"ajtable" => "Tables",
"ajtime" => "Time functions",
"ajtranslate" => "Sequence translation",
"ajtree" => "Phylogenetic trees",
"ajutil" => "Utilities",
"ajvector" => "Cloning vectors",
);
opendir(DIR, ".");
while ($file = readdir(DIR)) {
if($file =~ /^[.]/) {next}
if(-d $file) {next}
if($file =~ /[~]$/) {next}
if($file =~ /[.]inc$/) {next}
if($file =~ /^(.*)_static[.]html$/) {next}
elsif($file =~ /^(.*)[.]html$/) {
$fpref=$1;
if($ignorefiles{$fpref}) {next}
}
else {
print "+++ unknown file type $file\n";
next;
}
$empty=0;
open (HTML, "$file");
while (<HTML>) {
if (/No public datatype definitions in source file/) {$empty=1}
}
# print "$file ($fpref)\n";
close (HTML);
open (DD, "../datadef/$file");
$emptyd = 0;
while (<DD>) {
if(/No public datatype definitions in source file/) {$emptyd=1}
}
close (DD);
if(!defined($knownfiles{$fpref})) {
print STDERR "Unknown file: $fpref\n";
}
else {
$out = "\n<tr><td><b><i>$knownfiles{$fpref}</b></i></td>\n";
if(!$emptyd) {
$out .= "<td><a href=\"../datadef/$fpref.html\">Datatypes</a></td>\n";
}
else {
$out .= "<td> </td>\n";
}
if(!$empty) {
$out .= "<td><a href=\"$fpref.html\">Functions</a></td>\n";
}
else {
$out .= "<td> </td>\n";
}
$label = uc($fpref);
$label =~ s/^AJ//;
$out .= "<td><a href=\"#$label\">Notes</a></td></tr>\n";
$out{$fpref} = $out;
}
}
closedir(DIR);
foreach $x(keys(%knownfiles)) {
if(defined($out{$x})) {
print $out{$x};
}
else {
$fpref = $x;
open (DD, "../datadef/$fpref.html");
$emptyd = 0;
while (<DD>) {
if(/No public datatype definitions in source file/) {$emptyd=1}
}
close (DD);
$out = print "<tr><td><b><i>$knownfiles{$fpref}</b></i></td>\n";
if(!$emptyd) {
$out .= "<td><a href=\"../datadef/$fpref.html\">Datatypes</a></td>\n";
}
else {
$out .= "<td> </td>\n";
}
# we know there are no documented public functions!
$out .= "<td> </td>\n";
$label = uc($fpref);
$label =~ s/^AJ//;
$out .= "<td><a href=\"#$label\">Notes</a></td></tr>\n";
$out{$fpref} = $out;
print $out{$x};
}
}
print "</table>\n";
|