#!/usr/bin/env perl use warnings; use diagnostics; use lib "../../lib"; use HotSaNICparser; # read global settings # $MODNAME=lc HotSaNICparser::get_module_name(); %CONFIG=HotSaNICparser::get_config("../.."); $IMAGEFORMAT=$CONFIG{"IMAGEFORMAT"}; $REFRESH=$CONFIG{"REFRESH"}; $REFRESH=0 if !defined $REFRESH; # read module-specific settings # undef %DEVS; foreach (HotSaNICparser::read_settings(".")) { ($var,$value)=HotSaNICparser::parse_line($_); if ($var eq "DRIVE") { ($dev,$name)=split(/,/,$value); $dev =~ s/SNMP:(.*):(.*):(.*)/$1:$3/; $DEVS{$dev}=$name; } } @DIAGRAMS=("hour", "day","week","month","year"); @TIMES=("week"); # build time-based .html files # foreach $time (@TIMES) { open (FILE,">index/$time.html"); print FILE "\n"; if ($REFRESH > 0) { print FILE " \n"; } print FILE "\n\n"; foreach $dev (sort keys(%DEVS)) { $name=$DEVS{$dev}; $file=$dev; $file=~ s/(\/|:)/_/g; print FILE" \n"; } print FILE "

",$dev,"


",$name,"
\n\n\n"; close FILE; } # build device-based .html files and complete index # open (IDXFILE,">idxdata"); print IDXFILE "0## ",$MODNAME,"
0## week
0##
0## \n"; $nn=0; foreach $dev (sort keys(%DEVS)) { $nn++; $name=$DEVS{$dev}; $file=$dev; $file=~ s/(\/|:)/_/g; print IDXFILE $nn,"## ",$nn,"## ",$dev,"
",$name,"\n"; # build device-based .html # open (FILE,">index/$file.html"); print FILE "\n"; if ($REFRESH > 0) { print FILE " \n"; } print FILE "\n"; foreach $diagram (@DIAGRAMS) { print FILE "\n"; } print FILE "\n\n"; close FILE; } close IDXFILE; WebSVN - hotsanic - Blame - Rev 9 - /trunk/modules/part/makeindex.pl
  jablonka.czprosek.czf

hotsanic

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

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1