~ubuntu-branches/debian/squeeze/maxima/squeeze

« back to all changes in this revision

Viewing changes to doc/info/create_index

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2006-10-18 14:52:42 UTC
  • mto: (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061018145242-vzyrm5hmxr8kiosf
ImportĀ upstreamĀ versionĀ 5.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
 
 
3
#
 
4
# Creating contents.hhc ...
 
5
#
 
6
 
 
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";
 
9
 
 
10
while (<MAXIMA_TOC>)  {
 
11
 
 
12
    if ( m#.*<ul class="toc"># ) {
 
13
        print CONTENTS "<ul>\n";
 
14
    }
 
15
 
 
16
    if ( m#.*</ul># ) {
 
17
        print CONTENTS "</ul>\n";
 
18
    } 
 
19
 
 
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";
 
24
    } 
 
25
}
 
26
 
 
27
close(MAXIMA_TOC);
 
28
close(CONTENTS);
 
29
 
 
30
#
 
31
# Creating index.hhk ...
 
32
#
 
33
 
 
34
open(INDEX, ">./index.hhk") || die "Can't create index.hhk";
 
35
 
 
36
$i = 1;
 
37
%index_content = ();
 
38
 
 
39
while (open(MAXIMA_N,"./maxima_$i.html")) {
 
40
    while (<MAXIMA_N>)  {
 
41
 
 
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;
 
49
            }
 
50
        }
 
51
 
 
52
    }
 
53
    close(MAXIMA_N);
 
54
    $i++;
 
55
}
 
56
 
 
57
close(INDEX);