4 # Creating contents.hhc ...
7 open(CONTENTS
, ">./contents.hhc") || die "Can't create contents.hhc";
8 open(MAXIMA_TOC
, "./maxima_toc.html") || die "Can't open maxima_toc.html";
10 while (<MAXIMA_TOC
>) {
12 if ( m
#.*<ul class="toc"># ) {
13 print CONTENTS
"<ul>\n";
17 print CONTENTS
"</ul>\n";
20 if ( m
#.*?<li><a\sname="(.*?)"\shref="(.*?)">.*?\s(.*?)</a># ) {
21 print CONTENTS
"<li><object type=\"text/sitemap\">\n";
22 print CONTENTS
" <param name=\"Local\" value=\"$2\">\n";
23 print CONTENTS
" <param name=\"Name\" value=\"$3\"></object>\n";
31 # Creating index.hhk ...
34 open(INDEX
, ">./index.hhk") || die "Can't create index.hhk";
39 while (open(MAXIMA_N
,"./maxima_$i.html")) {
42 if ( m
#.*?"top"><a\shref="maxima_(.*?)"><code>(.*?)</code></a># ||
43 m
#.*?"top"><a\shref="maxima_(.*?)">(.*?)</a># ) {
44 unless ( $index_content{$2} ) {
45 print INDEX
"<li><object type=\"text/sitemap\">\n";
46 print INDEX
" <param name=\"Local\" value=\"maxima_$1\">\n";
47 print INDEX
" <param name=\"Name\" value=\"$2\"></object>\n";
48 $index_content{$2} = 1;