4 # Creating contents.hhc ...
10 die "create_index: No name of the file containing the index was Specified!\n";
13 open(CONTENTS
, ">./contents.hhc") || die "Can't create contents.hhc";
14 open(MAXIMA_TOC
, $ARGV[0]) || die "Can't open " . $ARGV[0];
16 while (<MAXIMA_TOC
>) {
18 if ( m
#.*<ul class="no-bullet"># ) {
19 print CONTENTS
"<ul>\n";
23 print CONTENTS
"</ul>\n";
26 if ( m
#.*?<li><a\sname="(.*?)"\shref="(.*?)">.*?\s(.*?)</a># ) {
27 print CONTENTS
"<li><object type=\"text/sitemap\">\n";
28 print CONTENTS
" <param name=\"Local\" value=\"$2\">\n";
29 print CONTENTS
" <param name=\"Name\" value=\"$3\"></object>\n";
37 # Creating index.hhk ...
40 open(INDEX
, ">./index.hhk") || die "Can't create index.hhk";
45 while (open(MAXIMA_N
,"./maxima_$i.html")) {
48 if ( m
#.*?"top"><a\shref="maxima_(.*?)"><code>(.*?)</code></a># ||
49 m
#.*?"top"><a\shref="maxima_(.*?)">(.*?)</a># ) {
50 unless ( $index_content{$2} ) {
51 print INDEX
"<li><object type=\"text/sitemap\">\n";
52 print INDEX
" <param name=\"Local\" value=\"maxima_$1\">\n";
53 print INDEX
" <param name=\"Name\" value=\"$2\"></object>\n";
54 $index_content{$2} = 1;