[mrtg] [patch] indexmaker enhancements

Herold Heiko Heiko.Herold at previnet.it
Wed Apr 17 18:19:15 MEST 2002


Attached is a patch against indexmaker included in mrtg 2.9.18pre7 whith
some new options for enhanced configuration of the generated output.

Summary:

--headlevel=number  use <Hnumber> at top of page (default: 1)
configure the <H1> used to another number (<H3> or whatever)

--pageend=text      insert this text after the main body
similar to the existing --pagetop

--pagetopend=text   use this text for pagetop or pageend if undefined
set pageend and/or pagetop if not defined

--legend            add the Mrtg legend at the end of the page (default:
add)
default is (like currently) to use the legend, so --nolegend can be used if
wished

--compact           try to make a vertically more compact page
basically removes a couple of <BR>, sets the clickable border around the
pictures to 0 and uses <B> instead of <Hx> for the text at the top of the
page, in order to create a shorter page

--optlog            log the used command line in the page (default: log)
use --nooptlog to not log the command line used. Very usefull if you include
(with --pagetop for example) html code which could confuse some browser.

--sidebyside        place text and pictures side by side (default: lines)
default is text and pictures on different lines

--picfirst          place pictures before text (default: text first)
place the pictures above (or on the left with --sidebyside) of the text
instead of the opposite

--bold              use bold text (default: bold)
use --nobold to change the default

--clicktext         make the text link to the inner page (like the image)

--autoprefix        try to set prefix automatically
Usefull if you specify to indexmaker more than one config file which create
output in different directories, say /some/path/router1 and
/some/path/router2, with a index place in /some/path.
Logic for now is rather basic, it just tries to compare the path to the
output file (which MUST have been set with --output) and the Htmldir option
(if set) in the configuration files.
For now works well only if you place the output in a subdirectory of the
index, for example with
--output=/some/path
(first cfg file)  Htmldir = /some/path/routers/router1
(second cfg file) Htmldir = /some/path/routers/router2
 
--filesomething
for every option which takes text as argument (currently title, bodyopt,
pagetop, pageend, pagetopend) now you can specify --fileoption filename, the
whole content of the file will be read and used for the option. Thus
--pagetop='string' is like
echo 'string' >file ; ... --filepagetop=file
Usefull for long and complex text not easily specified on the command line.
Should be usefull for mrtg running on windows (with a more basic cmd.exe it
is more difficult to specify more complex text I suppose)


This needs testing by somebody who uses rtg with rddtool.
This needs testing on NT (especially the --autoprefix option).
Also I need to discover how to submit this for inclusion in the next release
of mrtg, but first I'd like some tests in different environments.
Bye
Heiko Herold

-- 
-- PREVINET S.p.A.            Heiko.Herold at previnet.it
-- Via Ferretto, 1            ph  x39-041-5907073
-- I-31021 Mogliano V.to (TV) fax x39-041-5907472
-- ITALY



-- Attached file removed by Listar and put at URL below --
-- Type: application/octet-stream
-- Size: 11k (11429 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/diff-indexmaker-2918pre7


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list