]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | #!/usr/local/bin/perl |
2 | # $Id$ | |
3 | # Ivana Hrivnacova 15.2.00 | |
4 | # | |
5 | # This script generates the class category page | |
6 | # from all *.h files found in the category directory | |
7 | ||
8 | # no test of arguments is performed | |
9 | $DIR = $ARGV[0]; | |
10 | $NAME = $ARGV[1]; | |
11 | ||
12 | # open output file | |
13 | $output = $ENV{'G4INSTALL'} . "/doc/HTML/" . $NAME . "Category.html"; | |
14 | open(OUTPUT, ">" . $output); | |
15 | ||
16 | print "Processing class category: " . $NAME . "\n"; | |
17 | ||
18 | # print the begining of file | |
19 | print OUTPUT "<HTML>\n"; | |
20 | print OUTPUT "\n"; | |
21 | print OUTPUT "<HEAD>\n"; | |
22 | print OUTPUT "<TITLE>Class category: ". $NAME . "</TITLE></HEAD>\n"; | |
23 | print OUTPUT "\n"; | |
24 | print OUTPUT "\n"; | |
25 | print OUTPUT "<BODY bgcolor=#FFFFFF>\n"; | |
26 | print OUTPUT "\n"; | |
27 | print OUTPUT "<!-- Header material -->\n"; | |
28 | print OUTPUT "<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">\n"; | |
29 | print OUTPUT " <tr bgcolor=#d0ffd0>\n"; | |
30 | print OUTPUT " <td align=left width=30%>\n"; | |
31 | print OUTPUT " <img alt=\"Alice\"\n"; | |
32 | print OUTPUT " src=\"http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif\"\n"; | |
33 | print OUTPUT " width=\"60\" height=\"60\" align=\"absmiddle\" border=1>\n"; | |
34 | print OUTPUT " <td align=center width=40%>\n"; | |
35 | print OUTPUT " <font size=\"+2\">\n"; | |
36 | print OUTPUT " Alice Geant4 Simulation <br> \n"; | |
37 | print OUTPUT " Geant4 Code </font>\n"; | |
38 | print OUTPUT " <td align=right width=30% valign=bottom>\n"; | |
39 | print OUTPUT " <font size=\"-1\">\n"; | |
40 | print OUTPUT " <script language=\"JavaScript\">\n"; | |
41 | print OUTPUT " document.write(\"Last modified \"+ document.lastModified)\n"; | |
42 | print OUTPUT " // end of script -->\n"; | |
43 | print OUTPUT " </script></font>\n"; | |
44 | print OUTPUT " </td>\n"; | |
45 | print OUTPUT " </tr>\n"; | |
46 | print OUTPUT "</table>\n"; | |
47 | print OUTPUT "<CENTER>\n"; | |
48 | print OUTPUT "<H2>Class category: " . $NAME . "</H2>\n"; | |
49 | print OUTPUT "</CENTER>\n"; | |
50 | print OUTPUT "\n"; | |
51 | print OUTPUT "<P><HR SIZE=5><BR>\n"; | |
52 | print OUTPUT "\n"; | |
53 | print OUTPUT "<UL><BR>\n"; | |
54 | print OUTPUT "\n"; | |
55 | print OUTPUT "<LI><STRONG>C++ header files:</STRONG>\n"; | |
56 | print OUTPUT "\n"; | |
57 | print OUTPUT " <UL>\n"; | |
58 | ||
59 | # print the linked header files | |
60 | #chdir $ENV{'AG4_INSTALL'} . "/source/" . $DIR; | |
61 | chdir $DIR; | |
62 | @FILELIST = `find . -name "*.h"`; | |
63 | @FILELIST = (@FILELIST, `find . -name "*.hh"`); | |
64 | ||
65 | foreach $FILEPATH (@FILELIST) { | |
66 | @TEMP = split('/',$FILEPATH); | |
67 | $FILE = @TEMP[@TEMP - 1]; | |
68 | chop $FILE; | |
69 | print " Linking file " . $FILE . "\n"; | |
70 | $HFILE = `echo $FILE | sed s/.hh/.h/g`; | |
71 | print OUTPUT " <LI><A HREF=\"" . $HFILE . ".html\">" . $FILE . "</A>\n"; | |
72 | } | |
73 | ||
74 | # print the end of file | |
75 | $today = localtime(time); | |
76 | $today =~ s/ \d\d:\d\d:\d\d / /; | |
77 | @list = getpwuid($<); | |
78 | $user = $list[6]; | |
79 | print OUTPUT "</UL>\n"; | |
80 | print OUTPUT "\n"; | |
81 | print OUTPUT "</UL>\n"; | |
82 | print OUTPUT "\n"; | |
83 | print OUTPUT "<P><HR SIZE=5>\n"; | |
84 | print OUTPUT "\n"; | |
85 | print OUTPUT "<ADDRESS>\n"; | |
86 | print OUTPUT "Created on $today by <B>$user</B> <BR>\n"; | |
87 | print OUTPUT "using the HTML generator\n"; | |
88 | print OUTPUT "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\">Ddl2Html description</A>\n"; | |
89 | print OUTPUT " (the source <A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.code\">Perl5 code</A>)\n"; | |
90 | print OUTPUT "</ADDRESS>\n"; | |
91 | print OUTPUT "\n"; | |
92 | print OUTPUT "</BODY bgcolor=#FFFFFF >\n"; | |
93 | print OUTPUT "\n"; | |
94 | print OUTPUT "</HTML>\n"; | |
95 | ||
96 | # close output file | |
97 | close(OUTPUT); |