jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [modules/] [routing2/] [makeindex.pl] - Blame information for rev 16

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2use warnings;
3use diagnostics;
4 
5use lib "../../lib";
6use HotSaNICparser;
7 
8# read global settings
9#
10$MODNAME=lc HotSaNICparser::get_module_name();
11 
12%CONFIG=HotSaNICparser::get_config("../..");
13$IMAGEFORMAT=$CONFIG{"IMAGEFORMAT"};
14$REFRESH=$CONFIG{"REFRESH"};
15$REFRESH=0 if !defined $REFRESH;
16 
17@DIAGRAMS=("hour","6h","day","week","month","year");
18@TIMES=("6h","week");
19 
20# build time-based .html files
21#
22foreach $time (@TIMES) {
23 open (FILE,">index/$time.html");
24 print FILE "<html>\n";
25 if ($REFRESH > 0) {
26 print FILE "<META HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
27 <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$REFRESH\">
28 <META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
29 }
30 print FILE "<body>\n<table>\n";
31 my $descr="Routing2";
32 my $page="routing2";
33 my $dev="routing2";
34 print FILE " <tr><td><a href=\"",$page,".html\"><img src=\"",$page,"-",$time,".",$IMAGEFORMAT,"\"></a></td>
35 <td valign=top><a href=\"",$page,".html\"><h2>",$dev,"</h2></a><br>",$descr,"</td></tr>\n";
36 print FILE "</table>\n</body>\n</html>\n";
37 close FILE;
38}
39 
40# build device-based .html files and complete index
41#
42open (IDXFILE,">idxdata");
43print IDXFILE "0## <td colspan=2 align=center valign=top> <font size=\"+3\">",$MODNAME,"</font><br>
440## <a href=\"",$MODNAME,"/6h.html\">6 hours</a>
450## <a href=\"",$MODNAME,"/week.html\">week</a><br>
460## <hr width=90%>
470## </td>\n";
48$nn=0;
49$nn++;
50my $descr="Routing2";
51my $page="routing2";
52my $dev="routing2";
53($page=$dev) =~ s/[.:]/_/g;
54print IDXFILE $nn,"## <td><a href=\"",$MODNAME,"/",$page,".html\"><img src=\"",$MODNAME,"/thumb-",$page,".",$IMAGEFORMAT,"\"></a></td>
55",$nn,"## <td valign=top><a href=\"",$MODNAME,"/",$page,".html\">",$dev,"</a><br><font size=\"-2\">",$descr,"</font></td>\n";
56 
57# build device-based .html
58#
59open (FILE,">index/$page.html");
60print FILE "<html>\n";
61if ($REFRESH > 0) {
62 print FILE "<META HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
63 <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$REFRESH\">
64 <META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
65}
66print FILE "<body>\n";
67foreach $diagram (@DIAGRAMS) {
68 print FILE "<img src=\"",$page,"-",$diagram,".",$IMAGEFORMAT,"\">\n";
69}
70print FILE "</body>\n</html>\n";
71close FILE;
72 
73close IDXFILE;
74 
75 

Powered by WebSVN 2.2.1