diff options
| -rw-r--r-- | .gitignore | 11 | ||||
| -rw-r--r-- | CHANGES (renamed from src/CHANGES) | 0 | ||||
| -rw-r--r-- | COPYING (renamed from src/COPYING) | 0 | ||||
| -rw-r--r-- | COPYRIGHT (renamed from src/COPYRIGHT) | 0 | ||||
| -rw-r--r-- | MANIFEST (renamed from src/MANIFEST) | 0 | ||||
| -rw-r--r-- | Makefile.NetWare (renamed from src/Makefile.NetWare) | 0 | ||||
| -rw-r--r-- | Makefile.Win32 (renamed from src/Makefile.Win32) | 0 | ||||
| -rw-r--r-- | Makefile.in (renamed from src/Makefile.in) | 0 | ||||
| -rw-r--r-- | README (renamed from src/README) | 0 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | THANKS (renamed from src/THANKS) | 0 | ||||
| -rwxr-xr-x | bin/cfgmaker (renamed from src/bin/cfgmaker) | 0 | ||||
| -rwxr-xr-x | bin/indexmaker (renamed from src/bin/indexmaker) | 0 | ||||
| -rwxr-xr-x | bin/mrtg (renamed from src/bin/mrtg) | 0 | ||||
| -rwxr-xr-x | bin/mrtg-traffic-sum (renamed from src/bin/mrtg-traffic-sum) | 0 | ||||
| -rw-r--r-- | config.h.in (renamed from src/config.h.in) | 0 | ||||
| -rwxr-xr-x | configure (renamed from src/configure) | 0 | ||||
| -rw-r--r-- | configure.in (renamed from src/configure.in) | 0 | ||||
| -rw-r--r-- | contrib/00INDEX (renamed from src/contrib/00INDEX) | 0 | ||||
| -rw-r--r-- | contrib/14all/README (renamed from src/contrib/14all/README) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/COPYING (renamed from src/contrib/GetSNMPLinesUP/COPYING) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/COPYRIGHT (renamed from src/contrib/GetSNMPLinesUP/COPYRIGHT) | 0 | ||||
| -rwxr-xr-x | contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl (renamed from src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/INSTALL (renamed from src/contrib/GetSNMPLinesUP/INSTALL) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/Makefile (renamed from src/contrib/GetSNMPLinesUP/Makefile) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/ModemTable.dial-machine (renamed from src/contrib/GetSNMPLinesUP/ModemTable.dial-machine) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/README (renamed from src/contrib/GetSNMPLinesUP/README) | 0 | ||||
| -rw-r--r-- | contrib/GetSNMPLinesUP/sample.cfg (renamed from src/contrib/GetSNMPLinesUP/sample.cfg) | 0 | ||||
| -rw-r--r-- | contrib/IxDisk/README (renamed from src/contrib/IxDisk/README) | 0 | ||||
| -rwxr-xr-x | contrib/IxDisk/ixdisk.cfg (renamed from src/contrib/IxDisk/ixdisk.cfg) | 0 | ||||
| -rwxr-xr-x | contrib/IxDisk/ixdisk.pl (renamed from src/contrib/IxDisk/ixdisk.pl) | 0 | ||||
| -rw-r--r-- | contrib/NSI/Mrtg_nsi (renamed from src/contrib/NSI/Mrtg_nsi) | 0 | ||||
| -rw-r--r-- | contrib/NSI/Mrtg_nsi.cfg (renamed from src/contrib/NSI/Mrtg_nsi.cfg) | 0 | ||||
| -rw-r--r-- | contrib/NSI/mrtg-nsi-msg.txt (renamed from src/contrib/NSI/mrtg-nsi-msg.txt) | 0 | ||||
| -rw-r--r-- | contrib/PMLines/PMLines.pl (renamed from src/contrib/PMLines/PMLines.pl) | 0 | ||||
| -rw-r--r-- | contrib/PMLines/README (renamed from src/contrib/PMLines/README) | 0 | ||||
| -rw-r--r-- | contrib/PMLines/mrtg.cfg-demo (renamed from src/contrib/PMLines/mrtg.cfg-demo) | 0 | ||||
| -rw-r--r-- | contrib/TCH/README (renamed from src/contrib/TCH/README) | 0 | ||||
| -rw-r--r-- | contrib/TCH/dualpri.pl (renamed from src/contrib/TCH/dualpri.pl) | 0 | ||||
| -rw-r--r-- | contrib/TCH/dualt1.pl (renamed from src/contrib/TCH/dualt1.pl) | 0 | ||||
| -rw-r--r-- | contrib/TCH/hiperdsp.pl (renamed from src/contrib/TCH/hiperdsp.pl) | 0 | ||||
| -rw-r--r-- | contrib/TCH/mrtg.cfg (renamed from src/contrib/TCH/mrtg.cfg) | 0 | ||||
| -rw-r--r-- | contrib/TTrafic/TTraffic.asp (renamed from src/contrib/TTrafic/TTraffic.asp) | 0 | ||||
| -rw-r--r-- | contrib/TTrafic/gpl.txt (renamed from src/contrib/TTrafic/gpl.txt) | 0 | ||||
| -rw-r--r-- | contrib/TTrafic/readme.txt (renamed from src/contrib/TTrafic/readme.txt) | 0 | ||||
| -rw-r--r-- | contrib/TotalControlModem/example.txt (renamed from src/contrib/TotalControlModem/example.txt) | 0 | ||||
| -rw-r--r-- | contrib/accesslistmon/INSTALL (renamed from src/contrib/accesslistmon/INSTALL) | 0 | ||||
| -rw-r--r-- | contrib/accesslistmon/README (renamed from src/contrib/accesslistmon/README) | 0 | ||||
| -rwxr-xr-x | contrib/accesslistmon/examplescript (renamed from src/contrib/accesslistmon/examplescript) | 0 | ||||
| -rw-r--r-- | contrib/accesslistmon/mrtg.cfg (renamed from src/contrib/accesslistmon/mrtg.cfg) | 0 | ||||
| -rwxr-xr-x | contrib/adm-mrtg/adm-mrtg (renamed from src/contrib/adm-mrtg/adm-mrtg) | 0 | ||||
| -rw-r--r-- | contrib/adm-mrtg/adm-mrtg.README (renamed from src/contrib/adm-mrtg/adm-mrtg.README) | 0 | ||||
| -rw-r--r-- | contrib/apc_ups/README (renamed from src/contrib/apc_ups/README) | 0 | ||||
| -rw-r--r-- | contrib/apc_ups/ups.cfg (renamed from src/contrib/apc_ups/ups.cfg) | 0 | ||||
| -rw-r--r-- | contrib/apc_ups/upsdata01.pl (renamed from src/contrib/apc_ups/upsdata01.pl) | 0 | ||||
| -rw-r--r-- | contrib/ascendget/ascendget (renamed from src/contrib/ascendget/ascendget) | 0 | ||||
| -rw-r--r-- | contrib/atmmaker/atmmaker (renamed from src/contrib/atmmaker/atmmaker) | 0 | ||||
| -rw-r--r-- | contrib/cfgmaker_ATM/README (renamed from src/contrib/cfgmaker_ATM/README) | 0 | ||||
| -rw-r--r-- | contrib/cfgmaker_ATM/cfgmaker_atm.pl (renamed from src/contrib/cfgmaker_ATM/cfgmaker_atm.pl) | 0 | ||||
| -rw-r--r-- | contrib/cfgmaker_cisco/README (renamed from src/contrib/cfgmaker_cisco/README) | 0 | ||||
| -rw-r--r-- | contrib/cfgmaker_cisco/cfgmaker.cisco (renamed from src/contrib/cfgmaker_cisco/cfgmaker.cisco) | 0 | ||||
| -rw-r--r-- | contrib/cfgmaker_dlci/cfgmaker_dlci (renamed from src/contrib/cfgmaker_dlci/cfgmaker_dlci) | 0 | ||||
| -rw-r--r-- | contrib/cisco_BPX_MGX/howto.html (renamed from src/contrib/cisco_BPX_MGX/howto.html) | 0 | ||||
| -rw-r--r-- | contrib/cisco_ipaccounting/CHANGELOG (renamed from src/contrib/cisco_ipaccounting/CHANGELOG) | 0 | ||||
| -rw-r--r-- | contrib/cisco_ipaccounting/README (renamed from src/contrib/cisco_ipaccounting/README) | 0 | ||||
| -rw-r--r-- | contrib/cisco_ipaccounting/TODO (renamed from src/contrib/cisco_ipaccounting/TODO) | 0 | ||||
| -rwxr-xr-x | contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl (renamed from src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl) | 0 | ||||
| -rw-r--r-- | contrib/cisco_ipaccounting/networks (renamed from src/contrib/cisco_ipaccounting/networks) | 0 | ||||
| -rw-r--r-- | contrib/cisco_tftp/scarfconf.pl (renamed from src/contrib/cisco_tftp/scarfconf.pl) | 0 | ||||
| -rw-r--r-- | contrib/ciscoindex/README (renamed from src/contrib/ciscoindex/README) | 0 | ||||
| -rw-r--r-- | contrib/ciscoindex/ciscoindex.pl (renamed from src/contrib/ciscoindex/ciscoindex.pl) | 0 | ||||
| -rw-r--r-- | contrib/cpuinfo/README (renamed from src/contrib/cpuinfo/README) | 0 | ||||
| -rwxr-xr-x | contrib/cpuinfo/cpuinfo.pl (renamed from src/contrib/cpuinfo/cpuinfo.pl) | 0 | ||||
| -rw-r--r-- | contrib/cpuinfo/sample.cfg (renamed from src/contrib/cpuinfo/sample.cfg) | 0 | ||||
| -rw-r--r-- | contrib/cpumon/README (renamed from src/contrib/cpumon/README) | 0 | ||||
| -rw-r--r-- | contrib/cpumon/cpumon.pl (renamed from src/contrib/cpumon/cpumon.pl) | 0 | ||||
| -rw-r--r-- | contrib/diskmon/README (renamed from src/contrib/diskmon/README) | 0 | ||||
| -rw-r--r-- | contrib/diskmon/getdisk.pl (renamed from src/contrib/diskmon/getdisk.pl) | 0 | ||||
| -rw-r--r-- | contrib/diskmon/sample.cfg (renamed from src/contrib/diskmon/sample.cfg) | 0 | ||||
| -rw-r--r-- | contrib/diskmon/showdisk.pl (renamed from src/contrib/diskmon/showdisk.pl) | 0 | ||||
| -rw-r--r-- | contrib/distrib/distrib.c (renamed from src/contrib/distrib/distrib.c) | 0 | ||||
| -rwxr-xr-x | contrib/distrib/distrib.pl (renamed from src/contrib/distrib/distrib.pl) | 0 | ||||
| -rw-r--r-- | contrib/distrib/readme.txt (renamed from src/contrib/distrib/readme.txt) | 0 | ||||
| -rw-r--r-- | contrib/gentcucci-1.0.0/README (renamed from src/contrib/gentcucci-1.0.0/README) | 0 | ||||
| -rwxr-xr-x | contrib/gentcucci-1.0.0/gentcucci (renamed from src/contrib/gentcucci-1.0.0/gentcucci) | 0 | ||||
| -rw-r--r-- | contrib/gentcucci-1.0.0/gwcs.list (renamed from src/contrib/gentcucci-1.0.0/gwcs.list) | 0 | ||||
| -rwxr-xr-x | contrib/gentcucci-1.0.0/mrtg_autorun (renamed from src/contrib/gentcucci-1.0.0/mrtg_autorun) | 0 | ||||
| -rw-r--r-- | contrib/gentcucci-1.0.0/nmcs.list (renamed from src/contrib/gentcucci-1.0.0/nmcs.list) | 0 | ||||
| -rwxr-xr-x | contrib/gentcucci-1.0.0/tcnowstat (renamed from src/contrib/gentcucci-1.0.0/tcnowstat) | 0 | ||||
| -rwxr-xr-x | contrib/gentcucci-1.0.0/tcnowtemp (renamed from src/contrib/gentcucci-1.0.0/tcnowtemp) | 0 | ||||
| -rw-r--r-- | contrib/get-active/README (renamed from src/contrib/get-active/README) | 0 | ||||
| -rw-r--r-- | contrib/get-active/get-active.pl (renamed from src/contrib/get-active/get-active.pl) | 0 | ||||
| -rw-r--r-- | contrib/get-active/get-active2.pl (renamed from src/contrib/get-active/get-active2.pl) | 0 | ||||
| -rw-r--r-- | contrib/get-equi/README (renamed from src/contrib/get-equi/README) | 0 | ||||
| -rw-r--r-- | contrib/get-equi/get-equi.pl (renamed from src/contrib/get-equi/get-equi.pl) | 0 | ||||
| -rw-r--r-- | contrib/get-multiserial/get-modems-remote.pl (renamed from src/contrib/get-multiserial/get-modems-remote.pl) | 0 | ||||
| -rw-r--r-- | contrib/get-multiserial/get-modems.pl (renamed from src/contrib/get-multiserial/get-modems.pl) | 0 | ||||
| -rw-r--r-- | contrib/ipchainacc/README (renamed from src/contrib/ipchainacc/README) | 0 | ||||
| -rw-r--r-- | contrib/ipchainacc/ipchainacc (renamed from src/contrib/ipchainacc/ipchainacc) | 0 | ||||
| -rw-r--r-- | contrib/ipchains/README (renamed from src/contrib/ipchains/README) | 0 | ||||
| -rwxr-xr-x | contrib/ipchains/ipchainacc (renamed from src/contrib/ipchains/ipchainacc) | 0 | ||||
| -rwxr-xr-x | contrib/ipchains/ipchainacc.rules (renamed from src/contrib/ipchains/ipchainacc.rules) | 0 | ||||
| -rw-r--r-- | contrib/ipfilter/fw.pl (renamed from src/contrib/ipfilter/fw.pl) | 0 | ||||
| -rw-r--r-- | contrib/ipfilter/ip-filter.readme (renamed from src/contrib/ipfilter/ip-filter.readme) | 0 | ||||
| -rw-r--r-- | contrib/iptables-accounting/README (renamed from src/contrib/iptables-accounting/README) | 0 | ||||
| -rwxr-xr-x | contrib/iptables-accounting/iptables-accounting (renamed from src/contrib/iptables-accounting/iptables-accounting) | 0 | ||||
| -rw-r--r-- | contrib/iptables_acc/README (renamed from src/contrib/iptables_acc/README) | 0 | ||||
| -rwxr-xr-x | contrib/iptables_acc/iptables_acc (renamed from src/contrib/iptables_acc/iptables_acc) | 0 | ||||
| -rw-r--r-- | contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt (renamed from src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt) | 0 | ||||
| -rw-r--r-- | contrib/iptables_acc_snmp/README (renamed from src/contrib/iptables_acc_snmp/README) | 0 | ||||
| -rwxr-xr-x | contrib/iptables_acc_snmp/iptables_acc_snmp (renamed from src/contrib/iptables_acc_snmp/iptables_acc_snmp) | 0 | ||||
| -rw-r--r-- | contrib/ircstats/README (renamed from src/contrib/ircstats/README) | 0 | ||||
| -rw-r--r-- | contrib/ircstats/ircstats.pl (renamed from src/contrib/ircstats/ircstats.pl) | 0 | ||||
| -rw-r--r-- | contrib/ircstats2/README (renamed from src/contrib/ircstats2/README) | 0 | ||||
| -rwxr-xr-x | contrib/ircstats2/crontab.script (renamed from src/contrib/ircstats2/crontab.script) | 0 | ||||
| -rw-r--r-- | contrib/ircstats2/example.cf (renamed from src/contrib/ircstats2/example.cf) | 0 | ||||
| -rwxr-xr-x | contrib/ircstats2/ircstats2.pl (renamed from src/contrib/ircstats2/ircstats2.pl) | 0 | ||||
| -rw-r--r-- | contrib/jm/README (renamed from src/contrib/jm/README) | 0 | ||||
| -rwxr-xr-x | contrib/jm/finger-mrtg.pl (renamed from src/contrib/jm/finger-mrtg.pl) | 0 | ||||
| -rw-r--r-- | contrib/jm/mrtg-jm.tar.gz (renamed from src/contrib/jm/mrtg-jm.tar.gz) | bin | 1391 -> 1391 bytes | |||
| -rw-r--r-- | contrib/jm/news-mrtg.pl (renamed from src/contrib/jm/news-mrtg.pl) | 0 | ||||
| -rwxr-xr-x | contrib/jm/quake-mrtg.pl (renamed from src/contrib/jm/quake-mrtg.pl) | 0 | ||||
| -rw-r--r-- | contrib/linux_stat/linux_stats.pl (renamed from src/contrib/linux_stat/linux_stats.pl) | 0 | ||||
| -rw-r--r-- | contrib/linux_stat/readme (renamed from src/contrib/linux_stat/readme) | 0 | ||||
| -rw-r--r-- | contrib/meminfo/README (renamed from src/contrib/meminfo/README) | 0 | ||||
| -rw-r--r-- | contrib/meminfo/memory.pl (renamed from src/contrib/meminfo/memory.pl) | 0 | ||||
| -rw-r--r-- | contrib/monitor/Monitor.mdb (renamed from src/contrib/monitor/Monitor.mdb) | bin | 110592 -> 110592 bytes | |||
| -rw-r--r-- | contrib/monitor/config.asp (renamed from src/contrib/monitor/config.asp) | 0 | ||||
| -rw-r--r-- | contrib/monitor/default.asp (renamed from src/contrib/monitor/default.asp) | 0 | ||||
| -rw-r--r-- | contrib/monitor/global.asa (renamed from src/contrib/monitor/global.asa) | 0 | ||||
| -rw-r--r-- | contrib/monitor/global/main.css (renamed from src/contrib/monitor/global/main.css) | 0 | ||||
| -rw-r--r-- | contrib/monitor/images/mrtg-l.gif (renamed from src/contrib/monitor/images/mrtg-l.gif) | bin | 343 -> 343 bytes | |||
| -rw-r--r-- | contrib/monitor/images/mrtg-m.gif (renamed from src/contrib/monitor/images/mrtg-m.gif) | bin | 1144 -> 1144 bytes | |||
| -rw-r--r-- | contrib/monitor/images/mrtg-r.gif (renamed from src/contrib/monitor/images/mrtg-r.gif) | bin | 1779 -> 1779 bytes | |||
| -rw-r--r-- | contrib/monitor/images/mrtg-ti.gif (renamed from src/contrib/monitor/images/mrtg-ti.gif) | bin | 4696 -> 4696 bytes | |||
| -rw-r--r-- | contrib/monitor/images/msie.gif (renamed from src/contrib/monitor/images/msie.gif) | bin | 9132 -> 9132 bytes | |||
| -rw-r--r-- | contrib/monitor/images/msprod.gif (renamed from src/contrib/monitor/images/msprod.gif) | bin | 15856 -> 15856 bytes | |||
| -rw-r--r-- | contrib/monitor/images/spacer.gif (renamed from src/contrib/monitor/images/spacer.gif) | bin | 43 -> 43 bytes | |||
| -rw-r--r-- | contrib/monitor/login.asp (renamed from src/contrib/monitor/login.asp) | 0 | ||||
| -rw-r--r-- | contrib/monitor/monitor.html (renamed from src/contrib/monitor/monitor.html) | 0 | ||||
| -rw-r--r-- | contrib/monitor/monitor.inc (renamed from src/contrib/monitor/monitor.inc) | 0 | ||||
| -rw-r--r-- | contrib/monitor/readme.txt (renamed from src/contrib/monitor/readme.txt) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver-script/README (renamed from src/contrib/mrtg-archiver-script/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver-script/index.html (renamed from src/contrib/mrtg-archiver-script/index.html) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-archiver-script/mrtg-archiver (renamed from src/contrib/mrtg-archiver-script/mrtg-archiver) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-archiver-script/mrtgnav (renamed from src/contrib/mrtg-archiver-script/mrtgnav) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver-script/to-crontab (renamed from src/contrib/mrtg-archiver-script/to-crontab) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver/README (renamed from src/contrib/mrtg-archiver/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver/backup.pl (renamed from src/contrib/mrtg-archiver/backup.pl) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-archiver/mrtg.archive.conf (renamed from src/contrib/mrtg-archiver/mrtg.archive.conf) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-archiver/mrtg.archive.pl (renamed from src/contrib/mrtg-archiver/mrtg.archive.pl) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/COPYING (renamed from src/contrib/mrtg-blast/COPYING) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/COPYRIGHT (renamed from src/contrib/mrtg-blast/COPYRIGHT) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/INSTALL (renamed from src/contrib/mrtg-blast/INSTALL) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/README (renamed from src/contrib/mrtg-blast/README) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-blast/mrtg-blast (renamed from src/contrib/mrtg-blast/mrtg-blast) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/mrtg-blast.cfg (renamed from src/contrib/mrtg-blast/mrtg-blast.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-blast/tcpblast.c (renamed from src/contrib/mrtg-blast/tcpblast.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/Changes (renamed from src/contrib/mrtg-dynip/Changes) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/FAQ (renamed from src/contrib/mrtg-dynip/FAQ) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/Install (renamed from src/contrib/mrtg-dynip/Install) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/README (renamed from src/contrib/mrtg-dynip/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/TODO (renamed from src/contrib/mrtg-dynip/TODO) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-dynip/mrtg-dynip (renamed from src/contrib/mrtg-dynip/mrtg-dynip) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-dynip/mrtg-dynip-sydnet (renamed from src/contrib/mrtg-dynip/mrtg-dynip-sydnet) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-ipacc/README (renamed from src/contrib/mrtg-ipacc/README) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-ipacc/ipacc (renamed from src/contrib/mrtg-ipacc/ipacc) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-ipacc/ipfwadm-wrapper (renamed from src/contrib/mrtg-ipacc/ipfwadm-wrapper) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-ipget/README (renamed from src/contrib/mrtg-ipget/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-ipget/mrtg-ipget.patch (renamed from src/contrib/mrtg-ipget/mrtg-ipget.patch) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/README (renamed from src/contrib/mrtg-mail/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/inetd.conf-dist (renamed from src/contrib/mrtg-mail/inetd.conf-dist) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-mail/mailstats (renamed from src/contrib/mrtg-mail/mailstats) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/mailstats-alternate (renamed from src/contrib/mrtg-mail/mailstats-alternate) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/mailstats-horowitz (renamed from src/contrib/mrtg-mail/mailstats-horowitz) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/mailstats.cfg (renamed from src/contrib/mrtg-mail/mailstats.cfg) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-mail/mqueue (renamed from src/contrib/mrtg-mail/mqueue) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/mqueue.cfg (renamed from src/contrib/mrtg-mail/mqueue.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-mail/services-dist (renamed from src/contrib/mrtg-mail/services-dist) | 0 | ||||
| -rwxr-xr-x | contrib/mrtg-mail/smtp-stats (renamed from src/contrib/mrtg-mail/smtp-stats) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-startup-script/README (renamed from src/contrib/mrtg-startup-script/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtg-startup-script/mrtg (renamed from src/contrib/mrtg-startup-script/mrtg) | 0 | ||||
| -rw-r--r-- | contrib/mrtg.php/README.txt (renamed from src/contrib/mrtg.php/README.txt) | 0 | ||||
| -rw-r--r-- | contrib/mrtg.php/mrtg.php (renamed from src/contrib/mrtg.php/mrtg.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/conf/config.inc.php (renamed from src/contrib/mrtg_php_portal/conf/config.inc.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/readme.txt (renamed from src/contrib/mrtg_php_portal/readme.txt) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/update.pl (renamed from src/contrib/mrtg_php_portal/update.pl) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/admin.php (renamed from src/contrib/mrtg_php_portal/www/admin.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/index.php (renamed from src/contrib/mrtg_php_portal/www/index.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/login.php (renamed from src/contrib/mrtg_php_portal/www/login.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/remove.php (renamed from src/contrib/mrtg_php_portal/www/remove.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/setup.php (renamed from src/contrib/mrtg_php_portal/www/setup.php) | 0 | ||||
| -rw-r--r-- | contrib/mrtg_php_portal/www/update.php (renamed from src/contrib/mrtg_php_portal/www/update.php) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgidx/mrtgidx (renamed from src/contrib/mrtgidx/mrtgidx) | 0 | ||||
| -rw-r--r-- | contrib/mrtgindex.cgi/README (renamed from src/contrib/mrtgindex.cgi/README) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgindex.cgi/mrtgindx.cgi (renamed from src/contrib/mrtgindex.cgi/mrtgindx.cgi) | 0 | ||||
| -rw-r--r-- | contrib/mrtglog/README (renamed from src/contrib/mrtglog/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtglog/mrtglog.c (renamed from src/contrib/mrtglog/mrtglog.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtglog/mrtglog.h (renamed from src/contrib/mrtglog/mrtglog.h) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/192.168.10.1.cfg (renamed from src/contrib/mrtgmk/cfg/192.168.10.1.cfg) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgmk/cfg/EXAMPLE1 (renamed from src/contrib/mrtgmk/cfg/EXAMPLE1) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/a.cfg (renamed from src/contrib/mrtgmk/cfg/a.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/alias.cfg (renamed from src/contrib/mrtgmk/cfg/alias.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/convert.cfg (renamed from src/contrib/mrtgmk/cfg/convert.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/hosts.cfg (renamed from src/contrib/mrtgmk/cfg/hosts.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/links.cfg (renamed from src/contrib/mrtgmk/cfg/links.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/misc.cfg (renamed from src/contrib/mrtgmk/cfg/misc.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/mrtg.cfg (renamed from src/contrib/mrtgmk/cfg/mrtg.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/mrtg_cfg (renamed from src/contrib/mrtgmk/cfg/mrtg_cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/page1.cfg (renamed from src/contrib/mrtgmk/cfg/page1.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/page1.html (renamed from src/contrib/mrtgmk/cfg/page1.html) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/page2.cfg (renamed from src/contrib/mrtgmk/cfg/page2.cfg) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/page2.html (renamed from src/contrib/mrtgmk/cfg/page2.html) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/cfg/today.html (renamed from src/contrib/mrtgmk/cfg/today.html) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/doc/commands (renamed from src/contrib/mrtgmk/doc/commands) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/doc/readme.1st (renamed from src/contrib/mrtgmk/doc/readme.1st) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/readme.1st (renamed from src/contrib/mrtgmk/readme.1st) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgmk/smrtgmk (renamed from src/contrib/mrtgmk/smrtgmk) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/alias.c (renamed from src/contrib/mrtgmk/src/alias.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/defhost.c (renamed from src/contrib/mrtgmk/src/defhost.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/fnct0.c (renamed from src/contrib/mrtgmk/src/fnct0.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/fnctn.c (renamed from src/contrib/mrtgmk/src/fnctn.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/gif.c (renamed from src/contrib/mrtgmk/src/gif.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/html.c (renamed from src/contrib/mrtgmk/src/html.c) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgmk/src/mkm (renamed from src/contrib/mrtgmk/src/mkm) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/mrtgmk.c (renamed from src/contrib/mrtgmk/src/mrtgmk.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parse.c (renamed from src/contrib/mrtgmk/src/parse.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parse.ftbl (renamed from src/contrib/mrtgmk/src/parse.ftbl) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parse0.c (renamed from src/contrib/mrtgmk/src/parse0.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parse0.ftbl (renamed from src/contrib/mrtgmk/src/parse0.ftbl) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parsen.c (renamed from src/contrib/mrtgmk/src/parsen.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/parsen.ftbl (renamed from src/contrib/mrtgmk/src/parsen.ftbl) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/txte.h (renamed from src/contrib/mrtgmk/src/txte.h) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/txtro.h (renamed from src/contrib/mrtgmk/src/txtro.h) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/util.c (renamed from src/contrib/mrtgmk/src/util.c) | 0 | ||||
| -rw-r--r-- | contrib/mrtgmk/src/vars.h (renamed from src/contrib/mrtgmk/src/vars.h) | 0 | ||||
| -rw-r--r-- | contrib/mrtgrq/Net-Telnet-3.02.tar.gz (renamed from src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz) | bin | 30946 -> 30946 bytes | |||
| -rw-r--r-- | contrib/mrtgrq/README (renamed from src/contrib/mrtgrq/README) | 0 | ||||
| -rw-r--r-- | contrib/mrtgrq/cubprev.gif (renamed from src/contrib/mrtgrq/cubprev.gif) | bin | 1648 -> 1648 bytes | |||
| -rwxr-xr-x | contrib/mrtgrq/getreport.pl (renamed from src/contrib/mrtgrq/getreport.pl) | 0 | ||||
| -rw-r--r-- | contrib/mrtgrq/grnball.gif (renamed from src/contrib/mrtgrq/grnball.gif) | bin | 883 -> 883 bytes | |||
| -rw-r--r-- | contrib/mrtgrq/make-mrtg.cfg.awk (renamed from src/contrib/mrtgrq/make-mrtg.cfg.awk) | 0 | ||||
| -rwxr-xr-x | contrib/mrtgrq/mrtgrq (renamed from src/contrib/mrtgrq/mrtgrq) | 0 | ||||
| -rw-r--r-- | contrib/mrtgrq/mrtgrq.css (renamed from src/contrib/mrtgrq/mrtgrq.css) | 0 | ||||
| -rw-r--r-- | contrib/mrtgrq/redball.gif (renamed from src/contrib/mrtgrq/redball.gif) | bin | 881 -> 881 bytes | |||
| -rw-r--r-- | contrib/net-hosts/README (renamed from src/contrib/net-hosts/README) | 0 | ||||
| -rw-r--r-- | contrib/net-hosts/cubprev.gif (renamed from src/contrib/net-hosts/cubprev.gif) | bin | 1648 -> 1648 bytes | |||
| -rw-r--r-- | contrib/net-hosts/grnball.gif (renamed from src/contrib/net-hosts/grnball.gif) | bin | 883 -> 883 bytes | |||
| -rw-r--r-- | contrib/net-hosts/internet (renamed from src/contrib/net-hosts/internet) | 0 | ||||
| -rw-r--r-- | contrib/net-hosts/make-mrtg.cfg.awk (renamed from src/contrib/net-hosts/make-mrtg.cfg.awk) | 0 | ||||
| -rwxr-xr-x | contrib/net-hosts/net-hosts (renamed from src/contrib/net-hosts/net-hosts) | 0 | ||||
| -rw-r--r-- | contrib/net-hosts/net-hosts.css (renamed from src/contrib/net-hosts/net-hosts.css) | 0 | ||||
| -rw-r--r-- | contrib/net-hosts/redball.gif (renamed from src/contrib/net-hosts/redball.gif) | bin | 881 -> 881 bytes | |||
| -rw-r--r-- | contrib/nt-services/5mrtg.exe (renamed from src/contrib/nt-services/5mrtg.exe) | bin | 73728 -> 73728 bytes | |||
| -rw-r--r-- | contrib/nt-services/5mrtg.reg (renamed from src/contrib/nt-services/5mrtg.reg) | 0 | ||||
| -rw-r--r-- | contrib/nt-services/README (renamed from src/contrib/nt-services/README) | 0 | ||||
| -rw-r--r-- | contrib/nt-services/install.cmd (renamed from src/contrib/nt-services/install.cmd) | 0 | ||||
| -rw-r--r-- | contrib/nt-services/mrtg-etc.zip (renamed from src/contrib/nt-services/mrtg-etc.zip) | bin | 16304 -> 16304 bytes | |||
| -rw-r--r-- | contrib/nt_n_cisco/README (renamed from src/contrib/nt_n_cisco/README) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/RUN_builder.bat (renamed from src/contrib/nt_n_cisco/RUN_builder.bat) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/RunCcfgs.cmd (renamed from src/contrib/nt_n_cisco/RunCcfgs.cmd) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/builder.bat (renamed from src/contrib/nt_n_cisco/builder.bat) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/cisco_devices_to_poll.txt (renamed from src/contrib/nt_n_cisco/cisco_devices_to_poll.txt) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/default.asp (renamed from src/contrib/nt_n_cisco/default.asp) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/make_all_cisco_configs.bat (renamed from src/contrib/nt_n_cisco/make_all_cisco_configs.bat) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/nt_template.cfg (renamed from src/contrib/nt_n_cisco/nt_template.cfg) | 0 | ||||
| -rw-r--r-- | contrib/nt_n_cisco/queryone.bat (renamed from src/contrib/nt_n_cisco/queryone.bat) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/README (renamed from src/contrib/ovmrtg/README) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/buildht (renamed from src/contrib/ovmrtg/buildht) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/buildrtov (renamed from src/contrib/ovmrtg/buildrtov) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/cfgmakerov (renamed from src/contrib/ovmrtg/cfgmakerov) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/index (renamed from src/contrib/ovmrtg/index) | 0 | ||||
| -rwxr-xr-x | contrib/ovmrtg/installov (renamed from src/contrib/ovmrtg/installov) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/installov.cmds (renamed from src/contrib/ovmrtg/installov.cmds) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/installov.pl (renamed from src/contrib/ovmrtg/installov.pl) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/mrtgmenu (renamed from src/contrib/ovmrtg/mrtgmenu) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/newrtrov.txt (renamed from src/contrib/ovmrtg/newrtrov.txt) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovadd (renamed from src/contrib/ovmrtg/ovadd) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovcols (renamed from src/contrib/ovmrtg/ovcols) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovcullfile (renamed from src/contrib/ovmrtg/ovcullfile) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovcvtfile (renamed from src/contrib/ovmrtg/ovcvtfile) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovdel (renamed from src/contrib/ovmrtg/ovdel) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/oveval.txt (renamed from src/contrib/ovmrtg/oveval.txt) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovin (renamed from src/contrib/ovmrtg/ovin) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovmrtg.pm (renamed from src/contrib/ovmrtg/ovmrtg.pm) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovsho (renamed from src/contrib/ovmrtg/ovsho) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovsysnms (renamed from src/contrib/ovmrtg/ovsysnms) | 0 | ||||
| -rwxr-xr-x | contrib/ovmrtg/ovtgts (renamed from src/contrib/ovmrtg/ovtgts) | bin | 24591 -> 24591 bytes | |||
| -rw-r--r-- | contrib/ovmrtg/ovtst (renamed from src/contrib/ovmrtg/ovtst) | 0 | ||||
| -rw-r--r-- | contrib/ovmrtg/ovupdate (renamed from src/contrib/ovmrtg/ovupdate) | 0 | ||||
| -rw-r--r-- | contrib/ping-probe/README (renamed from src/contrib/ping-probe/README) | 0 | ||||
| -rw-r--r-- | contrib/portmasters/README (renamed from src/contrib/portmasters/README) | 0 | ||||
| -rw-r--r-- | contrib/portmasters/gather (renamed from src/contrib/portmasters/gather) | 0 | ||||
| -rw-r--r-- | contrib/portmasters/portm.cfg (renamed from src/contrib/portmasters/portm.cfg) | 0 | ||||
| -rw-r--r-- | contrib/procmem/README (renamed from src/contrib/procmem/README) | 0 | ||||
| -rwxr-xr-x | contrib/procmem/create-cfg-mem.pl (renamed from src/contrib/procmem/create-cfg-mem.pl) | 0 | ||||
| -rwxr-xr-x | contrib/procmem/create-cfg-proc.pl (renamed from src/contrib/procmem/create-cfg-proc.pl) | 0 | ||||
| -rwxr-xr-x | contrib/procmem/getmem.pl (renamed from src/contrib/procmem/getmem.pl) | 0 | ||||
| -rwxr-xr-x | contrib/procmem/getproc.pl (renamed from src/contrib/procmem/getproc.pl) | 0 | ||||
| -rwxr-xr-x | contrib/rdlog2/rdlog2.c (renamed from src/contrib/rdlog2/rdlog2.c) | 0 | ||||
| -rwxr-xr-x | contrib/rdlog2/readme.html (renamed from src/contrib/rdlog2/readme.html) | 0 | ||||
| -rwxr-xr-x | contrib/rdlog2/wan.fig (renamed from src/contrib/rdlog2/wan.fig) | 0 | ||||
| -rw-r--r-- | contrib/routers/README (renamed from src/contrib/routers/README) | 0 | ||||
| -rw-r--r-- | contrib/rumb-stat/README (renamed from src/contrib/rumb-stat/README) | 0 | ||||
| -rw-r--r-- | contrib/rumb-stat/gethttpstats (renamed from src/contrib/rumb-stat/gethttpstats) | 0 | ||||
| -rw-r--r-- | contrib/rumb-stat/getsquidstats (renamed from src/contrib/rumb-stat/getsquidstats) | 0 | ||||
| -rw-r--r-- | contrib/snmpping/README (renamed from src/contrib/snmpping/README) | 0 | ||||
| -rwxr-xr-x | contrib/snmpping/snmpping.pl (renamed from src/contrib/snmpping/snmpping.pl) | 0 | ||||
| -rw-r--r-- | contrib/stat/README (renamed from src/contrib/stat/README) | 0 | ||||
| -rwxr-xr-x | contrib/stat/dns.named (renamed from src/contrib/stat/dns.named) | 0 | ||||
| -rwxr-xr-x | contrib/stat/dns_mrtg (renamed from src/contrib/stat/dns_mrtg) | 0 | ||||
| -rwxr-xr-x | contrib/stat/mrtg.cfg (renamed from src/contrib/stat/mrtg.cfg) | 0 | ||||
| -rwxr-xr-x | contrib/stat/stat.pl (renamed from src/contrib/stat/stat.pl) | 0 | ||||
| -rw-r--r-- | contrib/stfc/README (renamed from src/contrib/stfc/README) | 0 | ||||
| -rwxr-xr-x | contrib/stfc/stfc (renamed from src/contrib/stfc/stfc) | 0 | ||||
| -rw-r--r-- | contrib/switchmaker/README (renamed from src/contrib/switchmaker/README) | 0 | ||||
| -rw-r--r-- | contrib/switchmaker/switchmaker (renamed from src/contrib/switchmaker/switchmaker) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/WithMap.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/area.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/area.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/axestype.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/bars.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/bars.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/colour.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/colour.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/install/BUGS (renamed from src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/install/CHANGES (renamed from src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST (renamed from src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL (renamed from src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/install/README (renamed from src/contrib/whodo/GIFgraph/GIFgraph/install/README) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/legend.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/legend.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/lines.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/lines.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/linespoints.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/mixed.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/pie.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/pie.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/points.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/points.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/Makefile (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/index.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif) | bin | 824 -> 824 bytes | |||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/area.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/area.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/bars.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/colour.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/ff.pl (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/legend.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/lines.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/pie.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/t/points.t (renamed from src/contrib/whodo/GIFgraph/GIFgraph/t/points.t) | 0 | ||||
| -rw-r--r-- | contrib/whodo/GIFgraph/GIFgraph/utils.pm (renamed from src/contrib/whodo/GIFgraph/GIFgraph/utils.pm) | 0 | ||||
| -rw-r--r-- | contrib/whodo/README (renamed from src/contrib/whodo/README) | 0 | ||||
| -rw-r--r-- | contrib/whodo/collect.pl (renamed from src/contrib/whodo/collect.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/makeanalyse.pl (renamed from src/contrib/whodo/makeanalyse.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/networks (renamed from src/contrib/whodo/networks) | 0 | ||||
| -rw-r--r-- | contrib/whodo/sources (renamed from src/contrib/whodo/sources) | 0 | ||||
| -rw-r--r-- | contrib/whodo/sources.cfg (renamed from src/contrib/whodo/sources.cfg) | 0 | ||||
| -rw-r--r-- | contrib/whodo/summarise.pl (renamed from src/contrib/whodo/summarise.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/wwwscripts/analyse.pl (renamed from src/contrib/whodo/wwwscripts/analyse.pl) | 0 | ||||
| -rw-r--r-- | contrib/whodo/wwwscripts/pie.pl (renamed from src/contrib/whodo/wwwscripts/pie.pl) | 0 | ||||
| -rw-r--r-- | contrib/xlsummary/ReadMe.txt (renamed from src/contrib/xlsummary/ReadMe.txt) | 0 | ||||
| -rw-r--r-- | contrib/xlsummary/xlsummary.pl (renamed from src/contrib/xlsummary/xlsummary.pl) | 0 | ||||
| -rw-r--r-- | doc/cfgmaker.1 | 1414 | ||||
| l--------- | doc/cfgmaker.pod (renamed from src/doc/cfgmaker.pod) | 0 | ||||
| -rw-r--r-- | doc/cfgmaker.txt | 1206 | ||||
| -rw-r--r-- | doc/indexmaker.1 | 307 | ||||
| l--------- | doc/indexmaker.pod (renamed from src/doc/indexmaker.pod) | 0 | ||||
| -rw-r--r-- | doc/indexmaker.txt | 173 | ||||
| -rw-r--r-- | doc/mrtg-contrib.1 | 199 | ||||
| -rw-r--r-- | doc/mrtg-contrib.pod (renamed from src/doc/mrtg-contrib.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-contrib.txt | 61 | ||||
| -rw-r--r-- | doc/mrtg-faq.1 | 232 | ||||
| -rw-r--r-- | doc/mrtg-faq.pod (renamed from src/doc/mrtg-faq.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-faq.txt | 95 | ||||
| -rw-r--r-- | doc/mrtg-forum.1 | 267 | ||||
| -rw-r--r-- | doc/mrtg-forum.pod (renamed from src/doc/mrtg-forum.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-forum.txt | 115 | ||||
| -rw-r--r-- | doc/mrtg-ipv6.1 | 236 | ||||
| -rw-r--r-- | doc/mrtg-ipv6.pod (renamed from src/doc/mrtg-ipv6.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-ipv6.txt | 97 | ||||
| -rw-r--r-- | doc/mrtg-l.gif (renamed from src/doc/mrtg-l.gif) | bin | 343 -> 343 bytes | |||
| -rw-r--r-- | doc/mrtg-l.png (renamed from src/doc/mrtg-l.png) | bin | 538 -> 538 bytes | |||
| -rw-r--r-- | doc/mrtg-logfile.1 | 225 | ||||
| -rw-r--r-- | doc/mrtg-logfile.pod (renamed from src/doc/mrtg-logfile.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-logfile.txt | 90 | ||||
| -rw-r--r-- | doc/mrtg-m.gif (renamed from src/doc/mrtg-m.gif) | bin | 1144 -> 1144 bytes | |||
| -rw-r--r-- | doc/mrtg-m.png (renamed from src/doc/mrtg-m.png) | bin | 414 -> 414 bytes | |||
| -rw-r--r-- | doc/mrtg-mibhelp.1 | 344 | ||||
| -rw-r--r-- | doc/mrtg-mibhelp.pod (renamed from src/doc/mrtg-mibhelp.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-mibhelp.txt | 168 | ||||
| -rw-r--r-- | doc/mrtg-nt-guide.1 | 526 | ||||
| -rw-r--r-- | doc/mrtg-nt-guide.pod (renamed from src/doc/mrtg-nt-guide.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-nt-guide.txt | 366 | ||||
| -rw-r--r-- | doc/mrtg-nw-guide.1 | 537 | ||||
| -rw-r--r-- | doc/mrtg-nw-guide.pod (renamed from src/doc/mrtg-nw-guide.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-nw-guide.txt | 408 | ||||
| -rw-r--r-- | doc/mrtg-r.gif (renamed from src/doc/mrtg-r.gif) | bin | 1779 -> 1779 bytes | |||
| -rw-r--r-- | doc/mrtg-r.png (renamed from src/doc/mrtg-r.png) | bin | 1759 -> 1759 bytes | |||
| -rw-r--r-- | doc/mrtg-reference.1 | 2437 | ||||
| -rw-r--r-- | doc/mrtg-reference.pod (renamed from src/doc/mrtg-reference.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-reference.txt | 2051 | ||||
| -rw-r--r-- | doc/mrtg-rrd.1 | 250 | ||||
| -rw-r--r-- | doc/mrtg-rrd.pod (renamed from src/doc/mrtg-rrd.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-rrd.txt | 111 | ||||
| -rw-r--r-- | doc/mrtg-squid.1 | 250 | ||||
| -rw-r--r-- | doc/mrtg-squid.pod (renamed from src/doc/mrtg-squid.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-squid.txt | 106 | ||||
| -rw-r--r-- | doc/mrtg-ti.png (renamed from src/doc/mrtg-ti.png) | bin | 4293 -> 4293 bytes | |||
| -rw-r--r-- | doc/mrtg-unix-guide.1 | 452 | ||||
| -rw-r--r-- | doc/mrtg-unix-guide.pod (renamed from src/doc/mrtg-unix-guide.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-unix-guide.txt | 272 | ||||
| -rw-r--r-- | doc/mrtg-webserver.1 | 206 | ||||
| -rw-r--r-- | doc/mrtg-webserver.pod (renamed from src/doc/mrtg-webserver.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg-webserver.txt | 70 | ||||
| -rw-r--r-- | doc/mrtg.1 | 322 | ||||
| -rw-r--r-- | doc/mrtg.pod (renamed from src/doc/mrtg.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtg.txt | 188 | ||||
| -rw-r--r-- | doc/mrtglib.1 | 386 | ||||
| l--------- | doc/mrtglib.pod (renamed from src/doc/mrtglib.pod) | 0 | ||||
| -rw-r--r-- | doc/mrtglib.txt | 222 | ||||
| -rw-r--r-- | docs/hello | 0 | ||||
| -rw-r--r-- | get_ver.awk (renamed from src/get_ver.awk) | 0 | ||||
| -rw-r--r-- | images/favicon.ico (renamed from src/images/favicon.ico) | bin | 350 -> 350 bytes | |||
| -rw-r--r-- | images/mrtg-l.gif (renamed from src/images/mrtg-l.gif) | bin | 343 -> 343 bytes | |||
| -rw-r--r-- | images/mrtg-l.png (renamed from src/images/mrtg-l.png) | bin | 538 -> 538 bytes | |||
| -rw-r--r-- | images/mrtg-m.gif (renamed from src/images/mrtg-m.gif) | bin | 1144 -> 1144 bytes | |||
| -rw-r--r-- | images/mrtg-m.png (renamed from src/images/mrtg-m.png) | bin | 414 -> 414 bytes | |||
| -rw-r--r-- | images/mrtg-r.gif (renamed from src/images/mrtg-r.gif) | bin | 1779 -> 1779 bytes | |||
| -rw-r--r-- | images/mrtg-r.png (renamed from src/images/mrtg-r.png) | bin | 1759 -> 1759 bytes | |||
| -rw-r--r-- | images/mrtg-ti.gif (renamed from src/images/mrtg-ti.gif) | bin | 4696 -> 4696 bytes | |||
| -rw-r--r-- | images/mrtg-ti.png (renamed from src/images/mrtg-ti.png) | bin | 4293 -> 4293 bytes | |||
| -rwxr-xr-x | install-sh (renamed from src/install-sh) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/BER.pm (renamed from src/lib/mrtg2/BER.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/MRTG_lib.pm (renamed from src/lib/mrtg2/MRTG_lib.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Net_SNMP_util.pm (renamed from src/lib/mrtg2/Net_SNMP_util.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Pod/InputObjects.pm (renamed from src/lib/mrtg2/Pod/InputObjects.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Pod/Parser.pm (renamed from src/lib/mrtg2/Pod/Parser.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Pod/PlainText.pm (renamed from src/lib/mrtg2/Pod/PlainText.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Pod/Select.pm (renamed from src/lib/mrtg2/Pod/Select.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/Pod/Usage.pm (renamed from src/lib/mrtg2/Pod/Usage.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/SNMP_Session.pm (renamed from src/lib/mrtg2/SNMP_Session.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/SNMP_util.pm (renamed from src/lib/mrtg2/SNMP_util.pm) | 0 | ||||
| -rw-r--r-- | lib/mrtg2/locales_mrtg.pm (renamed from src/lib/mrtg2/locales_mrtg.pm) | 0 | ||||
| -rwxr-xr-x | mkinstalldirs (renamed from src/mkinstalldirs) | 0 | ||||
| -rw-r--r-- | src/.gitignore | 1 | ||||
| -rw-r--r-- | src/INSTALL | 1 | ||||
| -rw-r--r-- | src/Makefile | 137 | ||||
| -rwxr-xr-x | src/bin/cammer | 323 | ||||
| -rw-r--r-- | src/bin/rateup.nlm | bin | 166837 -> 0 bytes | |||
| l--------- | src/doc/mrtg-mailer.pod | 1 | ||||
| l--------- | src/doc/mrtg-traffic-sum.pod | 1 | ||||
| -rw-r--r-- | src/lib/mrtg2/Pod/Checker.pm | 1268 | ||||
| -rw-r--r-- | src/lib/mrtg2/Pod/Find.pm | 535 | ||||
| -rw-r--r-- | src/lib/mrtg2/Pod/ParseUtils.pm | 855 | ||||
| -rw-r--r-- | src/rateup.c (renamed from src/src/rateup.c) | 0 | ||||
| -rw-r--r-- | src/strftime.c (renamed from src/src/strftime.c) | 0 | ||||
| -rw-r--r-- | src/strftime.h (renamed from src/src/strftime.h) | 0 | ||||
| -rw-r--r-- | templates/cisco/host-cisco.tmpl | 67 | ||||
| -rw-r--r-- | templates/generic/if-errors.tmpl | 37 | ||||
| -rw-r--r-- | translate/README (renamed from src/translate/README) | 0 | ||||
| -rw-r--r-- | translate/belarusian.pmd (renamed from src/translate/belarusian.pmd) | 0 | ||||
| -rw-r--r-- | translate/big5.pmd (renamed from src/translate/big5.pmd) | 0 | ||||
| -rw-r--r-- | translate/brazilian.pmd (renamed from src/translate/brazilian.pmd) | 0 | ||||
| -rw-r--r-- | translate/bulgarian.pmd (renamed from src/translate/bulgarian.pmd) | 0 | ||||
| -rw-r--r-- | translate/catalan.pmd (renamed from src/translate/catalan.pmd) | 0 | ||||
| -rw-r--r-- | translate/chinese.pmd (renamed from src/translate/chinese.pmd) | 0 | ||||
| -rw-r--r-- | translate/cn.pmd (renamed from src/translate/cn.pmd) | 0 | ||||
| -rw-r--r-- | translate/croatian.pmd (renamed from src/translate/croatian.pmd) | 0 | ||||
| -rw-r--r-- | translate/czech.pmd (renamed from src/translate/czech.pmd) | 0 | ||||
| -rw-r--r-- | translate/czechutf8.pmd (renamed from src/translate/czechutf8.pmd) | 0 | ||||
| -rw-r--r-- | translate/danish.pmd (renamed from src/translate/danish.pmd) | 0 | ||||
| -rw-r--r-- | translate/dutch.pmd (renamed from src/translate/dutch.pmd) | 0 | ||||
| -rw-r--r-- | translate/estonian.pmd (renamed from src/translate/estonian.pmd) | 0 | ||||
| -rw-r--r-- | translate/eucjp.pmd (renamed from src/translate/eucjp.pmd) | 0 | ||||
| -rw-r--r-- | translate/finnish.pmd (renamed from src/translate/finnish.pmd) | 0 | ||||
| -rw-r--r-- | translate/fixer (renamed from src/translate/fixer) | 0 | ||||
| -rw-r--r-- | translate/french.pmd (renamed from src/translate/french.pmd) | 0 | ||||
| -rw-r--r-- | translate/galician.pmd (renamed from src/translate/galician.pmd) | 0 | ||||
| -rw-r--r-- | translate/gb.pmd (renamed from src/translate/gb.pmd) | 0 | ||||
| -rw-r--r-- | translate/gb2312.pmd (renamed from src/translate/gb2312.pmd) | 0 | ||||
| -rw-r--r-- | translate/german.pmd (renamed from src/translate/german.pmd) | 0 | ||||
| -rw-r--r-- | translate/german.pmd.backup (renamed from src/translate/german.pmd.backup) | 0 | ||||
| -rw-r--r-- | translate/greek.pmd (renamed from src/translate/greek.pmd) | 0 | ||||
| -rw-r--r-- | translate/hungarian.pmd (renamed from src/translate/hungarian.pmd) | 0 | ||||
| -rw-r--r-- | translate/icelandic.pmd (renamed from src/translate/icelandic.pmd) | 0 | ||||
| -rw-r--r-- | translate/indonesia.pmd (renamed from src/translate/indonesia.pmd) | 0 | ||||
| -rw-r--r-- | translate/iso2022jp.pmd (renamed from src/translate/iso2022jp.pmd) | 0 | ||||
| -rw-r--r-- | translate/italian.pmd (renamed from src/translate/italian.pmd) | 0 | ||||
| -rw-r--r-- | translate/korean.pmd (renamed from src/translate/korean.pmd) | 0 | ||||
| -rw-r--r-- | translate/lithuanian.pmd (renamed from src/translate/lithuanian.pmd) | 0 | ||||
| -rw-r--r-- | translate/locales_mrtg.pm (renamed from src/translate/locales_mrtg.pm) | 0 | ||||
| -rw-r--r-- | translate/macedonian.pmd (renamed from src/translate/macedonian.pmd) | 0 | ||||
| -rw-r--r-- | translate/malay.pmd (renamed from src/translate/malay.pmd) | 0 | ||||
| -rwxr-xr-x | translate/mergelocale.pl (renamed from src/translate/mergelocale.pl) | 0 | ||||
| -rw-r--r-- | translate/norwegian.pmd (renamed from src/translate/norwegian.pmd) | 0 | ||||
| -rw-r--r-- | translate/polish.pmd (renamed from src/translate/polish.pmd) | 0 | ||||
| -rw-r--r-- | translate/portuguese.pmd (renamed from src/translate/portuguese.pmd) | 0 | ||||
| -rw-r--r-- | translate/romanian.pmd (renamed from src/translate/romanian.pmd) | 0 | ||||
| -rw-r--r-- | translate/russian.pmd (renamed from src/translate/russian.pmd) | 0 | ||||
| -rw-r--r-- | translate/russian1251.pmd (renamed from src/translate/russian1251.pmd) | 0 | ||||
| -rw-r--r-- | translate/serbian.pmd (renamed from src/translate/serbian.pmd) | 0 | ||||
| -rw-r--r-- | translate/skeleton.pm0 (renamed from src/translate/skeleton.pm0) | 0 | ||||
| -rw-r--r-- | translate/slovak.pmd (renamed from src/translate/slovak.pmd) | 0 | ||||
| -rw-r--r-- | translate/slovenian.pmd (renamed from src/translate/slovenian.pmd) | 0 | ||||
| -rw-r--r-- | translate/spanish.pmd (renamed from src/translate/spanish.pmd) | 0 | ||||
| -rw-r--r-- | translate/swedish.pmd (renamed from src/translate/swedish.pmd) | 0 | ||||
| -rw-r--r-- | translate/turkish.pmd (renamed from src/translate/turkish.pmd) | 0 | ||||
| -rw-r--r-- | translate/ukrainian.pmd (renamed from src/translate/ukrainian.pmd) | 0 | ||||
| -rw-r--r-- | translate/ukrainian1251.pmd (renamed from src/translate/ukrainian1251.pmd) | 0 | ||||
| -rw-r--r-- | web/.gitignore | 4 | ||||
| -rw-r--r-- | web/.htaccess | 25 | ||||
| -rwxr-xr-x | web/.wmkrc | 3 | ||||
| -rwxr-xr-x | web/.wmlrc | 17 | ||||
| -rw-r--r-- | web/192.33.92.249_fa4_1-day.png | bin | 3795 -> 0 bytes | |||
| -rw-r--r-- | web/3party.wml | 228 | ||||
| -rw-r--r-- | web/404.wml | 9 | ||||
| -rw-r--r-- | web/award-white.png | bin | 13001 -> 0 bytes | |||
| -rwxr-xr-x | web/bin/fix-hrefs.pl | 21 | ||||
| -rwxr-xr-x | web/bin/fix-pod2html-orig.pl | 73 | ||||
| -rwxr-xr-x | web/bin/fix-pod2html.pl | 87 | ||||
| -rwxr-xr-x | web/bin/headfix.pl | 15 | ||||
| -rwxr-xr-x | web/bin/htmlfix.sh | 24 | ||||
| -rw-r--r-- | web/bin/lib/Pod/.exists | 0 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Escapes.pm | 721 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Hyperlink/BounceURL.pm | 123 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple.pm | 1520 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple.pod | 218 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/BlackBox.pm | 1923 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Checker.pm | 171 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Debug.pm | 151 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/DumpAsText.pm | 130 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/DumpAsXML.pm | 146 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/HTML.pm | 893 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/HTMLBatch.pm | 1342 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/HTMLLegacy.pm | 104 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/LinkSection.pm | 145 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Methody.pm | 127 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Progress.pm | 93 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/PullParser.pm | 795 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/PullParserEndToken.pm | 93 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/PullParserStartToken.pm | 130 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/PullParserTextToken.pm | 101 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/PullParserToken.pm | 138 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/RTF.pm | 674 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Search.pm | 1016 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/SimpleTree.pm | 155 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Subclassing.pod | 922 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Text.pm | 152 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/TextContent.pm | 87 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/TiedOutFH.pm | 103 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/Transcode.pm | 33 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/TranscodeDumb.pm | 63 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/TranscodeSmart.pm | 42 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Simple/XMLOutStream.pm | 157 | ||||
| -rw-r--r-- | web/bin/lib/Pod/Xhtml.pm | 908 | ||||
| -rw-r--r-- | web/bin/lib/auto/Pod/Escapes/.exists | 0 | ||||
| -rw-r--r-- | web/bin/lib/auto/Pod/Simple/.exists | 0 | ||||
| -rw-r--r-- | web/bin/lib/perlpod.pod | 685 | ||||
| -rw-r--r-- | web/bin/lib/perlpodspec.pod | 1876 | ||||
| -rwxr-xr-x | web/bin/pod2wml.sh | 61 | ||||
| -rwxr-xr-x | web/build.sh | 11 | ||||
| -rwxr-xr-x | web/cast/build.sh | 2 | ||||
| -rw-r--r-- | web/cast/contrib.inc | 379 | ||||
| -rw-r--r-- | web/cast/index.wml | 31 | ||||
| -rw-r--r-- | web/design.css | 316 | ||||
| -rw-r--r-- | web/doc/.gitignore | 3 | ||||
| -rwxr-xr-x | web/doc/build.sh | 25 | ||||
| -rw-r--r-- | web/doc/index.inc | 28 | ||||
| -rw-r--r-- | web/doc/index.wml | 8 | ||||
| -rw-r--r-- | web/doc/navbar.inc | 14 | ||||
| -rw-r--r-- | web/download.wml | 20 | ||||
| -rw-r--r-- | web/fb-logo.png | bin | 1874 -> 0 bytes | |||
| -rw-r--r-- | web/hoster.html | 23 | ||||
| -rw-r--r-- | web/images/arr_black.gif | bin | 49 -> 0 bytes | |||
| -rw-r--r-- | web/images/arr_black_right.gif | bin | 53 -> 0 bytes | |||
| -rw-r--r-- | web/images/arr_white.gif | bin | 49 -> 0 bytes | |||
| -rw-r--r-- | web/images/foot_logo.gif | bin | 3093 -> 0 bytes | |||
| -rw-r--r-- | web/images/foot_px.gif | bin | 51 -> 0 bytes | |||
| -rw-r--r-- | web/images/minus.gif | bin | 57 -> 0 bytes | |||
| -rw-r--r-- | web/images/mrtg_logo.gif | bin | 7988 -> 0 bytes | |||
| -rw-r--r-- | web/images/plus.gif | bin | 58 -> 0 bytes | |||
| -rw-r--r-- | web/images/px.gif | bin | 44 -> 0 bytes | |||
| -rw-r--r-- | web/images/spacer.gif | bin | 43 -> 0 bytes | |||
| -rw-r--r-- | web/inc/IE7/README.txt | 34 | ||||
| -rw-r--r-- | web/inc/IE7/blank.gif | bin | 48 -> 0 bytes | |||
| -rw-r--r-- | web/inc/IE7/ie7-base64.php | 7 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-content.htc | 14 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-core.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-css-strict.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-css2-selectors.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-css3-selectors.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-dhtml.js | 57 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-dynamic-attributes.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-fixed.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-graphics.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-html4.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-ie5.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-layout.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-load.htc | 1 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-object.htc | 12 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-overflow.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-quirks.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-recalc.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-server.css | 44 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-squish.js | 45 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-standard-p.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7-xml-extras.js | 6 | ||||
| -rw-r--r-- | web/inc/IE7/ie7.gif | bin | 208 -> 0 bytes | |||
| -rw-r--r-- | web/inc/IE7/test-trans.png | bin | 106 -> 0 bytes | |||
| -rw-r--r-- | web/inc/IE7/test.html | 100 | ||||
| -rw-r--r-- | web/inc/button.png | bin | 3106 -> 0 bytes | |||
| -rw-r--r-- | web/inc/button.xar | bin | 5546 -> 0 bytes | |||
| -rw-r--r-- | web/inc/customtags.inc | 118 | ||||
| -rw-r--r-- | web/inc/event.js | 149 | ||||
| -rw-r--r-- | web/inc/favicon.ico | bin | 350 -> 0 bytes | |||
| -rw-r--r-- | web/inc/fixed.js | 354 | ||||
| -rw-r--r-- | web/inc/html.inc | 29 | ||||
| -rw-r--r-- | web/inc/langset.inc | 34 | ||||
| -rw-r--r-- | web/inc/minmax.js | 144 | ||||
| -rw-r--r-- | web/inc/navbar-def.inc | 76 | ||||
| -rw-r--r-- | web/inc/position.js | 118 | ||||
| -rw-r--r-- | web/inc/silver-logo.png | bin | 1875 -> 0 bytes | |||
| -rw-r--r-- | web/inc/template.inc | 177 | ||||
| -rw-r--r-- | web/inc/trac.css | 43 | ||||
| -rw-r--r-- | web/index.wml | 74 | ||||
| -rw-r--r-- | web/license.wml | 20 | ||||
| -rw-r--r-- | web/logos/kanetix.png | bin | 4371 -> 0 bytes | |||
| -rw-r--r-- | web/logos/logo_plixer_blue101x51.gif | bin | 836 -> 0 bytes | |||
| -rw-r--r-- | web/logos/mrtg_sensorgateway.png | bin | 19455 -> 0 bytes | |||
| -rw-r--r-- | web/logos/nagios.png | bin | 2241 -> 0 bytes | |||
| -rw-r--r-- | web/logos/opennmscolorgroup.png | bin | 3292 -> 0 bytes | |||
| -rw-r--r-- | web/logos/poweradmin_server_monitor.png | bin | 4812 -> 0 bytes | |||
| -rw-r--r-- | web/logos/psw.jpg | bin | 14044 -> 0 bytes | |||
| -rw-r--r-- | web/logos/serverscheck.png | bin | 19974 -> 0 bytes | |||
| -rw-r--r-- | web/logos/terreactive.png | bin | 9070 -> 0 bytes | |||
| -rw-r--r-- | web/logos/zenoss.png | bin | 14384 -> 0 bytes | |||
| -rw-r--r-- | web/mirror.html | 53 | ||||
| -rw-r--r-- | web/mrtg-l.gif | bin | 1216 -> 0 bytes | |||
| -rw-r--r-- | web/mrtg-l.png | bin | 610 -> 0 bytes | |||
| -rw-r--r-- | web/mrtg-m.gif | bin | 6039 -> 0 bytes | |||
| -rw-r--r-- | web/mrtg-m.png | bin | 414 -> 0 bytes | |||
| -rw-r--r-- | web/mrtg-r.gif | bin | 2230 -> 0 bytes | |||
| -rw-r--r-- | web/mrtg-r.png | bin | 1939 -> 0 bytes | |||
| -rw-r--r-- | web/mrtgbook.jpg | bin | 4775 -> 0 bytes | |||
| -rw-r--r-- | web/nabble-mrtg.wml | 8 | ||||
| -rw-r--r-- | web/navbar.inc | 19 | ||||
| -rwxr-xr-x | web/site-sync | 1 | ||||
| -rw-r--r-- | web/snmpv1-is-too-slow.png | bin | 5514 -> 0 bytes | |||
| -rw-r--r-- | web/sponsor.wml | 68 | ||||
| -rwxr-xr-x | web/support/build.sh | 25 | ||||
| -rw-r--r-- | web/support/index.inc | 2 | ||||
| -rw-r--r-- | web/support/index.wml | 154 | ||||
| -rw-r--r-- | web/support/navbar.inc | 1 | ||||
| -rw-r--r-- | web/trac.wml | 4 |
694 files changed, 14389 insertions, 22679 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 814e327..0000000 --- a/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -DEADJOE -*~ -autom4te.cache -rateup.exe -config.h -config.log -config.status -*.1 -*.gz -*.o -*.zip
\ No newline at end of file diff --git a/src/COPYRIGHT b/COPYRIGHT index 57369b5..57369b5 100644 --- a/src/COPYRIGHT +++ b/COPYRIGHT diff --git a/src/Makefile.NetWare b/Makefile.NetWare index 5484193..5484193 100644 --- a/src/Makefile.NetWare +++ b/Makefile.NetWare diff --git a/src/Makefile.Win32 b/Makefile.Win32 index 14a2a3e..14a2a3e 100644 --- a/src/Makefile.Win32 +++ b/Makefile.Win32 diff --git a/src/Makefile.in b/Makefile.in index 7049f6c..7049f6c 100644 --- a/src/Makefile.in +++ b/Makefile.in diff --git a/README.md b/README.md deleted file mode 100644 index 83f006a..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# mrtg - -[](https://gitter.im/oetiker/mrtg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
\ No newline at end of file diff --git a/src/bin/cfgmaker b/bin/cfgmaker index 703791d..703791d 100755 --- a/src/bin/cfgmaker +++ b/bin/cfgmaker diff --git a/src/bin/indexmaker b/bin/indexmaker index 4c29c99..4c29c99 100755 --- a/src/bin/indexmaker +++ b/bin/indexmaker diff --git a/src/bin/mrtg-traffic-sum b/bin/mrtg-traffic-sum index f57e3a9..f57e3a9 100755 --- a/src/bin/mrtg-traffic-sum +++ b/bin/mrtg-traffic-sum diff --git a/src/config.h.in b/config.h.in index f4edaa9..f4edaa9 100644 --- a/src/config.h.in +++ b/config.h.in diff --git a/src/configure b/configure index de5eb10..de5eb10 100755 --- a/src/configure +++ b/configure diff --git a/src/configure.in b/configure.in index 681455e..681455e 100644 --- a/src/configure.in +++ b/configure.in diff --git a/src/contrib/00INDEX b/contrib/00INDEX index db71dfa..db71dfa 100644 --- a/src/contrib/00INDEX +++ b/contrib/00INDEX diff --git a/src/contrib/14all/README b/contrib/14all/README index d69bc86..d69bc86 100644 --- a/src/contrib/14all/README +++ b/contrib/14all/README diff --git a/src/contrib/GetSNMPLinesUP/COPYING b/contrib/GetSNMPLinesUP/COPYING index e77696a..e77696a 100644 --- a/src/contrib/GetSNMPLinesUP/COPYING +++ b/contrib/GetSNMPLinesUP/COPYING diff --git a/src/contrib/GetSNMPLinesUP/COPYRIGHT b/contrib/GetSNMPLinesUP/COPYRIGHT index aafb24c..aafb24c 100644 --- a/src/contrib/GetSNMPLinesUP/COPYRIGHT +++ b/contrib/GetSNMPLinesUP/COPYRIGHT diff --git a/src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl b/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl index baed6a4..baed6a4 100755 --- a/src/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl +++ b/contrib/GetSNMPLinesUP/GetSNMPLinesUP.pl diff --git a/src/contrib/GetSNMPLinesUP/INSTALL b/contrib/GetSNMPLinesUP/INSTALL index 957a646..957a646 100644 --- a/src/contrib/GetSNMPLinesUP/INSTALL +++ b/contrib/GetSNMPLinesUP/INSTALL diff --git a/src/contrib/GetSNMPLinesUP/Makefile b/contrib/GetSNMPLinesUP/Makefile index c7e6f97..c7e6f97 100644 --- a/src/contrib/GetSNMPLinesUP/Makefile +++ b/contrib/GetSNMPLinesUP/Makefile diff --git a/src/contrib/GetSNMPLinesUP/ModemTable.dial-machine b/contrib/GetSNMPLinesUP/ModemTable.dial-machine index 8abbf45..8abbf45 100644 --- a/src/contrib/GetSNMPLinesUP/ModemTable.dial-machine +++ b/contrib/GetSNMPLinesUP/ModemTable.dial-machine diff --git a/src/contrib/GetSNMPLinesUP/README b/contrib/GetSNMPLinesUP/README index 3f0bdeb..3f0bdeb 100644 --- a/src/contrib/GetSNMPLinesUP/README +++ b/contrib/GetSNMPLinesUP/README diff --git a/src/contrib/GetSNMPLinesUP/sample.cfg b/contrib/GetSNMPLinesUP/sample.cfg index 3b7ac10..3b7ac10 100644 --- a/src/contrib/GetSNMPLinesUP/sample.cfg +++ b/contrib/GetSNMPLinesUP/sample.cfg diff --git a/src/contrib/IxDisk/README b/contrib/IxDisk/README index 0f56072..0f56072 100644 --- a/src/contrib/IxDisk/README +++ b/contrib/IxDisk/README diff --git a/src/contrib/IxDisk/ixdisk.cfg b/contrib/IxDisk/ixdisk.cfg index 6f371be..6f371be 100755 --- a/src/contrib/IxDisk/ixdisk.cfg +++ b/contrib/IxDisk/ixdisk.cfg diff --git a/src/contrib/IxDisk/ixdisk.pl b/contrib/IxDisk/ixdisk.pl index 73e619c..73e619c 100755 --- a/src/contrib/IxDisk/ixdisk.pl +++ b/contrib/IxDisk/ixdisk.pl diff --git a/src/contrib/NSI/Mrtg_nsi b/contrib/NSI/Mrtg_nsi index 472509d..472509d 100644 --- a/src/contrib/NSI/Mrtg_nsi +++ b/contrib/NSI/Mrtg_nsi diff --git a/src/contrib/NSI/Mrtg_nsi.cfg b/contrib/NSI/Mrtg_nsi.cfg index 8dbefd1..8dbefd1 100644 --- a/src/contrib/NSI/Mrtg_nsi.cfg +++ b/contrib/NSI/Mrtg_nsi.cfg diff --git a/src/contrib/NSI/mrtg-nsi-msg.txt b/contrib/NSI/mrtg-nsi-msg.txt index a3ea288..a3ea288 100644 --- a/src/contrib/NSI/mrtg-nsi-msg.txt +++ b/contrib/NSI/mrtg-nsi-msg.txt diff --git a/src/contrib/PMLines/PMLines.pl b/contrib/PMLines/PMLines.pl index 1b80e63..1b80e63 100644 --- a/src/contrib/PMLines/PMLines.pl +++ b/contrib/PMLines/PMLines.pl diff --git a/src/contrib/PMLines/README b/contrib/PMLines/README index e26eab5..e26eab5 100644 --- a/src/contrib/PMLines/README +++ b/contrib/PMLines/README diff --git a/src/contrib/PMLines/mrtg.cfg-demo b/contrib/PMLines/mrtg.cfg-demo index 52c78ff..52c78ff 100644 --- a/src/contrib/PMLines/mrtg.cfg-demo +++ b/contrib/PMLines/mrtg.cfg-demo diff --git a/src/contrib/TCH/README b/contrib/TCH/README index f0691e3..f0691e3 100644 --- a/src/contrib/TCH/README +++ b/contrib/TCH/README diff --git a/src/contrib/TCH/dualpri.pl b/contrib/TCH/dualpri.pl index dfad88a..dfad88a 100644 --- a/src/contrib/TCH/dualpri.pl +++ b/contrib/TCH/dualpri.pl diff --git a/src/contrib/TCH/dualt1.pl b/contrib/TCH/dualt1.pl index a6bfe9e..a6bfe9e 100644 --- a/src/contrib/TCH/dualt1.pl +++ b/contrib/TCH/dualt1.pl diff --git a/src/contrib/TCH/hiperdsp.pl b/contrib/TCH/hiperdsp.pl index 8752cf6..8752cf6 100644 --- a/src/contrib/TCH/hiperdsp.pl +++ b/contrib/TCH/hiperdsp.pl diff --git a/src/contrib/TCH/mrtg.cfg b/contrib/TCH/mrtg.cfg index 2a64899..2a64899 100644 --- a/src/contrib/TCH/mrtg.cfg +++ b/contrib/TCH/mrtg.cfg diff --git a/src/contrib/TTrafic/TTraffic.asp b/contrib/TTrafic/TTraffic.asp index 623cf14..623cf14 100644 --- a/src/contrib/TTrafic/TTraffic.asp +++ b/contrib/TTrafic/TTraffic.asp diff --git a/src/contrib/TTrafic/gpl.txt b/contrib/TTrafic/gpl.txt index 42df5d7..42df5d7 100644 --- a/src/contrib/TTrafic/gpl.txt +++ b/contrib/TTrafic/gpl.txt diff --git a/src/contrib/TTrafic/readme.txt b/contrib/TTrafic/readme.txt index 4f57100..4f57100 100644 --- a/src/contrib/TTrafic/readme.txt +++ b/contrib/TTrafic/readme.txt diff --git a/src/contrib/TotalControlModem/example.txt b/contrib/TotalControlModem/example.txt index f3be4e3..f3be4e3 100644 --- a/src/contrib/TotalControlModem/example.txt +++ b/contrib/TotalControlModem/example.txt diff --git a/src/contrib/accesslistmon/INSTALL b/contrib/accesslistmon/INSTALL index 1ba51c1..1ba51c1 100644 --- a/src/contrib/accesslistmon/INSTALL +++ b/contrib/accesslistmon/INSTALL diff --git a/src/contrib/accesslistmon/README b/contrib/accesslistmon/README index d6701ff..d6701ff 100644 --- a/src/contrib/accesslistmon/README +++ b/contrib/accesslistmon/README diff --git a/src/contrib/accesslistmon/examplescript b/contrib/accesslistmon/examplescript index 23a0a46..23a0a46 100755 --- a/src/contrib/accesslistmon/examplescript +++ b/contrib/accesslistmon/examplescript diff --git a/src/contrib/accesslistmon/mrtg.cfg b/contrib/accesslistmon/mrtg.cfg index 8558247..8558247 100644 --- a/src/contrib/accesslistmon/mrtg.cfg +++ b/contrib/accesslistmon/mrtg.cfg diff --git a/src/contrib/adm-mrtg/adm-mrtg b/contrib/adm-mrtg/adm-mrtg index c2aeaf6..c2aeaf6 100755 --- a/src/contrib/adm-mrtg/adm-mrtg +++ b/contrib/adm-mrtg/adm-mrtg diff --git a/src/contrib/adm-mrtg/adm-mrtg.README b/contrib/adm-mrtg/adm-mrtg.README index 8152bb1..8152bb1 100644 --- a/src/contrib/adm-mrtg/adm-mrtg.README +++ b/contrib/adm-mrtg/adm-mrtg.README diff --git a/src/contrib/apc_ups/README b/contrib/apc_ups/README index 5314705..5314705 100644 --- a/src/contrib/apc_ups/README +++ b/contrib/apc_ups/README diff --git a/src/contrib/apc_ups/ups.cfg b/contrib/apc_ups/ups.cfg index 1b1b828..1b1b828 100644 --- a/src/contrib/apc_ups/ups.cfg +++ b/contrib/apc_ups/ups.cfg diff --git a/src/contrib/apc_ups/upsdata01.pl b/contrib/apc_ups/upsdata01.pl index d4ff78c..d4ff78c 100644 --- a/src/contrib/apc_ups/upsdata01.pl +++ b/contrib/apc_ups/upsdata01.pl diff --git a/src/contrib/ascendget/ascendget b/contrib/ascendget/ascendget index 667a4c6..667a4c6 100644 --- a/src/contrib/ascendget/ascendget +++ b/contrib/ascendget/ascendget diff --git a/src/contrib/atmmaker/atmmaker b/contrib/atmmaker/atmmaker index a3ef0b4..a3ef0b4 100644 --- a/src/contrib/atmmaker/atmmaker +++ b/contrib/atmmaker/atmmaker diff --git a/src/contrib/cfgmaker_ATM/README b/contrib/cfgmaker_ATM/README index bcecd58..bcecd58 100644 --- a/src/contrib/cfgmaker_ATM/README +++ b/contrib/cfgmaker_ATM/README diff --git a/src/contrib/cfgmaker_ATM/cfgmaker_atm.pl b/contrib/cfgmaker_ATM/cfgmaker_atm.pl index 258f178..258f178 100644 --- a/src/contrib/cfgmaker_ATM/cfgmaker_atm.pl +++ b/contrib/cfgmaker_ATM/cfgmaker_atm.pl diff --git a/src/contrib/cfgmaker_cisco/README b/contrib/cfgmaker_cisco/README index 51b2463..51b2463 100644 --- a/src/contrib/cfgmaker_cisco/README +++ b/contrib/cfgmaker_cisco/README diff --git a/src/contrib/cfgmaker_cisco/cfgmaker.cisco b/contrib/cfgmaker_cisco/cfgmaker.cisco index 89bf7f0..89bf7f0 100644 --- a/src/contrib/cfgmaker_cisco/cfgmaker.cisco +++ b/contrib/cfgmaker_cisco/cfgmaker.cisco diff --git a/src/contrib/cfgmaker_dlci/cfgmaker_dlci b/contrib/cfgmaker_dlci/cfgmaker_dlci index 336b4fc..336b4fc 100644 --- a/src/contrib/cfgmaker_dlci/cfgmaker_dlci +++ b/contrib/cfgmaker_dlci/cfgmaker_dlci diff --git a/src/contrib/cisco_BPX_MGX/howto.html b/contrib/cisco_BPX_MGX/howto.html index 0414497..0414497 100644 --- a/src/contrib/cisco_BPX_MGX/howto.html +++ b/contrib/cisco_BPX_MGX/howto.html diff --git a/src/contrib/cisco_ipaccounting/CHANGELOG b/contrib/cisco_ipaccounting/CHANGELOG index 8241b47..8241b47 100644 --- a/src/contrib/cisco_ipaccounting/CHANGELOG +++ b/contrib/cisco_ipaccounting/CHANGELOG diff --git a/src/contrib/cisco_ipaccounting/README b/contrib/cisco_ipaccounting/README index f6cec3e..f6cec3e 100644 --- a/src/contrib/cisco_ipaccounting/README +++ b/contrib/cisco_ipaccounting/README diff --git a/src/contrib/cisco_ipaccounting/TODO b/contrib/cisco_ipaccounting/TODO index 8cc9e82..8cc9e82 100644 --- a/src/contrib/cisco_ipaccounting/TODO +++ b/contrib/cisco_ipaccounting/TODO diff --git a/src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl b/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl index 5890e15..5890e15 100755 --- a/src/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl +++ b/contrib/cisco_ipaccounting/cisco_ip_acc_collect.pl diff --git a/src/contrib/cisco_ipaccounting/networks b/contrib/cisco_ipaccounting/networks index 7f35141..7f35141 100644 --- a/src/contrib/cisco_ipaccounting/networks +++ b/contrib/cisco_ipaccounting/networks diff --git a/src/contrib/cisco_tftp/scarfconf.pl b/contrib/cisco_tftp/scarfconf.pl index f6de534..f6de534 100644 --- a/src/contrib/cisco_tftp/scarfconf.pl +++ b/contrib/cisco_tftp/scarfconf.pl diff --git a/src/contrib/ciscoindex/README b/contrib/ciscoindex/README index b2c888d..b2c888d 100644 --- a/src/contrib/ciscoindex/README +++ b/contrib/ciscoindex/README diff --git a/src/contrib/ciscoindex/ciscoindex.pl b/contrib/ciscoindex/ciscoindex.pl index e532eb1..e532eb1 100644 --- a/src/contrib/ciscoindex/ciscoindex.pl +++ b/contrib/ciscoindex/ciscoindex.pl diff --git a/src/contrib/cpuinfo/README b/contrib/cpuinfo/README index caae515..caae515 100644 --- a/src/contrib/cpuinfo/README +++ b/contrib/cpuinfo/README diff --git a/src/contrib/cpuinfo/cpuinfo.pl b/contrib/cpuinfo/cpuinfo.pl index 2297de0..2297de0 100755 --- a/src/contrib/cpuinfo/cpuinfo.pl +++ b/contrib/cpuinfo/cpuinfo.pl diff --git a/src/contrib/cpuinfo/sample.cfg b/contrib/cpuinfo/sample.cfg index e4db1bd..e4db1bd 100644 --- a/src/contrib/cpuinfo/sample.cfg +++ b/contrib/cpuinfo/sample.cfg diff --git a/src/contrib/cpumon/README b/contrib/cpumon/README index ed84d99..ed84d99 100644 --- a/src/contrib/cpumon/README +++ b/contrib/cpumon/README diff --git a/src/contrib/cpumon/cpumon.pl b/contrib/cpumon/cpumon.pl index e3a4d65..e3a4d65 100644 --- a/src/contrib/cpumon/cpumon.pl +++ b/contrib/cpumon/cpumon.pl diff --git a/src/contrib/diskmon/README b/contrib/diskmon/README index bb428bd..bb428bd 100644 --- a/src/contrib/diskmon/README +++ b/contrib/diskmon/README diff --git a/src/contrib/diskmon/getdisk.pl b/contrib/diskmon/getdisk.pl index 6c5f124..6c5f124 100644 --- a/src/contrib/diskmon/getdisk.pl +++ b/contrib/diskmon/getdisk.pl diff --git a/src/contrib/diskmon/sample.cfg b/contrib/diskmon/sample.cfg index 8dda588..8dda588 100644 --- a/src/contrib/diskmon/sample.cfg +++ b/contrib/diskmon/sample.cfg diff --git a/src/contrib/diskmon/showdisk.pl b/contrib/diskmon/showdisk.pl index e8f95bf..e8f95bf 100644 --- a/src/contrib/diskmon/showdisk.pl +++ b/contrib/diskmon/showdisk.pl diff --git a/src/contrib/distrib/distrib.c b/contrib/distrib/distrib.c index 021a602..021a602 100644 --- a/src/contrib/distrib/distrib.c +++ b/contrib/distrib/distrib.c diff --git a/src/contrib/distrib/distrib.pl b/contrib/distrib/distrib.pl index bc4d366..bc4d366 100755 --- a/src/contrib/distrib/distrib.pl +++ b/contrib/distrib/distrib.pl diff --git a/src/contrib/distrib/readme.txt b/contrib/distrib/readme.txt index c16db22..c16db22 100644 --- a/src/contrib/distrib/readme.txt +++ b/contrib/distrib/readme.txt diff --git a/src/contrib/gentcucci-1.0.0/README b/contrib/gentcucci-1.0.0/README index 59f4312..59f4312 100644 --- a/src/contrib/gentcucci-1.0.0/README +++ b/contrib/gentcucci-1.0.0/README diff --git a/src/contrib/gentcucci-1.0.0/gentcucci b/contrib/gentcucci-1.0.0/gentcucci index 92391d8..92391d8 100755 --- a/src/contrib/gentcucci-1.0.0/gentcucci +++ b/contrib/gentcucci-1.0.0/gentcucci diff --git a/src/contrib/gentcucci-1.0.0/gwcs.list b/contrib/gentcucci-1.0.0/gwcs.list index 562ba1c..562ba1c 100644 --- a/src/contrib/gentcucci-1.0.0/gwcs.list +++ b/contrib/gentcucci-1.0.0/gwcs.list diff --git a/src/contrib/gentcucci-1.0.0/mrtg_autorun b/contrib/gentcucci-1.0.0/mrtg_autorun index c7679f1..c7679f1 100755 --- a/src/contrib/gentcucci-1.0.0/mrtg_autorun +++ b/contrib/gentcucci-1.0.0/mrtg_autorun diff --git a/src/contrib/gentcucci-1.0.0/nmcs.list b/contrib/gentcucci-1.0.0/nmcs.list index 4e6045f..4e6045f 100644 --- a/src/contrib/gentcucci-1.0.0/nmcs.list +++ b/contrib/gentcucci-1.0.0/nmcs.list diff --git a/src/contrib/gentcucci-1.0.0/tcnowstat b/contrib/gentcucci-1.0.0/tcnowstat index 2d8111f..2d8111f 100755 --- a/src/contrib/gentcucci-1.0.0/tcnowstat +++ b/contrib/gentcucci-1.0.0/tcnowstat diff --git a/src/contrib/gentcucci-1.0.0/tcnowtemp b/contrib/gentcucci-1.0.0/tcnowtemp index 21fc208..21fc208 100755 --- a/src/contrib/gentcucci-1.0.0/tcnowtemp +++ b/contrib/gentcucci-1.0.0/tcnowtemp diff --git a/src/contrib/get-active/README b/contrib/get-active/README index 2257859..2257859 100644 --- a/src/contrib/get-active/README +++ b/contrib/get-active/README diff --git a/src/contrib/get-active/get-active.pl b/contrib/get-active/get-active.pl index 1215d24..1215d24 100644 --- a/src/contrib/get-active/get-active.pl +++ b/contrib/get-active/get-active.pl diff --git a/src/contrib/get-active/get-active2.pl b/contrib/get-active/get-active2.pl index 7eaa402..7eaa402 100644 --- a/src/contrib/get-active/get-active2.pl +++ b/contrib/get-active/get-active2.pl diff --git a/src/contrib/get-equi/README b/contrib/get-equi/README index daeca3f..daeca3f 100644 --- a/src/contrib/get-equi/README +++ b/contrib/get-equi/README diff --git a/src/contrib/get-equi/get-equi.pl b/contrib/get-equi/get-equi.pl index 1d726ee..1d726ee 100644 --- a/src/contrib/get-equi/get-equi.pl +++ b/contrib/get-equi/get-equi.pl diff --git a/src/contrib/get-multiserial/get-modems-remote.pl b/contrib/get-multiserial/get-modems-remote.pl index 5954300..5954300 100644 --- a/src/contrib/get-multiserial/get-modems-remote.pl +++ b/contrib/get-multiserial/get-modems-remote.pl diff --git a/src/contrib/get-multiserial/get-modems.pl b/contrib/get-multiserial/get-modems.pl index 9245c4e..9245c4e 100644 --- a/src/contrib/get-multiserial/get-modems.pl +++ b/contrib/get-multiserial/get-modems.pl diff --git a/src/contrib/ipchainacc/README b/contrib/ipchainacc/README index 4cd31fd..4cd31fd 100644 --- a/src/contrib/ipchainacc/README +++ b/contrib/ipchainacc/README diff --git a/src/contrib/ipchainacc/ipchainacc b/contrib/ipchainacc/ipchainacc index 877b4d9..877b4d9 100644 --- a/src/contrib/ipchainacc/ipchainacc +++ b/contrib/ipchainacc/ipchainacc diff --git a/src/contrib/ipchains/README b/contrib/ipchains/README index 170489a..170489a 100644 --- a/src/contrib/ipchains/README +++ b/contrib/ipchains/README diff --git a/src/contrib/ipchains/ipchainacc b/contrib/ipchains/ipchainacc index db7862e..db7862e 100755 --- a/src/contrib/ipchains/ipchainacc +++ b/contrib/ipchains/ipchainacc diff --git a/src/contrib/ipchains/ipchainacc.rules b/contrib/ipchains/ipchainacc.rules index 3be5f63..3be5f63 100755 --- a/src/contrib/ipchains/ipchainacc.rules +++ b/contrib/ipchains/ipchainacc.rules diff --git a/src/contrib/ipfilter/fw.pl b/contrib/ipfilter/fw.pl index 67cf8b8..67cf8b8 100644 --- a/src/contrib/ipfilter/fw.pl +++ b/contrib/ipfilter/fw.pl diff --git a/src/contrib/ipfilter/ip-filter.readme b/contrib/ipfilter/ip-filter.readme index 0e9ff57..0e9ff57 100644 --- a/src/contrib/ipfilter/ip-filter.readme +++ b/contrib/ipfilter/ip-filter.readme diff --git a/src/contrib/iptables-accounting/README b/contrib/iptables-accounting/README index 3361e94..3361e94 100644 --- a/src/contrib/iptables-accounting/README +++ b/contrib/iptables-accounting/README diff --git a/src/contrib/iptables-accounting/iptables-accounting b/contrib/iptables-accounting/iptables-accounting index 6d6dba2..6d6dba2 100755 --- a/src/contrib/iptables-accounting/iptables-accounting +++ b/contrib/iptables-accounting/iptables-accounting diff --git a/src/contrib/iptables_acc/README b/contrib/iptables_acc/README index 28f9169..28f9169 100644 --- a/src/contrib/iptables_acc/README +++ b/contrib/iptables_acc/README diff --git a/src/contrib/iptables_acc/iptables_acc b/contrib/iptables_acc/iptables_acc index 8ef8032..8ef8032 100755 --- a/src/contrib/iptables_acc/iptables_acc +++ b/contrib/iptables_acc/iptables_acc diff --git a/src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt b/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt index 4060e3f..4060e3f 100644 --- a/src/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt +++ b/contrib/iptables_acc_snmp/HANDCO-SNMP-MIB.txt diff --git a/src/contrib/iptables_acc_snmp/README b/contrib/iptables_acc_snmp/README index a224f71..a224f71 100644 --- a/src/contrib/iptables_acc_snmp/README +++ b/contrib/iptables_acc_snmp/README diff --git a/src/contrib/iptables_acc_snmp/iptables_acc_snmp b/contrib/iptables_acc_snmp/iptables_acc_snmp index 0912df0..0912df0 100755 --- a/src/contrib/iptables_acc_snmp/iptables_acc_snmp +++ b/contrib/iptables_acc_snmp/iptables_acc_snmp diff --git a/src/contrib/ircstats/README b/contrib/ircstats/README index 722b215..722b215 100644 --- a/src/contrib/ircstats/README +++ b/contrib/ircstats/README diff --git a/src/contrib/ircstats/ircstats.pl b/contrib/ircstats/ircstats.pl index 6b7993e..6b7993e 100644 --- a/src/contrib/ircstats/ircstats.pl +++ b/contrib/ircstats/ircstats.pl diff --git a/src/contrib/ircstats2/README b/contrib/ircstats2/README index f8b2e9a..f8b2e9a 100644 --- a/src/contrib/ircstats2/README +++ b/contrib/ircstats2/README diff --git a/src/contrib/ircstats2/crontab.script b/contrib/ircstats2/crontab.script index b21f2f5..b21f2f5 100755 --- a/src/contrib/ircstats2/crontab.script +++ b/contrib/ircstats2/crontab.script diff --git a/src/contrib/ircstats2/example.cf b/contrib/ircstats2/example.cf index 06bcdf3..06bcdf3 100644 --- a/src/contrib/ircstats2/example.cf +++ b/contrib/ircstats2/example.cf diff --git a/src/contrib/ircstats2/ircstats2.pl b/contrib/ircstats2/ircstats2.pl index 370aec0..370aec0 100755 --- a/src/contrib/ircstats2/ircstats2.pl +++ b/contrib/ircstats2/ircstats2.pl diff --git a/src/contrib/jm/README b/contrib/jm/README index a31fe3b..a31fe3b 100644 --- a/src/contrib/jm/README +++ b/contrib/jm/README diff --git a/src/contrib/jm/finger-mrtg.pl b/contrib/jm/finger-mrtg.pl index 4dfdcb8..4dfdcb8 100755 --- a/src/contrib/jm/finger-mrtg.pl +++ b/contrib/jm/finger-mrtg.pl diff --git a/src/contrib/jm/mrtg-jm.tar.gz b/contrib/jm/mrtg-jm.tar.gz Binary files differindex dc515e6..dc515e6 100644 --- a/src/contrib/jm/mrtg-jm.tar.gz +++ b/contrib/jm/mrtg-jm.tar.gz diff --git a/src/contrib/jm/news-mrtg.pl b/contrib/jm/news-mrtg.pl index 6c2cdef..6c2cdef 100644 --- a/src/contrib/jm/news-mrtg.pl +++ b/contrib/jm/news-mrtg.pl diff --git a/src/contrib/jm/quake-mrtg.pl b/contrib/jm/quake-mrtg.pl index 30d44ae..30d44ae 100755 --- a/src/contrib/jm/quake-mrtg.pl +++ b/contrib/jm/quake-mrtg.pl diff --git a/src/contrib/linux_stat/linux_stats.pl b/contrib/linux_stat/linux_stats.pl index 5459de2..5459de2 100644 --- a/src/contrib/linux_stat/linux_stats.pl +++ b/contrib/linux_stat/linux_stats.pl diff --git a/src/contrib/linux_stat/readme b/contrib/linux_stat/readme index 861b2a7..861b2a7 100644 --- a/src/contrib/linux_stat/readme +++ b/contrib/linux_stat/readme diff --git a/src/contrib/meminfo/README b/contrib/meminfo/README index 4a9a785..4a9a785 100644 --- a/src/contrib/meminfo/README +++ b/contrib/meminfo/README diff --git a/src/contrib/meminfo/memory.pl b/contrib/meminfo/memory.pl index 1c90e77..1c90e77 100644 --- a/src/contrib/meminfo/memory.pl +++ b/contrib/meminfo/memory.pl diff --git a/src/contrib/monitor/Monitor.mdb b/contrib/monitor/Monitor.mdb Binary files differindex 43f1fe5..43f1fe5 100644 --- a/src/contrib/monitor/Monitor.mdb +++ b/contrib/monitor/Monitor.mdb diff --git a/src/contrib/monitor/config.asp b/contrib/monitor/config.asp index d946463..d946463 100644 --- a/src/contrib/monitor/config.asp +++ b/contrib/monitor/config.asp diff --git a/src/contrib/monitor/default.asp b/contrib/monitor/default.asp index ef86161..ef86161 100644 --- a/src/contrib/monitor/default.asp +++ b/contrib/monitor/default.asp diff --git a/src/contrib/monitor/global.asa b/contrib/monitor/global.asa index a3a1e53..a3a1e53 100644 --- a/src/contrib/monitor/global.asa +++ b/contrib/monitor/global.asa diff --git a/src/contrib/monitor/global/main.css b/contrib/monitor/global/main.css index e31c960..e31c960 100644 --- a/src/contrib/monitor/global/main.css +++ b/contrib/monitor/global/main.css diff --git a/src/contrib/monitor/images/mrtg-l.gif b/contrib/monitor/images/mrtg-l.gif Binary files differindex 11eb3d7..11eb3d7 100644 --- a/src/contrib/monitor/images/mrtg-l.gif +++ b/contrib/monitor/images/mrtg-l.gif diff --git a/src/contrib/monitor/images/mrtg-m.gif b/contrib/monitor/images/mrtg-m.gif Binary files differindex ec4ee9a..ec4ee9a 100644 --- a/src/contrib/monitor/images/mrtg-m.gif +++ b/contrib/monitor/images/mrtg-m.gif diff --git a/src/contrib/monitor/images/mrtg-r.gif b/contrib/monitor/images/mrtg-r.gif Binary files differindex cc19bd6..cc19bd6 100644 --- a/src/contrib/monitor/images/mrtg-r.gif +++ b/contrib/monitor/images/mrtg-r.gif diff --git a/src/contrib/monitor/images/mrtg-ti.gif b/contrib/monitor/images/mrtg-ti.gif Binary files differindex b5fdea1..b5fdea1 100644 --- a/src/contrib/monitor/images/mrtg-ti.gif +++ b/contrib/monitor/images/mrtg-ti.gif diff --git a/src/contrib/monitor/images/msie.gif b/contrib/monitor/images/msie.gif Binary files differindex 76b994a..76b994a 100644 --- a/src/contrib/monitor/images/msie.gif +++ b/contrib/monitor/images/msie.gif diff --git a/src/contrib/monitor/images/msprod.gif b/contrib/monitor/images/msprod.gif Binary files differindex a7f54a2..a7f54a2 100644 --- a/src/contrib/monitor/images/msprod.gif +++ b/contrib/monitor/images/msprod.gif diff --git a/src/contrib/monitor/images/spacer.gif b/contrib/monitor/images/spacer.gif Binary files differindex 7ab9a76..7ab9a76 100644 --- a/src/contrib/monitor/images/spacer.gif +++ b/contrib/monitor/images/spacer.gif diff --git a/src/contrib/monitor/login.asp b/contrib/monitor/login.asp index 64f8d0f..64f8d0f 100644 --- a/src/contrib/monitor/login.asp +++ b/contrib/monitor/login.asp diff --git a/src/contrib/monitor/monitor.html b/contrib/monitor/monitor.html index e0e57e1..e0e57e1 100644 --- a/src/contrib/monitor/monitor.html +++ b/contrib/monitor/monitor.html diff --git a/src/contrib/monitor/monitor.inc b/contrib/monitor/monitor.inc index 2418093..2418093 100644 --- a/src/contrib/monitor/monitor.inc +++ b/contrib/monitor/monitor.inc diff --git a/src/contrib/monitor/readme.txt b/contrib/monitor/readme.txt index 877ea3f..877ea3f 100644 --- a/src/contrib/monitor/readme.txt +++ b/contrib/monitor/readme.txt diff --git a/src/contrib/mrtg-archiver-script/README b/contrib/mrtg-archiver-script/README index 245db9c..245db9c 100644 --- a/src/contrib/mrtg-archiver-script/README +++ b/contrib/mrtg-archiver-script/README diff --git a/src/contrib/mrtg-archiver-script/index.html b/contrib/mrtg-archiver-script/index.html index a22abd5..a22abd5 100644 --- a/src/contrib/mrtg-archiver-script/index.html +++ b/contrib/mrtg-archiver-script/index.html diff --git a/src/contrib/mrtg-archiver-script/mrtg-archiver b/contrib/mrtg-archiver-script/mrtg-archiver index f3a53dc..f3a53dc 100755 --- a/src/contrib/mrtg-archiver-script/mrtg-archiver +++ b/contrib/mrtg-archiver-script/mrtg-archiver diff --git a/src/contrib/mrtg-archiver-script/mrtgnav b/contrib/mrtg-archiver-script/mrtgnav index efcad3d..efcad3d 100755 --- a/src/contrib/mrtg-archiver-script/mrtgnav +++ b/contrib/mrtg-archiver-script/mrtgnav diff --git a/src/contrib/mrtg-archiver-script/to-crontab b/contrib/mrtg-archiver-script/to-crontab index 23bf968..23bf968 100644 --- a/src/contrib/mrtg-archiver-script/to-crontab +++ b/contrib/mrtg-archiver-script/to-crontab diff --git a/src/contrib/mrtg-archiver/README b/contrib/mrtg-archiver/README index d0c3f51..d0c3f51 100644 --- a/src/contrib/mrtg-archiver/README +++ b/contrib/mrtg-archiver/README diff --git a/src/contrib/mrtg-archiver/backup.pl b/contrib/mrtg-archiver/backup.pl index b04559e..b04559e 100644 --- a/src/contrib/mrtg-archiver/backup.pl +++ b/contrib/mrtg-archiver/backup.pl diff --git a/src/contrib/mrtg-archiver/mrtg.archive.conf b/contrib/mrtg-archiver/mrtg.archive.conf index 6d39694..6d39694 100644 --- a/src/contrib/mrtg-archiver/mrtg.archive.conf +++ b/contrib/mrtg-archiver/mrtg.archive.conf diff --git a/src/contrib/mrtg-archiver/mrtg.archive.pl b/contrib/mrtg-archiver/mrtg.archive.pl index d8bfb80..d8bfb80 100755 --- a/src/contrib/mrtg-archiver/mrtg.archive.pl +++ b/contrib/mrtg-archiver/mrtg.archive.pl diff --git a/src/contrib/mrtg-blast/COPYING b/contrib/mrtg-blast/COPYING index e77696a..e77696a 100644 --- a/src/contrib/mrtg-blast/COPYING +++ b/contrib/mrtg-blast/COPYING diff --git a/src/contrib/mrtg-blast/COPYRIGHT b/contrib/mrtg-blast/COPYRIGHT index 269b541..269b541 100644 --- a/src/contrib/mrtg-blast/COPYRIGHT +++ b/contrib/mrtg-blast/COPYRIGHT diff --git a/src/contrib/mrtg-blast/INSTALL b/contrib/mrtg-blast/INSTALL index 63a60d4..63a60d4 100644 --- a/src/contrib/mrtg-blast/INSTALL +++ b/contrib/mrtg-blast/INSTALL diff --git a/src/contrib/mrtg-blast/README b/contrib/mrtg-blast/README index 5d1c790..5d1c790 100644 --- a/src/contrib/mrtg-blast/README +++ b/contrib/mrtg-blast/README diff --git a/src/contrib/mrtg-blast/mrtg-blast b/contrib/mrtg-blast/mrtg-blast index 1922f0c..1922f0c 100755 --- a/src/contrib/mrtg-blast/mrtg-blast +++ b/contrib/mrtg-blast/mrtg-blast diff --git a/src/contrib/mrtg-blast/mrtg-blast.cfg b/contrib/mrtg-blast/mrtg-blast.cfg index af33007..af33007 100644 --- a/src/contrib/mrtg-blast/mrtg-blast.cfg +++ b/contrib/mrtg-blast/mrtg-blast.cfg diff --git a/src/contrib/mrtg-blast/tcpblast.c b/contrib/mrtg-blast/tcpblast.c index f4f47ed..f4f47ed 100644 --- a/src/contrib/mrtg-blast/tcpblast.c +++ b/contrib/mrtg-blast/tcpblast.c diff --git a/src/contrib/mrtg-dynip/Changes b/contrib/mrtg-dynip/Changes index 5af98e2..5af98e2 100644 --- a/src/contrib/mrtg-dynip/Changes +++ b/contrib/mrtg-dynip/Changes diff --git a/src/contrib/mrtg-dynip/FAQ b/contrib/mrtg-dynip/FAQ index f6ae5a7..f6ae5a7 100644 --- a/src/contrib/mrtg-dynip/FAQ +++ b/contrib/mrtg-dynip/FAQ diff --git a/src/contrib/mrtg-dynip/Install b/contrib/mrtg-dynip/Install index 13c8dca..13c8dca 100644 --- a/src/contrib/mrtg-dynip/Install +++ b/contrib/mrtg-dynip/Install diff --git a/src/contrib/mrtg-dynip/README b/contrib/mrtg-dynip/README index 11f1bd5..11f1bd5 100644 --- a/src/contrib/mrtg-dynip/README +++ b/contrib/mrtg-dynip/README diff --git a/src/contrib/mrtg-dynip/TODO b/contrib/mrtg-dynip/TODO index ad31c88..ad31c88 100644 --- a/src/contrib/mrtg-dynip/TODO +++ b/contrib/mrtg-dynip/TODO diff --git a/src/contrib/mrtg-dynip/mrtg-dynip b/contrib/mrtg-dynip/mrtg-dynip index 8c38904..8c38904 100755 --- a/src/contrib/mrtg-dynip/mrtg-dynip +++ b/contrib/mrtg-dynip/mrtg-dynip diff --git a/src/contrib/mrtg-dynip/mrtg-dynip-sydnet b/contrib/mrtg-dynip/mrtg-dynip-sydnet index addc14b..addc14b 100644 --- a/src/contrib/mrtg-dynip/mrtg-dynip-sydnet +++ b/contrib/mrtg-dynip/mrtg-dynip-sydnet diff --git a/src/contrib/mrtg-ipacc/README b/contrib/mrtg-ipacc/README index 27afd84..27afd84 100644 --- a/src/contrib/mrtg-ipacc/README +++ b/contrib/mrtg-ipacc/README diff --git a/src/contrib/mrtg-ipacc/ipacc b/contrib/mrtg-ipacc/ipacc index e307f71..e307f71 100755 --- a/src/contrib/mrtg-ipacc/ipacc +++ b/contrib/mrtg-ipacc/ipacc diff --git a/src/contrib/mrtg-ipacc/ipfwadm-wrapper b/contrib/mrtg-ipacc/ipfwadm-wrapper index ddda4f4..ddda4f4 100755 --- a/src/contrib/mrtg-ipacc/ipfwadm-wrapper +++ b/contrib/mrtg-ipacc/ipfwadm-wrapper diff --git a/src/contrib/mrtg-ipget/README b/contrib/mrtg-ipget/README index 7a1d04f..7a1d04f 100644 --- a/src/contrib/mrtg-ipget/README +++ b/contrib/mrtg-ipget/README diff --git a/src/contrib/mrtg-ipget/mrtg-ipget.patch b/contrib/mrtg-ipget/mrtg-ipget.patch index c8f6d0d..c8f6d0d 100644 --- a/src/contrib/mrtg-ipget/mrtg-ipget.patch +++ b/contrib/mrtg-ipget/mrtg-ipget.patch diff --git a/src/contrib/mrtg-mail/README b/contrib/mrtg-mail/README index 81d2ad1..81d2ad1 100644 --- a/src/contrib/mrtg-mail/README +++ b/contrib/mrtg-mail/README diff --git a/src/contrib/mrtg-mail/inetd.conf-dist b/contrib/mrtg-mail/inetd.conf-dist index 207ab7b..207ab7b 100644 --- a/src/contrib/mrtg-mail/inetd.conf-dist +++ b/contrib/mrtg-mail/inetd.conf-dist diff --git a/src/contrib/mrtg-mail/mailstats b/contrib/mrtg-mail/mailstats index e75bb8a..e75bb8a 100755 --- a/src/contrib/mrtg-mail/mailstats +++ b/contrib/mrtg-mail/mailstats diff --git a/src/contrib/mrtg-mail/mailstats-alternate b/contrib/mrtg-mail/mailstats-alternate index 7443e36..7443e36 100644 --- a/src/contrib/mrtg-mail/mailstats-alternate +++ b/contrib/mrtg-mail/mailstats-alternate diff --git a/src/contrib/mrtg-mail/mailstats-horowitz b/contrib/mrtg-mail/mailstats-horowitz index 82dec14..82dec14 100644 --- a/src/contrib/mrtg-mail/mailstats-horowitz +++ b/contrib/mrtg-mail/mailstats-horowitz diff --git a/src/contrib/mrtg-mail/mailstats.cfg b/contrib/mrtg-mail/mailstats.cfg index 33fc6ef..33fc6ef 100644 --- a/src/contrib/mrtg-mail/mailstats.cfg +++ b/contrib/mrtg-mail/mailstats.cfg diff --git a/src/contrib/mrtg-mail/mqueue b/contrib/mrtg-mail/mqueue index fa30105..fa30105 100755 --- a/src/contrib/mrtg-mail/mqueue +++ b/contrib/mrtg-mail/mqueue diff --git a/src/contrib/mrtg-mail/mqueue.cfg b/contrib/mrtg-mail/mqueue.cfg index d7c7802..d7c7802 100644 --- a/src/contrib/mrtg-mail/mqueue.cfg +++ b/contrib/mrtg-mail/mqueue.cfg diff --git a/src/contrib/mrtg-mail/services-dist b/contrib/mrtg-mail/services-dist index 84de5ba..84de5ba 100644 --- a/src/contrib/mrtg-mail/services-dist +++ b/contrib/mrtg-mail/services-dist diff --git a/src/contrib/mrtg-mail/smtp-stats b/contrib/mrtg-mail/smtp-stats index e3dfaaf..e3dfaaf 100755 --- a/src/contrib/mrtg-mail/smtp-stats +++ b/contrib/mrtg-mail/smtp-stats diff --git a/src/contrib/mrtg-startup-script/README b/contrib/mrtg-startup-script/README index f8eaefa..f8eaefa 100644 --- a/src/contrib/mrtg-startup-script/README +++ b/contrib/mrtg-startup-script/README diff --git a/src/contrib/mrtg-startup-script/mrtg b/contrib/mrtg-startup-script/mrtg index 42d49aa..42d49aa 100644 --- a/src/contrib/mrtg-startup-script/mrtg +++ b/contrib/mrtg-startup-script/mrtg diff --git a/src/contrib/mrtg.php/README.txt b/contrib/mrtg.php/README.txt index 804df86..804df86 100644 --- a/src/contrib/mrtg.php/README.txt +++ b/contrib/mrtg.php/README.txt diff --git a/src/contrib/mrtg.php/mrtg.php b/contrib/mrtg.php/mrtg.php index e382150..e382150 100644 --- a/src/contrib/mrtg.php/mrtg.php +++ b/contrib/mrtg.php/mrtg.php diff --git a/src/contrib/mrtg_php_portal/conf/config.inc.php b/contrib/mrtg_php_portal/conf/config.inc.php index 5c8346d..5c8346d 100644 --- a/src/contrib/mrtg_php_portal/conf/config.inc.php +++ b/contrib/mrtg_php_portal/conf/config.inc.php diff --git a/src/contrib/mrtg_php_portal/readme.txt b/contrib/mrtg_php_portal/readme.txt index 7c1d064..7c1d064 100644 --- a/src/contrib/mrtg_php_portal/readme.txt +++ b/contrib/mrtg_php_portal/readme.txt diff --git a/src/contrib/mrtg_php_portal/update.pl b/contrib/mrtg_php_portal/update.pl index cff2835..cff2835 100644 --- a/src/contrib/mrtg_php_portal/update.pl +++ b/contrib/mrtg_php_portal/update.pl diff --git a/src/contrib/mrtg_php_portal/www/admin.php b/contrib/mrtg_php_portal/www/admin.php index 0c0359d..0c0359d 100644 --- a/src/contrib/mrtg_php_portal/www/admin.php +++ b/contrib/mrtg_php_portal/www/admin.php diff --git a/src/contrib/mrtg_php_portal/www/index.php b/contrib/mrtg_php_portal/www/index.php index 2ba6799..2ba6799 100644 --- a/src/contrib/mrtg_php_portal/www/index.php +++ b/contrib/mrtg_php_portal/www/index.php diff --git a/src/contrib/mrtg_php_portal/www/login.php b/contrib/mrtg_php_portal/www/login.php index e183fe6..e183fe6 100644 --- a/src/contrib/mrtg_php_portal/www/login.php +++ b/contrib/mrtg_php_portal/www/login.php diff --git a/src/contrib/mrtg_php_portal/www/remove.php b/contrib/mrtg_php_portal/www/remove.php index 26c3de1..26c3de1 100644 --- a/src/contrib/mrtg_php_portal/www/remove.php +++ b/contrib/mrtg_php_portal/www/remove.php diff --git a/src/contrib/mrtg_php_portal/www/setup.php b/contrib/mrtg_php_portal/www/setup.php index 8eca344..8eca344 100644 --- a/src/contrib/mrtg_php_portal/www/setup.php +++ b/contrib/mrtg_php_portal/www/setup.php diff --git a/src/contrib/mrtg_php_portal/www/update.php b/contrib/mrtg_php_portal/www/update.php index 68bf3fc..68bf3fc 100644 --- a/src/contrib/mrtg_php_portal/www/update.php +++ b/contrib/mrtg_php_portal/www/update.php diff --git a/src/contrib/mrtgidx/mrtgidx b/contrib/mrtgidx/mrtgidx index 575bd49..575bd49 100755 --- a/src/contrib/mrtgidx/mrtgidx +++ b/contrib/mrtgidx/mrtgidx diff --git a/src/contrib/mrtgindex.cgi/README b/contrib/mrtgindex.cgi/README index 3164dfd..3164dfd 100644 --- a/src/contrib/mrtgindex.cgi/README +++ b/contrib/mrtgindex.cgi/README diff --git a/src/contrib/mrtgindex.cgi/mrtgindx.cgi b/contrib/mrtgindex.cgi/mrtgindx.cgi index 34420df..34420df 100755 --- a/src/contrib/mrtgindex.cgi/mrtgindx.cgi +++ b/contrib/mrtgindex.cgi/mrtgindx.cgi diff --git a/src/contrib/mrtglog/README b/contrib/mrtglog/README index 152a3e4..152a3e4 100644 --- a/src/contrib/mrtglog/README +++ b/contrib/mrtglog/README diff --git a/src/contrib/mrtglog/mrtglog.c b/contrib/mrtglog/mrtglog.c index 3fc7624..3fc7624 100644 --- a/src/contrib/mrtglog/mrtglog.c +++ b/contrib/mrtglog/mrtglog.c diff --git a/src/contrib/mrtglog/mrtglog.h b/contrib/mrtglog/mrtglog.h index a031085..a031085 100644 --- a/src/contrib/mrtglog/mrtglog.h +++ b/contrib/mrtglog/mrtglog.h diff --git a/src/contrib/mrtgmk/cfg/192.168.10.1.cfg b/contrib/mrtgmk/cfg/192.168.10.1.cfg index 236f079..236f079 100644 --- a/src/contrib/mrtgmk/cfg/192.168.10.1.cfg +++ b/contrib/mrtgmk/cfg/192.168.10.1.cfg diff --git a/src/contrib/mrtgmk/cfg/EXAMPLE1 b/contrib/mrtgmk/cfg/EXAMPLE1 index 012d94a..012d94a 100755 --- a/src/contrib/mrtgmk/cfg/EXAMPLE1 +++ b/contrib/mrtgmk/cfg/EXAMPLE1 diff --git a/src/contrib/mrtgmk/cfg/a.cfg b/contrib/mrtgmk/cfg/a.cfg index 36a6b23..36a6b23 100644 --- a/src/contrib/mrtgmk/cfg/a.cfg +++ b/contrib/mrtgmk/cfg/a.cfg diff --git a/src/contrib/mrtgmk/cfg/alias.cfg b/contrib/mrtgmk/cfg/alias.cfg index b361c3e..b361c3e 100644 --- a/src/contrib/mrtgmk/cfg/alias.cfg +++ b/contrib/mrtgmk/cfg/alias.cfg diff --git a/src/contrib/mrtgmk/cfg/convert.cfg b/contrib/mrtgmk/cfg/convert.cfg index 5bf5806..5bf5806 100644 --- a/src/contrib/mrtgmk/cfg/convert.cfg +++ b/contrib/mrtgmk/cfg/convert.cfg diff --git a/src/contrib/mrtgmk/cfg/hosts.cfg b/contrib/mrtgmk/cfg/hosts.cfg index 831bc46..831bc46 100644 --- a/src/contrib/mrtgmk/cfg/hosts.cfg +++ b/contrib/mrtgmk/cfg/hosts.cfg diff --git a/src/contrib/mrtgmk/cfg/links.cfg b/contrib/mrtgmk/cfg/links.cfg index a26e37a..a26e37a 100644 --- a/src/contrib/mrtgmk/cfg/links.cfg +++ b/contrib/mrtgmk/cfg/links.cfg diff --git a/src/contrib/mrtgmk/cfg/misc.cfg b/contrib/mrtgmk/cfg/misc.cfg index 005e95e..005e95e 100644 --- a/src/contrib/mrtgmk/cfg/misc.cfg +++ b/contrib/mrtgmk/cfg/misc.cfg diff --git a/src/contrib/mrtgmk/cfg/mrtg.cfg b/contrib/mrtgmk/cfg/mrtg.cfg index 5a471bd..5a471bd 100644 --- a/src/contrib/mrtgmk/cfg/mrtg.cfg +++ b/contrib/mrtgmk/cfg/mrtg.cfg diff --git a/src/contrib/mrtgmk/cfg/mrtg_cfg b/contrib/mrtgmk/cfg/mrtg_cfg index ba0a137..ba0a137 100644 --- a/src/contrib/mrtgmk/cfg/mrtg_cfg +++ b/contrib/mrtgmk/cfg/mrtg_cfg diff --git a/src/contrib/mrtgmk/cfg/page1.cfg b/contrib/mrtgmk/cfg/page1.cfg index 6deda91..6deda91 100644 --- a/src/contrib/mrtgmk/cfg/page1.cfg +++ b/contrib/mrtgmk/cfg/page1.cfg diff --git a/src/contrib/mrtgmk/cfg/page1.html b/contrib/mrtgmk/cfg/page1.html index 053a835..053a835 100644 --- a/src/contrib/mrtgmk/cfg/page1.html +++ b/contrib/mrtgmk/cfg/page1.html diff --git a/src/contrib/mrtgmk/cfg/page2.cfg b/contrib/mrtgmk/cfg/page2.cfg index e8fb36f..e8fb36f 100644 --- a/src/contrib/mrtgmk/cfg/page2.cfg +++ b/contrib/mrtgmk/cfg/page2.cfg diff --git a/src/contrib/mrtgmk/cfg/page2.html b/contrib/mrtgmk/cfg/page2.html index ef75845..ef75845 100644 --- a/src/contrib/mrtgmk/cfg/page2.html +++ b/contrib/mrtgmk/cfg/page2.html diff --git a/src/contrib/mrtgmk/cfg/today.html b/contrib/mrtgmk/cfg/today.html index 7d8af11..7d8af11 100644 --- a/src/contrib/mrtgmk/cfg/today.html +++ b/contrib/mrtgmk/cfg/today.html diff --git a/src/contrib/mrtgmk/doc/commands b/contrib/mrtgmk/doc/commands index 396d275..396d275 100644 --- a/src/contrib/mrtgmk/doc/commands +++ b/contrib/mrtgmk/doc/commands diff --git a/src/contrib/mrtgmk/doc/readme.1st b/contrib/mrtgmk/doc/readme.1st index 19c6390..19c6390 100644 --- a/src/contrib/mrtgmk/doc/readme.1st +++ b/contrib/mrtgmk/doc/readme.1st diff --git a/src/contrib/mrtgmk/readme.1st b/contrib/mrtgmk/readme.1st index 49dc699..49dc699 100644 --- a/src/contrib/mrtgmk/readme.1st +++ b/contrib/mrtgmk/readme.1st diff --git a/src/contrib/mrtgmk/smrtgmk b/contrib/mrtgmk/smrtgmk index da927e9..da927e9 100755 --- a/src/contrib/mrtgmk/smrtgmk +++ b/contrib/mrtgmk/smrtgmk diff --git a/src/contrib/mrtgmk/src/alias.c b/contrib/mrtgmk/src/alias.c index e10d796..e10d796 100644 --- a/src/contrib/mrtgmk/src/alias.c +++ b/contrib/mrtgmk/src/alias.c diff --git a/src/contrib/mrtgmk/src/defhost.c b/contrib/mrtgmk/src/defhost.c index 5bcf918..5bcf918 100644 --- a/src/contrib/mrtgmk/src/defhost.c +++ b/contrib/mrtgmk/src/defhost.c diff --git a/src/contrib/mrtgmk/src/fnct0.c b/contrib/mrtgmk/src/fnct0.c index 212e4a4..212e4a4 100644 --- a/src/contrib/mrtgmk/src/fnct0.c +++ b/contrib/mrtgmk/src/fnct0.c diff --git a/src/contrib/mrtgmk/src/fnctn.c b/contrib/mrtgmk/src/fnctn.c index c47c89b..c47c89b 100644 --- a/src/contrib/mrtgmk/src/fnctn.c +++ b/contrib/mrtgmk/src/fnctn.c diff --git a/src/contrib/mrtgmk/src/gif.c b/contrib/mrtgmk/src/gif.c index cea0519..cea0519 100644 --- a/src/contrib/mrtgmk/src/gif.c +++ b/contrib/mrtgmk/src/gif.c diff --git a/src/contrib/mrtgmk/src/html.c b/contrib/mrtgmk/src/html.c index 125bd73..125bd73 100644 --- a/src/contrib/mrtgmk/src/html.c +++ b/contrib/mrtgmk/src/html.c diff --git a/src/contrib/mrtgmk/src/mkm b/contrib/mrtgmk/src/mkm index 82c6082..82c6082 100755 --- a/src/contrib/mrtgmk/src/mkm +++ b/contrib/mrtgmk/src/mkm diff --git a/src/contrib/mrtgmk/src/mrtgmk.c b/contrib/mrtgmk/src/mrtgmk.c index 2b0602d..2b0602d 100644 --- a/src/contrib/mrtgmk/src/mrtgmk.c +++ b/contrib/mrtgmk/src/mrtgmk.c diff --git a/src/contrib/mrtgmk/src/parse.c b/contrib/mrtgmk/src/parse.c index 24357cc..24357cc 100644 --- a/src/contrib/mrtgmk/src/parse.c +++ b/contrib/mrtgmk/src/parse.c diff --git a/src/contrib/mrtgmk/src/parse.ftbl b/contrib/mrtgmk/src/parse.ftbl index e14b123..e14b123 100644 --- a/src/contrib/mrtgmk/src/parse.ftbl +++ b/contrib/mrtgmk/src/parse.ftbl diff --git a/src/contrib/mrtgmk/src/parse0.c b/contrib/mrtgmk/src/parse0.c index b234bf0..b234bf0 100644 --- a/src/contrib/mrtgmk/src/parse0.c +++ b/contrib/mrtgmk/src/parse0.c diff --git a/src/contrib/mrtgmk/src/parse0.ftbl b/contrib/mrtgmk/src/parse0.ftbl index a735fc0..a735fc0 100644 --- a/src/contrib/mrtgmk/src/parse0.ftbl +++ b/contrib/mrtgmk/src/parse0.ftbl diff --git a/src/contrib/mrtgmk/src/parsen.c b/contrib/mrtgmk/src/parsen.c index 889f2b0..889f2b0 100644 --- a/src/contrib/mrtgmk/src/parsen.c +++ b/contrib/mrtgmk/src/parsen.c diff --git a/src/contrib/mrtgmk/src/parsen.ftbl b/contrib/mrtgmk/src/parsen.ftbl index 1ffdd35..1ffdd35 100644 --- a/src/contrib/mrtgmk/src/parsen.ftbl +++ b/contrib/mrtgmk/src/parsen.ftbl diff --git a/src/contrib/mrtgmk/src/txte.h b/contrib/mrtgmk/src/txte.h index fb9731b..fb9731b 100644 --- a/src/contrib/mrtgmk/src/txte.h +++ b/contrib/mrtgmk/src/txte.h diff --git a/src/contrib/mrtgmk/src/txtro.h b/contrib/mrtgmk/src/txtro.h index 27814af..27814af 100644 --- a/src/contrib/mrtgmk/src/txtro.h +++ b/contrib/mrtgmk/src/txtro.h diff --git a/src/contrib/mrtgmk/src/util.c b/contrib/mrtgmk/src/util.c index ec2de79..ec2de79 100644 --- a/src/contrib/mrtgmk/src/util.c +++ b/contrib/mrtgmk/src/util.c diff --git a/src/contrib/mrtgmk/src/vars.h b/contrib/mrtgmk/src/vars.h index 64c620b..64c620b 100644 --- a/src/contrib/mrtgmk/src/vars.h +++ b/contrib/mrtgmk/src/vars.h diff --git a/src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz b/contrib/mrtgrq/Net-Telnet-3.02.tar.gz Binary files differindex b164ed4..b164ed4 100644 --- a/src/contrib/mrtgrq/Net-Telnet-3.02.tar.gz +++ b/contrib/mrtgrq/Net-Telnet-3.02.tar.gz diff --git a/src/contrib/mrtgrq/README b/contrib/mrtgrq/README index 8d659a9..8d659a9 100644 --- a/src/contrib/mrtgrq/README +++ b/contrib/mrtgrq/README diff --git a/src/contrib/mrtgrq/cubprev.gif b/contrib/mrtgrq/cubprev.gif Binary files differindex d6f3d0f..d6f3d0f 100644 --- a/src/contrib/mrtgrq/cubprev.gif +++ b/contrib/mrtgrq/cubprev.gif diff --git a/src/contrib/mrtgrq/getreport.pl b/contrib/mrtgrq/getreport.pl index 39214df..39214df 100755 --- a/src/contrib/mrtgrq/getreport.pl +++ b/contrib/mrtgrq/getreport.pl diff --git a/src/contrib/mrtgrq/grnball.gif b/contrib/mrtgrq/grnball.gif Binary files differindex 5f7740b..5f7740b 100644 --- a/src/contrib/mrtgrq/grnball.gif +++ b/contrib/mrtgrq/grnball.gif diff --git a/src/contrib/mrtgrq/make-mrtg.cfg.awk b/contrib/mrtgrq/make-mrtg.cfg.awk index 3628e3d..3628e3d 100644 --- a/src/contrib/mrtgrq/make-mrtg.cfg.awk +++ b/contrib/mrtgrq/make-mrtg.cfg.awk diff --git a/src/contrib/mrtgrq/mrtgrq b/contrib/mrtgrq/mrtgrq index 14c69f7..14c69f7 100755 --- a/src/contrib/mrtgrq/mrtgrq +++ b/contrib/mrtgrq/mrtgrq diff --git a/src/contrib/mrtgrq/mrtgrq.css b/contrib/mrtgrq/mrtgrq.css index 2f080d5..2f080d5 100644 --- a/src/contrib/mrtgrq/mrtgrq.css +++ b/contrib/mrtgrq/mrtgrq.css diff --git a/src/contrib/mrtgrq/redball.gif b/contrib/mrtgrq/redball.gif Binary files differindex 7005133..7005133 100644 --- a/src/contrib/mrtgrq/redball.gif +++ b/contrib/mrtgrq/redball.gif diff --git a/src/contrib/net-hosts/README b/contrib/net-hosts/README index 5574d94..5574d94 100644 --- a/src/contrib/net-hosts/README +++ b/contrib/net-hosts/README diff --git a/src/contrib/net-hosts/cubprev.gif b/contrib/net-hosts/cubprev.gif Binary files differindex d6f3d0f..d6f3d0f 100644 --- a/src/contrib/net-hosts/cubprev.gif +++ b/contrib/net-hosts/cubprev.gif diff --git a/src/contrib/net-hosts/grnball.gif b/contrib/net-hosts/grnball.gif Binary files differindex 5f7740b..5f7740b 100644 --- a/src/contrib/net-hosts/grnball.gif +++ b/contrib/net-hosts/grnball.gif diff --git a/src/contrib/net-hosts/internet b/contrib/net-hosts/internet index 0cb7a1d..0cb7a1d 100644 --- a/src/contrib/net-hosts/internet +++ b/contrib/net-hosts/internet diff --git a/src/contrib/net-hosts/make-mrtg.cfg.awk b/contrib/net-hosts/make-mrtg.cfg.awk index e0e75bd..e0e75bd 100644 --- a/src/contrib/net-hosts/make-mrtg.cfg.awk +++ b/contrib/net-hosts/make-mrtg.cfg.awk diff --git a/src/contrib/net-hosts/net-hosts b/contrib/net-hosts/net-hosts index 8adbadc..8adbadc 100755 --- a/src/contrib/net-hosts/net-hosts +++ b/contrib/net-hosts/net-hosts diff --git a/src/contrib/net-hosts/net-hosts.css b/contrib/net-hosts/net-hosts.css index 2f080d5..2f080d5 100644 --- a/src/contrib/net-hosts/net-hosts.css +++ b/contrib/net-hosts/net-hosts.css diff --git a/src/contrib/net-hosts/redball.gif b/contrib/net-hosts/redball.gif Binary files differindex 7005133..7005133 100644 --- a/src/contrib/net-hosts/redball.gif +++ b/contrib/net-hosts/redball.gif diff --git a/src/contrib/nt-services/5mrtg.exe b/contrib/nt-services/5mrtg.exe Binary files differindex fe7029e..fe7029e 100644 --- a/src/contrib/nt-services/5mrtg.exe +++ b/contrib/nt-services/5mrtg.exe diff --git a/src/contrib/nt-services/5mrtg.reg b/contrib/nt-services/5mrtg.reg index 4f8dd1a..4f8dd1a 100644 --- a/src/contrib/nt-services/5mrtg.reg +++ b/contrib/nt-services/5mrtg.reg diff --git a/src/contrib/nt-services/README b/contrib/nt-services/README index aa5b086..aa5b086 100644 --- a/src/contrib/nt-services/README +++ b/contrib/nt-services/README diff --git a/src/contrib/nt-services/install.cmd b/contrib/nt-services/install.cmd index d3a313d..d3a313d 100644 --- a/src/contrib/nt-services/install.cmd +++ b/contrib/nt-services/install.cmd diff --git a/src/contrib/nt-services/mrtg-etc.zip b/contrib/nt-services/mrtg-etc.zip Binary files differindex 997a882..997a882 100644 --- a/src/contrib/nt-services/mrtg-etc.zip +++ b/contrib/nt-services/mrtg-etc.zip diff --git a/src/contrib/nt_n_cisco/README b/contrib/nt_n_cisco/README index efc522a..efc522a 100644 --- a/src/contrib/nt_n_cisco/README +++ b/contrib/nt_n_cisco/README diff --git a/src/contrib/nt_n_cisco/RUN_builder.bat b/contrib/nt_n_cisco/RUN_builder.bat index f6f36c1..f6f36c1 100644 --- a/src/contrib/nt_n_cisco/RUN_builder.bat +++ b/contrib/nt_n_cisco/RUN_builder.bat diff --git a/src/contrib/nt_n_cisco/RunCcfgs.cmd b/contrib/nt_n_cisco/RunCcfgs.cmd index 16edf78..16edf78 100644 --- a/src/contrib/nt_n_cisco/RunCcfgs.cmd +++ b/contrib/nt_n_cisco/RunCcfgs.cmd diff --git a/src/contrib/nt_n_cisco/builder.bat b/contrib/nt_n_cisco/builder.bat index d3fece4..d3fece4 100644 --- a/src/contrib/nt_n_cisco/builder.bat +++ b/contrib/nt_n_cisco/builder.bat diff --git a/src/contrib/nt_n_cisco/cisco_devices_to_poll.txt b/contrib/nt_n_cisco/cisco_devices_to_poll.txt index 981fae1..981fae1 100644 --- a/src/contrib/nt_n_cisco/cisco_devices_to_poll.txt +++ b/contrib/nt_n_cisco/cisco_devices_to_poll.txt diff --git a/src/contrib/nt_n_cisco/default.asp b/contrib/nt_n_cisco/default.asp index d7f4a75..d7f4a75 100644 --- a/src/contrib/nt_n_cisco/default.asp +++ b/contrib/nt_n_cisco/default.asp diff --git a/src/contrib/nt_n_cisco/make_all_cisco_configs.bat b/contrib/nt_n_cisco/make_all_cisco_configs.bat index b40f59b..b40f59b 100644 --- a/src/contrib/nt_n_cisco/make_all_cisco_configs.bat +++ b/contrib/nt_n_cisco/make_all_cisco_configs.bat diff --git a/src/contrib/nt_n_cisco/nt_template.cfg b/contrib/nt_n_cisco/nt_template.cfg index 9d2a5f7..9d2a5f7 100644 --- a/src/contrib/nt_n_cisco/nt_template.cfg +++ b/contrib/nt_n_cisco/nt_template.cfg diff --git a/src/contrib/nt_n_cisco/queryone.bat b/contrib/nt_n_cisco/queryone.bat index 2cbc1c8..2cbc1c8 100644 --- a/src/contrib/nt_n_cisco/queryone.bat +++ b/contrib/nt_n_cisco/queryone.bat diff --git a/src/contrib/ovmrtg/README b/contrib/ovmrtg/README index 3c835e1..3c835e1 100644 --- a/src/contrib/ovmrtg/README +++ b/contrib/ovmrtg/README diff --git a/src/contrib/ovmrtg/buildht b/contrib/ovmrtg/buildht index 8488e6f..8488e6f 100644 --- a/src/contrib/ovmrtg/buildht +++ b/contrib/ovmrtg/buildht diff --git a/src/contrib/ovmrtg/buildrtov b/contrib/ovmrtg/buildrtov index 608b2ae..608b2ae 100644 --- a/src/contrib/ovmrtg/buildrtov +++ b/contrib/ovmrtg/buildrtov diff --git a/src/contrib/ovmrtg/cfgmakerov b/contrib/ovmrtg/cfgmakerov index 0516bb1..0516bb1 100644 --- a/src/contrib/ovmrtg/cfgmakerov +++ b/contrib/ovmrtg/cfgmakerov diff --git a/src/contrib/ovmrtg/index b/contrib/ovmrtg/index index 8de2bec..8de2bec 100644 --- a/src/contrib/ovmrtg/index +++ b/contrib/ovmrtg/index diff --git a/src/contrib/ovmrtg/installov b/contrib/ovmrtg/installov index 938b253..938b253 100755 --- a/src/contrib/ovmrtg/installov +++ b/contrib/ovmrtg/installov diff --git a/src/contrib/ovmrtg/installov.cmds b/contrib/ovmrtg/installov.cmds index 2b57907..2b57907 100644 --- a/src/contrib/ovmrtg/installov.cmds +++ b/contrib/ovmrtg/installov.cmds diff --git a/src/contrib/ovmrtg/installov.pl b/contrib/ovmrtg/installov.pl index b259ba7..b259ba7 100644 --- a/src/contrib/ovmrtg/installov.pl +++ b/contrib/ovmrtg/installov.pl diff --git a/src/contrib/ovmrtg/mrtgmenu b/contrib/ovmrtg/mrtgmenu index ecc9c1e..ecc9c1e 100644 --- a/src/contrib/ovmrtg/mrtgmenu +++ b/contrib/ovmrtg/mrtgmenu diff --git a/src/contrib/ovmrtg/newrtrov.txt b/contrib/ovmrtg/newrtrov.txt index 6d5cfc4..6d5cfc4 100644 --- a/src/contrib/ovmrtg/newrtrov.txt +++ b/contrib/ovmrtg/newrtrov.txt diff --git a/src/contrib/ovmrtg/ovadd b/contrib/ovmrtg/ovadd index d912235..d912235 100644 --- a/src/contrib/ovmrtg/ovadd +++ b/contrib/ovmrtg/ovadd diff --git a/src/contrib/ovmrtg/ovcols b/contrib/ovmrtg/ovcols index f41e9c9..f41e9c9 100644 --- a/src/contrib/ovmrtg/ovcols +++ b/contrib/ovmrtg/ovcols diff --git a/src/contrib/ovmrtg/ovcullfile b/contrib/ovmrtg/ovcullfile index 4ed41fe..4ed41fe 100644 --- a/src/contrib/ovmrtg/ovcullfile +++ b/contrib/ovmrtg/ovcullfile diff --git a/src/contrib/ovmrtg/ovcvtfile b/contrib/ovmrtg/ovcvtfile index 8d145d9..8d145d9 100644 --- a/src/contrib/ovmrtg/ovcvtfile +++ b/contrib/ovmrtg/ovcvtfile diff --git a/src/contrib/ovmrtg/ovdel b/contrib/ovmrtg/ovdel index 5896273..5896273 100644 --- a/src/contrib/ovmrtg/ovdel +++ b/contrib/ovmrtg/ovdel diff --git a/src/contrib/ovmrtg/oveval.txt b/contrib/ovmrtg/oveval.txt index 09abc32..09abc32 100644 --- a/src/contrib/ovmrtg/oveval.txt +++ b/contrib/ovmrtg/oveval.txt diff --git a/src/contrib/ovmrtg/ovin b/contrib/ovmrtg/ovin index 50612cc..50612cc 100644 --- a/src/contrib/ovmrtg/ovin +++ b/contrib/ovmrtg/ovin diff --git a/src/contrib/ovmrtg/ovmrtg.pm b/contrib/ovmrtg/ovmrtg.pm index 7211a70..7211a70 100644 --- a/src/contrib/ovmrtg/ovmrtg.pm +++ b/contrib/ovmrtg/ovmrtg.pm diff --git a/src/contrib/ovmrtg/ovsho b/contrib/ovmrtg/ovsho index ce0b919..ce0b919 100644 --- a/src/contrib/ovmrtg/ovsho +++ b/contrib/ovmrtg/ovsho diff --git a/src/contrib/ovmrtg/ovsysnms b/contrib/ovmrtg/ovsysnms index 33b265b..33b265b 100644 --- a/src/contrib/ovmrtg/ovsysnms +++ b/contrib/ovmrtg/ovsysnms diff --git a/src/contrib/ovmrtg/ovtgts b/contrib/ovmrtg/ovtgts Binary files differindex 1d31fac..1d31fac 100755 --- a/src/contrib/ovmrtg/ovtgts +++ b/contrib/ovmrtg/ovtgts diff --git a/src/contrib/ovmrtg/ovtst b/contrib/ovmrtg/ovtst index 104d140..104d140 100644 --- a/src/contrib/ovmrtg/ovtst +++ b/contrib/ovmrtg/ovtst diff --git a/src/contrib/ovmrtg/ovupdate b/contrib/ovmrtg/ovupdate index 748119d..748119d 100644 --- a/src/contrib/ovmrtg/ovupdate +++ b/contrib/ovmrtg/ovupdate diff --git a/src/contrib/ping-probe/README b/contrib/ping-probe/README index 6021390..6021390 100644 --- a/src/contrib/ping-probe/README +++ b/contrib/ping-probe/README diff --git a/src/contrib/portmasters/README b/contrib/portmasters/README index 6e16ce2..6e16ce2 100644 --- a/src/contrib/portmasters/README +++ b/contrib/portmasters/README diff --git a/src/contrib/portmasters/gather b/contrib/portmasters/gather index 69ab319..69ab319 100644 --- a/src/contrib/portmasters/gather +++ b/contrib/portmasters/gather diff --git a/src/contrib/portmasters/portm.cfg b/contrib/portmasters/portm.cfg index 4ef3557..4ef3557 100644 --- a/src/contrib/portmasters/portm.cfg +++ b/contrib/portmasters/portm.cfg diff --git a/src/contrib/procmem/README b/contrib/procmem/README index 54ec259..54ec259 100644 --- a/src/contrib/procmem/README +++ b/contrib/procmem/README diff --git a/src/contrib/procmem/create-cfg-mem.pl b/contrib/procmem/create-cfg-mem.pl index 537b228..537b228 100755 --- a/src/contrib/procmem/create-cfg-mem.pl +++ b/contrib/procmem/create-cfg-mem.pl diff --git a/src/contrib/procmem/create-cfg-proc.pl b/contrib/procmem/create-cfg-proc.pl index 205abaa..205abaa 100755 --- a/src/contrib/procmem/create-cfg-proc.pl +++ b/contrib/procmem/create-cfg-proc.pl diff --git a/src/contrib/procmem/getmem.pl b/contrib/procmem/getmem.pl index e117252..e117252 100755 --- a/src/contrib/procmem/getmem.pl +++ b/contrib/procmem/getmem.pl diff --git a/src/contrib/procmem/getproc.pl b/contrib/procmem/getproc.pl index 8bfddad..8bfddad 100755 --- a/src/contrib/procmem/getproc.pl +++ b/contrib/procmem/getproc.pl diff --git a/src/contrib/rdlog2/rdlog2.c b/contrib/rdlog2/rdlog2.c index e43ea95..e43ea95 100755 --- a/src/contrib/rdlog2/rdlog2.c +++ b/contrib/rdlog2/rdlog2.c diff --git a/src/contrib/rdlog2/readme.html b/contrib/rdlog2/readme.html index be7f7f8..be7f7f8 100755 --- a/src/contrib/rdlog2/readme.html +++ b/contrib/rdlog2/readme.html diff --git a/src/contrib/rdlog2/wan.fig b/contrib/rdlog2/wan.fig index 61e9aa5..61e9aa5 100755 --- a/src/contrib/rdlog2/wan.fig +++ b/contrib/rdlog2/wan.fig diff --git a/src/contrib/routers/README b/contrib/routers/README index 8f5316a..8f5316a 100644 --- a/src/contrib/routers/README +++ b/contrib/routers/README diff --git a/src/contrib/rumb-stat/README b/contrib/rumb-stat/README index 3355380..3355380 100644 --- a/src/contrib/rumb-stat/README +++ b/contrib/rumb-stat/README diff --git a/src/contrib/rumb-stat/gethttpstats b/contrib/rumb-stat/gethttpstats index 3854ffb..3854ffb 100644 --- a/src/contrib/rumb-stat/gethttpstats +++ b/contrib/rumb-stat/gethttpstats diff --git a/src/contrib/rumb-stat/getsquidstats b/contrib/rumb-stat/getsquidstats index 1ac17e7..1ac17e7 100644 --- a/src/contrib/rumb-stat/getsquidstats +++ b/contrib/rumb-stat/getsquidstats diff --git a/src/contrib/snmpping/README b/contrib/snmpping/README index 6889a20..6889a20 100644 --- a/src/contrib/snmpping/README +++ b/contrib/snmpping/README diff --git a/src/contrib/snmpping/snmpping.pl b/contrib/snmpping/snmpping.pl index 886e4fc..886e4fc 100755 --- a/src/contrib/snmpping/snmpping.pl +++ b/contrib/snmpping/snmpping.pl diff --git a/src/contrib/stat/README b/contrib/stat/README index f8658cd..f8658cd 100644 --- a/src/contrib/stat/README +++ b/contrib/stat/README diff --git a/src/contrib/stat/dns.named b/contrib/stat/dns.named index 880032b..880032b 100755 --- a/src/contrib/stat/dns.named +++ b/contrib/stat/dns.named diff --git a/src/contrib/stat/dns_mrtg b/contrib/stat/dns_mrtg index 8095811..8095811 100755 --- a/src/contrib/stat/dns_mrtg +++ b/contrib/stat/dns_mrtg diff --git a/src/contrib/stat/mrtg.cfg b/contrib/stat/mrtg.cfg index 580b106..580b106 100755 --- a/src/contrib/stat/mrtg.cfg +++ b/contrib/stat/mrtg.cfg diff --git a/src/contrib/stat/stat.pl b/contrib/stat/stat.pl index 454e44a..454e44a 100755 --- a/src/contrib/stat/stat.pl +++ b/contrib/stat/stat.pl diff --git a/src/contrib/stfc/README b/contrib/stfc/README index 6fb39c7..6fb39c7 100644 --- a/src/contrib/stfc/README +++ b/contrib/stfc/README diff --git a/src/contrib/stfc/stfc b/contrib/stfc/stfc index a60cd6d..a60cd6d 100755 --- a/src/contrib/stfc/stfc +++ b/contrib/stfc/stfc diff --git a/src/contrib/switchmaker/README b/contrib/switchmaker/README index 63d596a..63d596a 100644 --- a/src/contrib/switchmaker/README +++ b/contrib/switchmaker/README diff --git a/src/contrib/switchmaker/switchmaker b/contrib/switchmaker/switchmaker index c4f1aaf..c4f1aaf 100644 --- a/src/contrib/switchmaker/switchmaker +++ b/contrib/switchmaker/switchmaker diff --git a/src/contrib/whodo/GIFgraph/GIFgraph.pm b/contrib/whodo/GIFgraph/GIFgraph.pm index 0e8c26b..0e8c26b 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph.pm +++ b/contrib/whodo/GIFgraph/GIFgraph.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm b/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm index 0aabea6..0aabea6 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/EvenlySpaced.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm b/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm index b340306..b340306 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/WithMap.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/area.pm b/contrib/whodo/GIFgraph/GIFgraph/area.pm index 4c23e6d..4c23e6d 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/area.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/area.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm b/contrib/whodo/GIFgraph/GIFgraph/axestype.pm index 147c8e5..147c8e5 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/axestype.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/axestype.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/bars.pm b/contrib/whodo/GIFgraph/GIFgraph/bars.pm index 1bac098..1bac098 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/bars.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/bars.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/colour.pm b/contrib/whodo/GIFgraph/GIFgraph/colour.pm index 597736a..597736a 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/colour.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/colour.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS b/contrib/whodo/GIFgraph/GIFgraph/install/BUGS index 42e029f..42e029f 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/install/BUGS +++ b/contrib/whodo/GIFgraph/GIFgraph/install/BUGS diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES b/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES index 2bc69a5..2bc69a5 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES +++ b/contrib/whodo/GIFgraph/GIFgraph/install/CHANGES diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST b/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST index 2385824..2385824 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST +++ b/contrib/whodo/GIFgraph/GIFgraph/install/MANIFEST diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL b/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL index 91ac86f..91ac86f 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL +++ b/contrib/whodo/GIFgraph/GIFgraph/install/Makefile.PL diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/install/README b/contrib/whodo/GIFgraph/GIFgraph/install/README index 61693e3..61693e3 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/install/README +++ b/contrib/whodo/GIFgraph/GIFgraph/install/README diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/legend.pm b/contrib/whodo/GIFgraph/GIFgraph/legend.pm index 08429dc..08429dc 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/legend.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/legend.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/lines.pm b/contrib/whodo/GIFgraph/GIFgraph/lines.pm index 8312155..8312155 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/lines.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/lines.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm b/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm index dd6e3d5..dd6e3d5 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/linespoints.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm b/contrib/whodo/GIFgraph/GIFgraph/mixed.pm index d8c9456..d8c9456 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/mixed.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/mixed.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/pie.pm b/contrib/whodo/GIFgraph/GIFgraph/pie.pm index 6128d3a..6128d3a 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/pie.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/pie.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/points.pm b/contrib/whodo/GIFgraph/GIFgraph/points.pm index 92bb425..92bb425 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/points.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/points.pm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile b/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile index 82f4049..82f4049 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/Makefile diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm index bdcdc7b..bdcdc7b 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/index.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif b/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif Binary files differindex b3dc933..b3dc933 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/logo.gif diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt b/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt index 78b353e..78b353e 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/rgb.txt diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm index 4ac5779..4ac5779 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl index 78b742c..78b742c 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample11.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm index f1842b7..f1842b7 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl index f9bc3d2..f9bc3d2 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample12.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm index cab634f..cab634f 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl index 596127e..596127e 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample13.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm index 4a1a59c..4a1a59c 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl index 11d19bb..11d19bb 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample14.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm index b54a85f..b54a85f 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl index 48a3f71..48a3f71 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample15.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm index e973347..e973347 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl index 55b5241..55b5241 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample16.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm index a319309..a319309 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl index 32a34e2..32a34e2 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample21.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm index daea766..daea766 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl index 05bc8df..05bc8df 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample31.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm index a9f7f3c..a9f7f3c 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl index 2de6879..2de6879 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample41.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat index e0b84d4..e0b84d4 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.dat diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm index afa4873..afa4873 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl index 167bbb2..167bbb2 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample42.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm index 950df4e..950df4e 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl index b1c7dd1..b1c7dd1 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample51.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm index 6ade802..6ade802 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl index a9aef1f..a9aef1f 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample52.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm index de27cc8..de27cc8 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl index 2c16f71..2c16f71 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample53.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat index b209a9a..b209a9a 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.dat diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm index 69b6a81..69b6a81 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl index d87ba2e..d87ba2e 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample54.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm index ab91bfe..ab91bfe 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl index 13be33c..13be33c 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample61.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm index f50008a..f50008a 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl index 0d1e775..0d1e775 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample62.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm index 1b018ac..1b018ac 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl index 89770c2..89770c2 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample91.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm index aa9a1c3..aa9a1c3 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl index 93f7e69..93f7e69 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample92.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm b/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm index ed0cf45..ed0cf45 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.htm diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl index 5244777..5244777 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample93.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl b/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl index 948765a..948765a 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/samples/sample94.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/area.t b/contrib/whodo/GIFgraph/GIFgraph/t/area.t index a7a16df..a7a16df 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/area.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/area.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t b/contrib/whodo/GIFgraph/GIFgraph/t/bars.t index 6fd95b3..6fd95b3 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/bars.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/bars.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t b/contrib/whodo/GIFgraph/GIFgraph/t/colour.t index 2de34d4..2de34d4 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/colour.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt b/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt index d2bd9a6..d2bd9a6 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt +++ b/contrib/whodo/GIFgraph/GIFgraph/t/colour_rgb.txt diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl b/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl index 34c5eaf..34c5eaf 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl +++ b/contrib/whodo/GIFgraph/GIFgraph/t/ff.pl diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t b/contrib/whodo/GIFgraph/GIFgraph/t/legend.t index 909ebc9..909ebc9 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/legend.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/legend.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t b/contrib/whodo/GIFgraph/GIFgraph/t/lines.t index 9795426..9795426 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/lines.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/lines.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t b/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t index 3228566..3228566 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/linespoints.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t b/contrib/whodo/GIFgraph/GIFgraph/t/pie.t index 5f0fbbb..5f0fbbb 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/pie.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/pie.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/t/points.t b/contrib/whodo/GIFgraph/GIFgraph/t/points.t index f63fd79..f63fd79 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/t/points.t +++ b/contrib/whodo/GIFgraph/GIFgraph/t/points.t diff --git a/src/contrib/whodo/GIFgraph/GIFgraph/utils.pm b/contrib/whodo/GIFgraph/GIFgraph/utils.pm index 9b2d3d0..9b2d3d0 100644 --- a/src/contrib/whodo/GIFgraph/GIFgraph/utils.pm +++ b/contrib/whodo/GIFgraph/GIFgraph/utils.pm diff --git a/src/contrib/whodo/README b/contrib/whodo/README index b2269a2..b2269a2 100644 --- a/src/contrib/whodo/README +++ b/contrib/whodo/README diff --git a/src/contrib/whodo/collect.pl b/contrib/whodo/collect.pl index af8aaf4..af8aaf4 100644 --- a/src/contrib/whodo/collect.pl +++ b/contrib/whodo/collect.pl diff --git a/src/contrib/whodo/makeanalyse.pl b/contrib/whodo/makeanalyse.pl index 6c71682..6c71682 100644 --- a/src/contrib/whodo/makeanalyse.pl +++ b/contrib/whodo/makeanalyse.pl diff --git a/src/contrib/whodo/networks b/contrib/whodo/networks index 2371dfa..2371dfa 100644 --- a/src/contrib/whodo/networks +++ b/contrib/whodo/networks diff --git a/src/contrib/whodo/sources b/contrib/whodo/sources index 7026931..7026931 100644 --- a/src/contrib/whodo/sources +++ b/contrib/whodo/sources diff --git a/src/contrib/whodo/sources.cfg b/contrib/whodo/sources.cfg index 335f2ce..335f2ce 100644 --- a/src/contrib/whodo/sources.cfg +++ b/contrib/whodo/sources.cfg diff --git a/src/contrib/whodo/summarise.pl b/contrib/whodo/summarise.pl index bb6bac6..bb6bac6 100644 --- a/src/contrib/whodo/summarise.pl +++ b/contrib/whodo/summarise.pl diff --git a/src/contrib/whodo/wwwscripts/analyse.pl b/contrib/whodo/wwwscripts/analyse.pl index 50aa267..50aa267 100644 --- a/src/contrib/whodo/wwwscripts/analyse.pl +++ b/contrib/whodo/wwwscripts/analyse.pl diff --git a/src/contrib/whodo/wwwscripts/pie.pl b/contrib/whodo/wwwscripts/pie.pl index d16bd12..d16bd12 100644 --- a/src/contrib/whodo/wwwscripts/pie.pl +++ b/contrib/whodo/wwwscripts/pie.pl diff --git a/src/contrib/xlsummary/ReadMe.txt b/contrib/xlsummary/ReadMe.txt index 0a2734b..0a2734b 100644 --- a/src/contrib/xlsummary/ReadMe.txt +++ b/contrib/xlsummary/ReadMe.txt diff --git a/src/contrib/xlsummary/xlsummary.pl b/contrib/xlsummary/xlsummary.pl index c7de437..c7de437 100644 --- a/src/contrib/xlsummary/xlsummary.pl +++ b/contrib/xlsummary/xlsummary.pl diff --git a/doc/cfgmaker.1 b/doc/cfgmaker.1 new file mode 100644 index 0000000..ef7d73d --- /dev/null +++ b/doc/cfgmaker.1 @@ -0,0 +1,1414 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "CFGMAKER 1" +.TH CFGMAKER 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +cfgmaker \- Creates mrtg.cfg files (for mrtg\-2.17.7) +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +cfgmaker [options] [community@]router [[options] [community@]router ...] +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 9 +\& \-\-ifref=nr interface references by Interface Number (default) +\& \-\-ifref=ip ... by Ip Address +\& \-\-ifref=eth ... by Ethernet Number +\& \-\-ifref=descr ... by Interface Description +\& \-\-ifref=name ... by Interface Name +\& \-\-ifref=type ... by Interface Type +\& You may also use multiple options separated by commas, +\& in which case the first available one is used: +\& e.g. \-\-ifref=ip,name,nr +\& +\& \-\-ifdesc=nr interface description uses Interface Number (default) +\& \-\-ifdesc=ip ... uses Ip Address +\& \-\-ifdesc=eth ... uses Ethernet Number +\& \-\-ifdesc=descr ... uses Interface Description +\& \-\-ifdesc=name ... uses Interface Name +\& \-\-ifdesc=catname ... uses CatOS Interface Name +\& \-\-ifdesc=ppname ... uses Passport Port Name +\& \-\-ifdesc=alias ... uses Interface Alias +\& \-\-ifdesc=type ... uses Interface Type +\& You may also use multiple options separated by commas, +\& in which case the first available one is used: +\& e.g. \-\-ifdesc=catname,ppname,descr,alias,ip,name,nr +\& +\& \-\-if\-filter=f Test every interface against filter f to decide wether +\& or not to include that interface into the collection. +\& Currently f is being evaluated as a Perl expression +\& and it\*(Aqs truth value is used to reject or accept the +\& interface. +\& (Experimental, under development, might change) +\& +\& \-\-if\-template=templatefile +\& Replace the normal target entries for the interfaces +\& with an entry as specified by the contents in the file +\& templatefile. The file is supposed to contain Perl +\& code to be executed to generate the lines for the +\& target in the configuration file. +\& (Experimental, under development, might change) +\& +\& \-\-host\-template=templatefile +\& In addition to creating targets for a host\*(Aqs interfaces +\& do also create targets for the host itself as specified +\& by the contents in the file templatefile. The file is +\& supposed to contain Perl code to be executed to generate +\& the lines for the host related targets (such as CPU, +\& ping response time measurements etc.) in the config\- +\& uration file. +\& (Experimental, under development, might change) +\& +\& \-\-global "x: a" add global config entries +\& +\& \-\-no\-down do not look at admin or opr status of interfaces +\& +\& \-\-show\-op\-down show interfaces which are operatively down +\& +\& \-\-zero\-speed=spd use this speed in bits\-per\-second as the interface +\& speed for all interfaces that return a speed of 0 +\& via ifSpeed/ifHighSpeed. 100Mbps = 100000000 +\& +\& \-\-subdirs=format give each router its own subdirectory, naming each per +\& "format", in which HOSTNAME and SNMPNAME will be +\& replaced by the values of those items \-\- for instance, +\& \-\-subdirs=HOSTNAME or \-\-subdirs="HOSTNAME (SNMPNAME)" +\& +\& \-\-noreversedns do not reverse lookup ip numbers +\& +\& \-\-community=cmty Set the default community string to "cmty" instead of +\& "public". +\& +\& \-\-enable\-ipv6 Enable IPv6 support, if the required libraries are +\& present. Numeric IPv6 addresses must be enclosed +\& in square brackets, e.g. public@[2001:760:4::1]:161 +\& +\& \-\-use\-16bit Use 16bit SNMP request IDs to query all routers. +\& +\& \-\-snmp\-options=:[<port>][:[<tmout>][:[<retr>][:[<backoff>][:<ver>]]]] +\& +\& Specify default SNMP options to be appended to all +\& routers following. Individual fields can be empty. +\& Routers following might override some or all of the +\& options given to \-\-snmp\-options. +\& +\& \-\-dns\-domain=domain +\& Specifies a domain to append to the name of all +\& routers following. +\& +\& \-\-nointerfaces Don\*(Aqt do generate any configuration lines for interfaces, +\& skip the step of gathering interface information and +\& don\*(Aqt run any interface template code. +\& +\& \-\-interfaces Generate configuration lines for interfaces (this is the +\& default). The main purpose of this option is to negate +\& an \-\-nointerfaces appearing earlier on the command line. +\& +\& \-\-help brief help message +\& \-\-man full documentation +\& \-\-version print the version of cfgmaker +\& +\& \-\-output=file output filename default is STDOUT +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBCfgmaker\fR creates \s-1MRTG\s0 configuration files based on information +pulled from a router or another \s-1SNMP\s0 manageable device. +.PP +[\fIcommunity\fR\fB@\fR]\fIrouter\fR +.PP +\&\fICommunity\fR is the community name of the device you want to create a +configuration for. If not specified, it defaults to '\fBpublic\fR'; you might +want to try this first if you do not know the community name of a +device. If you are using the wrong community name you will get no +response from the device. +.PP +\&\fIRouter\fR is the \s-1DNS\s0 name or the \s-1IP\s0 number of an SNMP-managable device. +Following the name you can specify 6 further options separated by +colons. The full syntax looks like this: +.PP +\&\fBrouter\fR[:[\fBprt\fR][:[\fBtmout\fR][:[\fBretr\fR][:[\fBbackoff\fR][:\fBvers\fR]]]]] +.PP +Of special interest may be the last parameter, \fBvers\fR. If you set this to +\&'2' then your device will be queried with \s-1SNMP\s0 version 2 requests. This +allows you to poll the 64 bit traffic counters in the device and will thus work +much better with fast interfaces (no more counter overrun). Note that the +order in which the routers are specified on the command line do matter as +the same order is used when the configuration file is generated. The first +specified router has it's configuration lines genrated first, followed by +the lines belonging to the next router and so on. +.PP +Note that the first line of the generated cfg file will contain all the +commandline options you used for generating it. This is to allow for the +easy 'regeneration' in case you want to add newhosts or make some other +global change. +.SS "Configuration" +.IX Subsection "Configuration" +Except for the \fB\-\-output\fR and \fB\-\-global\fR options, all options affect +only the routers following them on the command line. If an option +specified earlier on the command line reappears later on the command +line with another value, the new value overrides the old value as far as +remaining routers are concerned. This way options might be tailored for +groups of routers or for individual routers. +.PP +See \fB\-\-output\fR and \fB\-\-global\fR for how their behaviour is affected by +where or how many times they appear on the command line. +.PP +See the \fBExamples\fR below on how to set an option differently for +multiple routers. +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Print a brief help message and exit. +.IP "\fB\-\-man\fR" 4 +.IX Item "--man" +Prints the manual page and exits. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Print the version of cfgmaker. This should match the version of \s-1MRTG\s0 +for which config files are being created. +.IP "\fB\-\-ifref\fR \fBnr\fR|\fBip\fR|\fBeth\fR|\fBdescr\fR|\fBname\fR" 4 +.IX Item "--ifref nr|ip|eth|descr|name" +Select the interface identification method. Default is \fBnr\fR which +identifies the router interfaces by their number. Unfortunately the +interface numbering scheme in an \s-1SNMP\s0 tree can change. Some routers +change their numbering when new interfaces are added, others change +thier numbering every full moon just for fun. +.Sp +To work around this sad problem \s-1MRTG\s0 can identify interfaces by 4 +other properties. None of these works for all interfaces, but you +should be able to find one which does fine for you. Note that +especially ethernet addrsses can be problematic as some routers have +the same ethernet address on most of their interface cards. +.Sp +Select \fBip\fR to identify the interface by its \s-1IP\s0 number. Use \fBeth\fR to +use the ethernet address for identification. Use \fBdescr\fR to use +the Interface description. Or use \fBname\fR to use the Interface name. +.Sp +You can specify multiple properties if you wish, separated by commas. +In this case, cfgmaker will use the first item in the list which +can provide unique identification. This allows you to specify, for +example, to use \s-1IP\s0 address and to use ifName if this is not defined: + \-\-ifref ip,name +.Sp +If your chosen method does not allow unique interface identification on +the device you are querying, \fBcfgmaker\fR will tell you about it. +.IP "\fB\-\-ifdesc\fR \fBnr\fR|\fBip\fR|\fBeth\fR|\fBdescr\fR|\fBname\fR|\fBtype\fR|\fBalias\fR" 4 +.IX Item "--ifdesc nr|ip|eth|descr|name|type|alias" +Select what to use as the description of the interface. The description +appears in the \f(CW\*(C`Title[]\*(C'\fR property for the target as well as the text header +in the \s-1HTML\s0 code defined in the target's \f(CW\*(C`PageTop[]\*(C'\fR. Default is to use +\&\fBnr\fR which is just the interface number which isn't always useful +to the viewer of the graphs. +.Sp +There are 6 other properties which could be used. Use \fBip\fR if you want +to use the interface's IP-address. Use \fBeth\fR if you want to use the +interface's ethernet address. If you want a better description, you can +use either \fBdescr\fR, \fBname\fR or \fBalias\fR. Exactly what each of these do +varies between different equipment so you might need to experiment. For +instance, for a serial interface on a Cisco router running \s-1IOS\s0 using \fBname\fR +might result in \f(CW"S0"\fR being the interface description , \fBdescr\fR might result +in \f(CW"Serial0"\fR and \fBalias\fR might result in \f(CW"Link to HQ"\fR (provided that is +what is used as the interface's \f(CW\*(C`description\*(C'\fR in the router's configuration). +.Sp +Finally, if you want to describe the interface by it's Btype +(i.e \f(CW"ethernetCSMA"\fR, \f(CW"propPointtoPoint"\fR etc) you can use \fBtype\fR. +.Sp +You can specify multiple properties if you wish, separated by commas. +In this case, cfgmaker will use the first item in the list which +is available for this interface. This allows you to specify, for +example, to use any of the different aliases in order of preference. +.IP "\fB\-\-if\-filter\fR '\fBfilter-expression\fR'" 4 +.IX Item "--if-filter 'filter-expression'" +First of all, this is under some development and is experimental. +.Sp +Use this if you want to have better control over what interfaces gets +included into the configuration. The \fBfilter-expression\fR is evaluated +as a piece of Perl code and is expected +to return a truth value. If true, include the interface and if false, +exclude the interface. +.Sp +For a further discussion on how these filters work, see the section +\&\*(L"Details on Filters\*(R" below. +.IP "\fB\-\-if\-template\fR \fBtemplate-file\fR" 4 +.IX Item "--if-template template-file" +First of all, this is under some development and is experimental. +.Sp +Use this if you want to control what the line for each target should look +like in the configuration file. The contents of the file \fBtemplate-file\fR +will be evaluated as a Perl program which generates the lines using certain +variables for input and output. +.Sp +For a further discussion on how these templates work, see the section +\&\*(L"Details on Temaplates\*(R" below. +.IP "\fB\-\-host\-template\fR \fBtemplate-file\fR" 4 +.IX Item "--host-template template-file" +First of all, this is under some development and is experimental. +.Sp +Use this if you want to have some extra targets related to the host itself +such as \s-1CPU\s0 utilization, ping response time to the host, number of busy +modems etc. The contents of the file \fBtemplate-file\fR will be evaluated +once per host as a Perl program which generates the lines using certain +variables for input and output. +.Sp +For a further discussion on how these templates work, see the section +\&\*(L"Details on Templates\*(R" below. +.IP "\fB\-\-community\fR \fBcommunity-string\fR" 4 +.IX Item "--community community-string" +Use this to set the community for the routers following on the command +line to \fBcommunity-string\fR. Individual routers might overrride this +community string by using the syntax \fBcommunity\fR\fB@\fR\fBrouter\fR. +.IP "\fB\-\-enable\-ipv6\fR" 4 +.IX Item "--enable-ipv6" +This option enables IPv6 support. It requires the appropriate perl +modules; if they are not found then IPv6 is disabled (see the ipv6 +documentation). +.Sp +cfgmaker will use IPv6 or IPv4 depending on the target. If the target +is a numeric address, the protocol depends on the type of address. If the +target is a hostname, cfgmaker will try to resolve the name first to an +IPv6 address then to an IPv4 address. +.Sp +IPv6 numeric addresses must be specified between square braces. +.Sp +For example: +.Sp +.Vb 1 +\& cfgmaker \-\-enable\-ipv6 [2001:760:4::1]:165:::2 +.Ve +.Sp +If the target has both an IPv6 address and an IPv4 address with the same +hostname, cfgmaker first queries the target using IPv6 and falls back to +IPv4 if it fails. This is useful for targets which don't support \s-1SNMP\s0 +over IPv6. +.IP "\fB\-\-use\-16bit\fR" 4 +.IX Item "--use-16bit" +This option forces the use of 16bit \s-1SNMP\s0 request IDs. Some broken \s-1SNMP\s0 +agents do not accept 32bit request IDs. Try to avoid this option as much +as possible, complain to your agent vendor instead. +.IP "\fB\-\-snmp\-options\fR :[\fBport\fR][:[\fBtimeout\fR][:[\fBretries\fR][:[\fBbackoff\fR][:\fBversion\fR]]]]" 4 +.IX Item "--snmp-options :[port][:[timeout][:[retries][:[backoff][:version]]]]" +Use this to set the default \s-1SNMP\s0 options for all routers following on the +command line. Individual values might be omitted as well as trailing +colons. Note that routers might override individual (or all) values +specified by \fB\-\-snmp\-options\fR by using the syntax +.Sp +\&\fBrouter\fR[:[\fBport\fR][:[\fBtimeout\fR][:[\fBretries\fR][:[\fBbackoff\fR][:\fBversion\fR]]]]] +.ie n .IP "\fB\-\-global\fR \fB""\fR\fIbla: abc\fR\fB""\fR" 4 +.el .IP "\fB\-\-global\fR \fB``\fR\fIbla: abc\fR\fB''\fR" 4 +.IX Item "--global ""bla: abc""" +Use this to add global options to the generated config file. +You can call \fB\-\-global\fR several times to add multiple options. +The line will appear in the configuration just before the config for +the next router appearing on the command line. +.Sp +.Vb 1 +\& \-\-global "workdir: /home/mrtg" +.Ve +.Sp +If you want some default Options you might want to put +.Sp +.Vb 1 +\& \-\-global "options[_]: growright,bits" +.Ve +.Sp +Specifying \fB\-\-global\fR after the last router on the command line will +create a line in the configuration file which will appear after all the +routers. +.IP "\fB\-\-noreversedns\fR" 4 +.IX Item "--noreversedns" +Do not try to reverse lookup \s-1IP\s0 numbers ... a must for \s-1DNS\s0 free environments. +.IP "\fB\-\-no\-down\fR" 4 +.IX Item "--no-down" +Normally cfgmaker will not include interfaces which are marked +anything but administratively and operationally \s-1UP.\s0 With this +switch you get them all. +.IP "\fB\-\-show\-op\-down\fR" 4 +.IX Item "--show-op-down" +Include interfaces which are operatively down. +.IP "\fB\-\-zero\-speed\fR \fIspeed\fR" 4 +.IX Item "--zero-speed speed" +Assign this speed in bits-per-second to all interfaces which return 0 +for ifSpeed and ifHighSpeed. Some switches, notably Foundry equipment, +return a speed of zero for some interfaces. For example, to have +all interfaces reporting zero set to 100Mbps, use +\&\-\-zero\-speed=100000000. +.IP "\fB\-\-subdirs\fR \fIformat\fR" 4 +.IX Item "--subdirs format" +Give each router its own subdirectory for the \s-1HTML\s0 and graphics (or +\&.rrd) files. The directory name is the given \fIformat\fR string with a +couple of pattern replacements. The string \*(L"\s-1HOSTNAME\*(R"\s0 will be +replaced by the hostname of the router (however you specified it on +the \fBcfgmaker\fR commandline \*(-- it may be an actual hostname or just an +\&\s-1IP\s0 address), and \*(L"\s-1SNMPNAME\*(R"\s0 will be replaced with the device's idea of +its own name (the same name that appears on the right side of the +\&\*(L"Title\*(R" lines). For instance, a call like: +.Sp +.Vb 1 +\& cfgmaker \-\-subdirs=HOSTNAME_\|_SNMPNAME public@10.10.0.18 +.Ve +.Sp +would result in the generation of lines looking something like: +.Sp +.Vb 1 +\& Directory[10.10.0.18_1]: 10.10.0.18_\|_fp2200\-bothrip\-1.3 +.Ve +.IP "\fB\-\-output\fR \fIfile\fR" 4 +.IX Item "--output file" +Write the output from \fBcfgmaker\fR into the file \fIfile\fR. The default +is to use \f(CW\*(C`STDOUT\*(C'\fR. \fB\-\-output\fR is expected to appear only once on the +command line. If used multiple times, the file specified by the last +\&\fB\-\-output\fR will be used. +.IP "\fB\-\-nointerfaces\fR" 4 +.IX Item "--nointerfaces" +Don't generate configuration lines for interfaces. +.Sp +This makes cfgmaker skip all steps related to interfaces which means +it will not do any polling of the router to retrieve interface +information which speeds up the execution of cfgmaker and it will +neither run any interface templates. +.IP "\fB\-\-interfaces\fR" 4 +.IX Item "--interfaces" +This makes cfgmaker generate configuration lines for interfaces (the +default behaviour). +.Sp +The main usage of this option is to negate an \-\-nointerfaces appearing +earlier on the command line. +.SS "\s-1SNMP V3\s0 Options" +.IX Subsection "SNMP V3 Options" +\&\fBCfgmaker\fR supports \s-1SNMP V3\s0 using the \fBNet:SNMP\fR perl module. There are optional +parameters affecting \s-1SNMP\s0 operation. +.IP "\-\-enablesnmpv3 {yes|no}" 4 +.IX Item "--enablesnmpv3 {yes|no}" +The \fB\-\-enablesnmpv3\fR option is an optional flag to check for the presence of +the \fBNet::SNMP\fR libraries. \fBCfgmaker\fR will try to determine whether this flag is +required and will set the values automatically. +.PP +\fISNMPv3 Arguments\fR +.IX Subsection "SNMPv3 Arguments" +.PP +A \s-1SNMP\s0 context is a collection of management information accessible by a \s-1SNMP\s0 +entity. An item of management information may exist in more than one context +and a \s-1SNMP\s0 entity potentially has access to many contexts. The combination of +a contextEngineID and a contextName unambiguously identifies a context within +an administrative domain. In a SNMPv3 message, the contextEngineID and +contextName are included as part of the scopedPDU. All methods that generate +a \s-1SNMP\s0 message optionally take a \fB\-\-contextengineid\fR and \fB\-\-contextname\fR +argument to configure these fields. +.IP "Context Engine \s-1ID\s0" 4 +.IX Item "Context Engine ID" +The \fB\-\-contextengineid\fR argument expects a hexadecimal string representing +the desired contextEngineID. The string must be 10 to 64 characters (5 to +32 octets) long and can be prefixed with an optional \*(L"0x\*(R". Once the +\&\fB\-\-contextengineid\fR is specified it stays with the object until it is changed +again or reset to default by passing in the undefined value. By default, the +contextEngineID is set to match the authoritativeEngineID of the authoritative +\&\s-1SNMP\s0 engine. +.IP "Context Name" 4 +.IX Item "Context Name" +The contextName is passed as a string which must be 0 to 32 octets in length +using the \fB\-\-contextname\fR argument. The contextName stays with the object +until it is changed. The contextName defaults to an empty string which +represents the \*(L"default\*(R" context. +.PP +\fIUser-based Security Model Arguments\fR +.IX Subsection "User-based Security Model Arguments" +.PP +The User-based Security Model (\s-1USM\s0) used by SNMPv3 requires that a securityName +be specified using the \fB\-\-username\fR argument. The creation of a Net::SNMP +object with the version set to SNMPv3 will fail if the \fB\-\-username\fR argument +is not present. The \fB\-\-username\fR argument expects a string 1 to 32 octets +in length. +.PP +Different levels of security are allowed by the User-based Security Model which +address authentication and privacy concerns. A SNMPv3 target will +derive the security level (securityLevel) based on which of the following +arguments are specified. +.PP +By default a securityLevel of 'noAuthNoPriv' is assumed. If the \fB\-\-authkey\fR +or \fB\-\-authpassword\fR arguments are specified, the securityLevel becomes +\&'authNoPriv'. The \fB\-\-authpassword\fR argument expects a string which is at +least 1 octet in length. Optionally, the \fB\-\-authkey\fR argument can be used so +that a plain text password does not have to be specified in a script. The +\&\fB\-\-authkey\fR argument expects a hexadecimal string produced by localizing the +password with the authoritativeEngineID for the specific destination device. +The \f(CW\*(C`snmpkey\*(C'\fR utility included with the Net::SNMP distribution can be used to create +the hexadecimal string (see snmpkey). +.PP +Two different hash algorithms are defined by SNMPv3 which can be used by the +Security Model for authentication. These algorithms are \s-1HMAC\-MD5\-96 \*(L"MD5\*(R" +\&\s0(\s-1RFC 1321\s0) and \s-1HMAC\-SHA\-96 \*(L"SHA\-1\*(R" \s0(\s-1NIST FIPS PUB 180\-1\s0). The default +algorithm used by the module is \s-1HMAC\-MD5\-96. \s0 This behavior can be changed by +using the \fB\-\-authprotocol\fR argument. This argument expects either the string +\&'md5' or 'sha' to be passed to modify the hash algorithm. +.PP +By specifying the arguments \fB\-\-privkey\fR or \fB\-\-privpassword\fR the securityLevel +associated with the object becomes 'authPriv'. According to SNMPv3, privacy +requires the use of authentication. Therefore, if either of these two +arguments are present and the \fB\-\-authkey\fR or \fB\-\-authpassword\fR arguments are +missing, the creation of the object fails. The \fB\-\-privkey\fR and +\&\fB\-\-privpassword\fR arguments expect the same input as the \fB\-\-authkey\fR and +\&\fB\-\-authpassword\fR arguments respectively. +.PP +The User-based Security Model described in \s-1RFC 3414\s0 defines a single encryption +protocol to be used for privacy. This protocol, CBC-DES \*(L"\s-1DES\*(R" \s0(\s-1NIST FIPS PUB +46\-1\s0), is used by default or if the string 'des' is passed to the +\&\fB\-\-privprotocol\fR argument. By working with the Extended Security Options +Consortium http://www.snmp.com/eso/, the module also supports additional +protocols which have been defined in draft specifications. The draft +http://www.snmp.com/eso/draft\-reeder\-snmpv3\-usm\-3desede\-00.txt +defines the support of \s-1CBC\-3DES\-EDE \s0\*(L"Triple-DES\*(R" (\s-1NIST FIPS 46\-3\s0) in the +User-based Security Model. This protocol can be selected using the +\&\fB\-\-privprotocol\fR argument with the string '3desede'. The draft +http://www.snmp.com/eso/draft\-blumenthal\-aes\-usm\-04.txt +describes the use of \s-1CFB128\-AES\-128/192/256 \*(L"AES\*(R" \s0(\s-1NIST FIPS PUB 197\s0) in the +\&\s-1USM.\s0 The three \s-1AES\s0 encryption protocols, differentiated by their key sizes, +can be selected by passing 'aescfb128', 'aescfb192', or 'aescfb256' to the +\&\fB\-privprotocol\fR argument. +.SS "Details on Filters" +.IX Subsection "Details on Filters" +The purpose of the filters is to decide which interfaces to accept and +which interfaces to reject. This decision is done for each interface by +evaluating the filter expression as a piece of Perl code and investigating +the result of the evaluation. If true, accept the interface otherwise +reject it. +.PP +When working with filters, remember that Perl has it's own idea of what truth +and false is. The empty string "\*(L" and the string \*(R"0" are false, all other +strings are true. This further imples that any integer value of 0 is +false as well as any undef value. It also implies that all references +are considered true. +.PP +As the filter is evaluated as a Perl expression, several useful constructs +in Perl are worth mentioning: +.PP +Expressions might be grouped by using parentheses \*(L"()\*(R". Expressions might +be combined using boolean operators such as the following: +.ie n .IP """\fBand\fR"" (equivalent with ""\fB&&\fR"")" 4 +.el .IP "``\fBand\fR'' (equivalent with ``\fB&&\fR'')" 4 +.IX Item """and (equivalent with &&"")" +Boolean \*(L"and\*(R" of the two expressions, is only true if both expressions are +true. Example: \fIexpression1\fR \fBand\fR \fIexpression2\fR +.ie n .IP """\fBor\fR"" (equivalent with ""\fB||\fR"")" 4 +.el .IP "``\fBor\fR'' (equivalent with ``\fB||\fR'')" 4 +.IX Item """or (equivalent with ||"")" +Boolean \*(L"or\*(R" of the two expressions, is true if either or both expressions +are true. Example: \fIexpression1\fR \fBor\fR \fIexpression2\fR +.ie n .IP """\fBnot\fR"" (equivalent with ""\fB!\fR"")" 4 +.el .IP "``\fBnot\fR'' (equivalent with ``\fB!\fR'')" 4 +.IX Item """not (equivalent with !"")" +Boolean negation of a single expression. Example: \fBnot\fR \fIexpression\fR . +Yet another example: \fB!\fR\fIexpression\fR +.PP +(For more details on this I recommend a book on Perl) +.PP +\fIPredefined Filter Variables\fR +.IX Subsection "Predefined Filter Variables" +.PP +To facilitate, there are a number of predefined values available to use +in the filter. Note that these variables are also available when templates +interfaces are evaluated (but not host templates). +.PP +Caveat: All these variables' names begin with a dollar sign ($), which +is a syntactic requirement for scalar variables in Perl. The danger here +is that the dollar sign in many shells is an active character (often +used for shell variables exactly as in Perl variables) so it is important +to ensure that the Perl expression isn't evaluated by the command line +shell as shell code before being passed to cfgmaker as command line +arguments. In shells like Bourne shell, ksh shell or bash shell, placing +the entire expression within single qoutes will avoid such accidental +evaluation: +.PP +.Vb 1 +\& \*(Aq\-\-if\-filter=($default_iftype && $if_admin)\*(Aq +.Ve +.ie n .IP "\fB\fB$if_type\fB\fR" 4 +.el .IP "\fB\f(CB$if_type\fB\fR" 4 +.IX Item "$if_type" +This is an integer specifying the interface type as +per the \s-1SNMP\s0 standards and as reported by the polled device. A complete list +of interface types would be impractical for this document , but there are +a number predefined varables below. Normally, cfgmaker puts in the target's +PageTop this iftype value within paranthesis after the name of the interface +type. (e.g \*(L"propPointToPointSerial (22)\*(R"). +.Sp +Here's a list of some of the most common interface types by number: +.Sp +.Vb 10 +\& 6 ethernetCsmacd +\& 7 iso88023Csmacd +\& 9 iso88025TokenRing +\& 15 fddi +\& 19 E1 +\& 20 basicISDN +\& 21 primaryISDN +\& 22 propPointToPointSerial +\& 23 ppp +\& 24 softwareLoopback +\& 30 ds3 +\& 32 frame\-relay +\& 33 rs232 +\& 37 atm +\& 39 sonet +\& 44 frameRelayService +\& 46 hssi +\& 49 aal5 +\& 53 propVirtual +\& 62 Fast Ethernet (100BaseT) +\& 63 ISDN & X.25 +\& 69 Full Duplex Fast Ethernet (100BaseFX) +\& 94 Asymetric Digital Subscriber Loop (ADSL) +\& 117 Gigabit Ethernet +\& 134 ATM Sub Interface +.Ve +.ie n .IP "\fB\fB$default\fB\fR" 4 +.el .IP "\fB\f(CB$default\fB\fR" 4 +.IX Item "$default" +True if and only if cfgmaker normally should +accepted the interface based on the interfaces administrative and +operational state (taking the flags \fB\-\-no\-down\fR and \fB\-\-show\-op\-down\fR into +account) and it's type (and a few other things). +.ie n .IP "\fB\fB$default_ifstate\fB\fR" 4 +.el .IP "\fB\f(CB$default_ifstate\fB\fR" 4 +.IX Item "$default_ifstate" +True if and only if cfgmaker would have accepted the +interface based on it's operational and administrative states (also taking +into account the presence of the flags \fB\-\-no\-down\fR and \fB\-\-show\-op\-down\fR). +.ie n .IP "\fB\fB$default_iftype\fB\fR" 4 +.el .IP "\fB\f(CB$default_iftype\fB\fR" 4 +.IX Item "$default_iftype" +True if and only if cfgmaker would have accepted the +interface based on it's type (and a few type specific details in addition). +.ie n .IP "\fB\fB$if_admin\fB\fR" 4 +.el .IP "\fB\f(CB$if_admin\fB\fR" 4 +.IX Item "$if_admin" +True if and only if the interface is in an adminstrative up +state. +.ie n .IP "\fB\fB$if_oper\fB\fR" 4 +.el .IP "\fB\f(CB$if_oper\fB\fR" 4 +.IX Item "$if_oper" +True if and only if the interface is in an operational up +state. +.PP +A number of variables are also predefined to easily decide if an interface +belong to a certain cathegory or not. Below is all those variables listed +together with which if_type numbers each variable will be true for. Note +that some variables refer to other variables as well. +.ie n .IP "\fB\fB$if_is_ethernet\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_ethernet\fB\fR" 4 +.IX Item "$if_is_ethernet" +True for ethernet interfaces (nr 6, 7, 26, 62, 69 and 117). +.ie n .IP "\fB\fB$if_is_isdn\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_isdn\fB\fR" 4 +.IX Item "$if_is_isdn" +True for various \s-1ISDN\s0 interface types (nr 20, 21, 63, 75, 76 and 77) +.ie n .IP "\fB\fB$if_is_dialup\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_dialup\fB\fR" 4 +.IX Item "$if_is_dialup" +True for dial-up interfaces such as \s-1PPP\s0 as well +as \s-1ISDN. \s0(nr 23, 81, 82 and 108 in addition to the numbers of +\&\fB\f(CB$if_is_isdn\fB\fR). +.ie n .IP "\fB\fB$if_is_atm\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_atm\fB\fR" 4 +.IX Item "$if_is_atm" +True for miscellaneous \s-1ATM\s0 related interface types (nr 37, 49, 107, 105, +106, 114 and 134). +.ie n .IP "\fB\fB$if_is_wan\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_wan\fB\fR" 4 +.IX Item "$if_is_wan" +True for \s-1WAN\s0 interfaces point to point, Frame Relay and High Speed Serial ( 22,32,44,46) +.ie n .IP "\fB\fB$if_is_lan\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_lan\fB\fR" 4 +.IX Item "$if_is_lan" +True for \s-1LAN\s0 interfaces (8, 9, 11, 15, 26, 55, 59, 60 and 115 in addition +to the numbers of \fB\f(CB$if_is_ethernet\fB\fR). +.ie n .IP "\fB\fB$if_is_dsl\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_dsl\fB\fR" 4 +.IX Item "$if_is_dsl" +True for \s-1ADSL, RDSL, HDSL\s0 and \s-1SDSL \s0(nr 94, 95, 96, 97) +.ie n .IP "\fB\fB$if_is_loopback\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_loopback\fB\fR" 4 +.IX Item "$if_is_loopback" +True for software loopback interfaces (nr 24) +.ie n .IP "\fB\fB$if_is_ciscovlan\fB\fR" 4 +.el .IP "\fB\f(CB$if_is_ciscovlan\fB\fR" 4 +.IX Item "$if_is_ciscovlan" +True for Cisco \s-1VLAN\s0 interfaces (interfaces with the +word Vlan or \s-1VLAN\s0 in their ifdescs) +.ie n .IP "\fB\fB$if_vlan_id\fB\fR" 4 +.el .IP "\fB\f(CB$if_vlan_id\fB\fR" 4 +.IX Item "$if_vlan_id" +Returns the vlan id associated with a specific port +on Cisco Catalyst switches under both Catalyst \s-1OS\s0 +and \s-1IOS,\s0 and 3Com switches. If it is not a vlan interface, will return undef. +.ie n .IP "\fB\fB$if_cisco_trunk\fB\fR" 4 +.el .IP "\fB\f(CB$if_cisco_trunk\fB\fR" 4 +.IX Item "$if_cisco_trunk" +Returns the trunking state of a specific port +on Cisco Catalyst switches under both Catalyst \s-1OS\s0 +and \s-1IOS. \s0 Returns \*(L"1\*(R" if the interface is a trunk, undef otherwise. +.ie n .IP "\fB\fB$if_MTU\fB\fR" 4 +.el .IP "\fB\f(CB$if_MTU\fB\fR" 4 +.IX Item "$if_MTU" +Returns the Maximum Transfer Unit associated with a specific port. +.PP +Besides that, you can also use the variables defined for templates below. +Further, all the variables available in cfgmaker is at the scripts disposal +even if the use of such features is discouraged. More \*(L"shortcuts\*(R" in the +form of variables and functions will be made available in the future instead. +.PP +\fIExamples on Filters\fR +.IX Subsection "Examples on Filters" +.PP +The following filter will not affect which interfaces get's included or +excluded, it will make cfgmaker behave as normally. +.PP +.Vb 1 +\& \*(Aq\-\-if\-filter=$default\*(Aq +.Ve +.PP +The following filter will make cfgmaker exclude \s-1PPP \s0(23) interfaces: +.PP +.Vb 1 +\& \*(Aq\-\-if\-filter=$default && $if_type!=23\*(Aq +.Ve +.PP +The following filter will make cfgmaker behave as usual except that it will +consider the operational state of an interface irrelevant but still reject +all interfaces which are administratively down. +.PP +.Vb 1 +\& \*(Aq\-\-if\-filter=$if_admin && $default_iftype\*(Aq +.Ve +.SS "Details on Templates" +.IX Subsection "Details on Templates" +The contents of the template files are evaluated as a Perl program. A +number or Perl variables are available for the program to read and others +are used to be written to. +.PP +As quite a few of the predefined variables has values which are are supposed +to be used in \s-1HTML\s0 code some of them have an \*(L"HTML-escaped\*(R" variant, e.g +\&\f(CW$html_syslocation\fR is the \s-1HTML\s0 escaped variant of \f(CW$syslocation\fR. The \s-1HTML\s0 +escaping means that the chars \*(L"<\*(R", \*(L">\*(R" and \*(L"&\*(R" are replaced by \*(L"<\*(R", +\&\*(L">\*(R" and \*(L"&\*(R" and that newlines embedded in the string are prepended +with \*(L"<\s-1BR\s0>\*(R" and appended with a space character (if a newline is last in the +string it is not touched). +.PP +\fIWritable Template Variables\fR +.IX Subsection "Writable Template Variables" +.PP +These are the variables available to store the configuration lines in. +Some of them are initialized prior to the evaluation of the template but +such content normally is comments for inclusion in the final configuration +file so those variables might be reset to the empty string in the template +code to eliminate the comments. The other way around is also possible, the +contents of these variables might be extended with further information +for various reasons such as debugging etc. +.PP +Once the template has been evaluated, the following happens: if the +template is a interface template and the actual interface for some reason +is rejected and thus needs to be commented out, all the lines in the +variable \fB\f(CB$target_lines\fB\fR are turned into comments by adding a hash mark +(\*(L"#\*(R") at their beginning. Then all the variables \fB\f(CB$head_lines\fB\fR, +\&\fB\f(CB$problem_lines\fB\fR , \fB\f(CB$target_lines\fB\fR and \fB\f(CB$separator_lines\fB\fR +are concatenated together to form the lines to add to the configuration file. +.ie n .IP "\fB\fB$target_lines\fB\fR" 4 +.el .IP "\fB\f(CB$target_lines\fB\fR" 4 +.IX Item "$target_lines" +This variable is the placeholder for the configuration lines created +by the template. \fB\f(CB$target_lines\fB\fR is predefined to be empty when +the template code is evaluated. +.ie n .IP "\fB\fB$head_lines\fB\fR" 4 +.el .IP "\fB\f(CB$head_lines\fB\fR" 4 +.IX Item "$head_lines" +This variable is intended to be the placeholder for the comment line +appearing just before the target in the configuration file. It is +initialized with that comment line before the evaluation of the template +code and if the template doesn't modify \fB\f(CB$head_lines\fB\fR during evaluation, +the comment will look like usual in the config file. +.ie n .IP "\fB\fB$problem_lines\fB\fR" 4 +.el .IP "\fB\f(CB$problem_lines\fB\fR" 4 +.IX Item "$problem_lines" +This variable is intended to be the placholder for the comment lines +describing any problems which might have been encountered when trying +to add the target into the configuration. For host templates it's +normally not used and for those it's predefined as the empty string. +For interface templates \fB\f(CB$problem_lines\fB\fR is predefined with +the error description comments which cfgmaker normally would use for +rejected interfaces or as the empty string for accepted interfaces. +.Sp +It is possible to test against \fB\f(CB$problem_lines\fB\fR to find out if +an interface will be included or rejected but this is not recommended. +Test against \fB\f(CB$if_ok\fB\fR instead. +.ie n .IP "\fB\fB$separator_lines\fB\fR" 4 +.el .IP "\fB\f(CB$separator_lines\fB\fR" 4 +.IX Item "$separator_lines" +This variable is the placeholder for the string to use as the separator +between the code for individual targets. The contents of this variable +is put after each target (so the lines will appear after the end of the +last target in the config as well). +.PP +\fIPredefined Template Variables\fR +.IX Subsection "Predefined Template Variables" +.PP +All the variables below are available for interface templates to use. +For host templates, only those listed under \*(L"Host and System Variables\*(R" +are available. +.PP +For interface templates the variables listed under +\&\*(L"Predefined Filter Variables\*(R" are also available. +.PP +\fIHost and System Variables\fR +.IX Subsection "Host and System Variables" +.ie n .IP "\fB\fB$router_name\fB\fR" 4 +.el .IP "\fB\f(CB$router_name\fB\fR" 4 +.IX Item "$router_name" +This is the fully qualified name for the router. It is affected by the +following items on the command line: the router name itself and +\&\fB\-\-dns\-domain\fR. +.ie n .IP "\fB\fB$router_connect\fB\fR" 4 +.el .IP "\fB\f(CB$router_connect\fB\fR" 4 +.IX Item "$router_connect" +This is the reference string for the router being polled. It is on the +form community@router possibly followed by some snmp options. It is +affected by the following items on the command line: the router name +itself, \fB\-\-community\fR, \fB\-\-snmp\-options\fR and \fB\-\-dns\-domain\fR. +(There's no \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$directory_name\fB\fR" 4 +.el .IP "\fB\f(CB$directory_name\fB\fR" 4 +.IX Item "$directory_name" +This variable should contain the directory name as cfgmaker normally would +use as the value for the \*(L"Directory[]\*(R" directive. The value is determined +by the \fB\-\-subdirs\fR command line option. If \fB\-\-subdirs\fR isn't specified +\&\fB\f(CB$directory_name\fB\fR will be the empty string. (There's no \s-1HTML\s0 escaped +variant available) +.ie n .IP "\fB\fB$syscontact\fB\fR" 4 +.el .IP "\fB\f(CB$syscontact\fB\fR" 4 +.IX Item "$syscontact" +This variable is the router's \s-1SNMP\s0 sysContact value. (\s-1HTML\s0 escaped +variant: \fB\f(CB$html_syscontact\fB\fR) +.ie n .IP "\fB\fB$sysname\fB\fR" 4 +.el .IP "\fB\f(CB$sysname\fB\fR" 4 +.IX Item "$sysname" +This variable is the router's \s-1SNMP\s0 sysName value. (No \s-1HTML\s0 escaped +variant available) +.ie n .IP "\fB\fB$syslocation\fB\fR" 4 +.el .IP "\fB\f(CB$syslocation\fB\fR" 4 +.IX Item "$syslocation" +This variable is the router's \s-1SNMP\s0 sysLocation value. (\s-1HTML\s0 escaped +variant: \fB\f(CB$html_syslocation\fB\fR) +.ie n .IP "\fB\fB$sysdescr\fB\fR" 4 +.el .IP "\fB\f(CB$sysdescr\fB\fR" 4 +.IX Item "$sysdescr" +This variable is the router's \s-1SNMP\s0 sysDescr value. It is normally not used +by cfgmaker but might be useful in a template. (\s-1HTML\s0 escaped variant: +\&\fB\f(CB$html_sysdescr\fB\fR) +.PP +\fIInterface Target Related Variables\fR +.IX Subsection "Interface Target Related Variables" +.ie n .IP "\fB\fB$target_name\fB\fR" 4 +.el .IP "\fB\f(CB$target_name\fB\fR" 4 +.IX Item "$target_name" +This is what cfgmaker normally would use as the the name of the target. +The target name is what is found within the square brackets, \*(L"[]\*(R", for target +directives. (There's no \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_ref\fB\fR" 4 +.el .IP "\fB\f(CB$if_ref\fB\fR" 4 +.IX Item "$if_ref" +This the reference string for the interface. It is expected to be used +in the \*(L"Target[xyz]\*(R" directive to distinguish what interface to use. The +value of this variable is affected by the \fB\-\-ifref\fR command line option. +It is normally used together with \fB\f(CB$router_connect\fB\fR. +(There's no \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_ok\fB\fR" 4 +.el .IP "\fB\f(CB$if_ok\fB\fR" 4 +.IX Item "$if_ok" +This variable is true if the interface is going to be included into the +configuration file, otherwise false. Don't test against other variables +such as \fB\f(CB$problem_lines\fB\fR to find out if an interface will be rejected +or not, use this \fB\f(CB$if_ok\fB\fR instead. +.ie n .IP "\fB\fB$default_target_lines\fB\fR" 4 +.el .IP "\fB\f(CB$default_target_lines\fB\fR" 4 +.IX Item "$default_target_lines" +This variable contains all the target lines which cfgmaker by default outputs +for this interface. It's useful if you want to have the \*(L"standard target\*(R" +but want to add some extra lines to it by using a template. +.PP +By default cfgmaker uses the following directives for each target it +generates: Target[], SetEnv[], MaxBytes[], Title[], PageTop[] and if +there is any directory specified also the Directory[] directive. +.PP +To facilitate the creation of templates which generates target configs +which are similar to the default one, each of the above mentioned +directive lines have a corresponding variable containing the line as +cfgmaker would have output it by default. +.PP +Note that none of these have a \s-1HTML\s0 escaped variant, text in them is +\&\s-1HTML\s0 escaped where needed. Also note that they do not have any newline +at the end. +.ie n .IP "\fB\fB$default_target_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_target_directive\fB\fR" 4 +.IX Item "$default_target_directive" +This variable contains the default string for the Target[] directive line. +.ie n .IP "\fB\fB$default_setenv_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_setenv_directive\fB\fR" 4 +.IX Item "$default_setenv_directive" +This variable contains the default string for the SetEnv[] directive line. +.ie n .IP "\fB\fB$default_directory_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_directory_directive\fB\fR" 4 +.IX Item "$default_directory_directive" +This variable contains the default string for the Directory[] directive line +which means it is an empty string (with no newline) if there's no directory. +.ie n .IP "\fB\fB$default_maxbytes_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_maxbytes_directive\fB\fR" 4 +.IX Item "$default_maxbytes_directive" +This variable contains the default string for the MaxBytes[] directive line. +.ie n .IP "\fB\fB$default_title_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_title_directive\fB\fR" 4 +.IX Item "$default_title_directive" +This variable contains the default string for the Title[] directive line. +.ie n .IP "\fB\fB$default_pagetop_directive\fB\fR" 4 +.el .IP "\fB\f(CB$default_pagetop_directive\fB\fR" 4 +.IX Item "$default_pagetop_directive" +This variable contains the default string for the PageTop[] directive lines. +.PP +\fIInterface Network Configuration Variables\fR +.IX Subsection "Interface Network Configuration Variables" +.ie n .IP "\fB\fB$if_ip\fB\fR" 4 +.el .IP "\fB\f(CB$if_ip\fB\fR" 4 +.IX Item "$if_ip" +This variable should contain the IP-address of the interface, if any has +been assigned to it. (There's no \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$ifindex\fB\fR" 4 +.el .IP "\fB\f(CB$ifindex\fB\fR" 4 +.IX Item "$ifindex" +This variable is the \s-1SNMP\s0 ifIndex for the interface which per definition +always is an integer. (There's no \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_index\fB\fR" 4 +.el .IP "\fB\f(CB$if_index\fB\fR" 4 +.IX Item "$if_index" +Equivalent with \fB\f(CB$ifindex\fB\fR. +.ie n .IP "\fB\fB$if_eth\fB\fR" 4 +.el .IP "\fB\f(CB$if_eth\fB\fR" 4 +.IX Item "$if_eth" +Contains the ethernet address of the interface, if any. (There's no \s-1HTML\s0 +escaped variant available) +.ie n .IP "\fB\fB$if_speed\fB\fR" 4 +.el .IP "\fB\f(CB$if_speed\fB\fR" 4 +.IX Item "$if_speed" +This variable is the speed in bytes/second (with prefixes). (There's no +\&\s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_speed_str\fB\fR" 4 +.el .IP "\fB\f(CB$if_speed_str\fB\fR" 4 +.IX Item "$if_speed_str" +This variable is a cooked speed description which is either in bits or +bytes depending on wether or not the bits option is active and also with +the proper prefix for the speed (k, M, G etc). (No \s-1HTML\s0 escaped variant +available) +.ie n .IP "\fB\fB$if_type_desc\fB\fR" 4 +.el .IP "\fB\f(CB$if_type_desc\fB\fR" 4 +.IX Item "$if_type_desc" +This variable is a textual description of the interface type. (\s-1HTML\s0 +escaped variant: \fB\f(CB$html_if_type_desc\fB\fR) +.ie n .IP "\fB\fB$if_type_num\fB\fR" 4 +.el .IP "\fB\f(CB$if_type_num\fB\fR" 4 +.IX Item "$if_type_num" +This variable the integer value corresponding to the interface type (for a +listing for the value for the more common interface types, see the section +\&\s-1DETAILS ON FILTERS\s0 above). (No \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_dns_name\fB\fR" 4 +.el .IP "\fB\f(CB$if_dns_name\fB\fR" 4 +.IX Item "$if_dns_name" +This is the \s-1DNS\s0 name for the interface. (No \s-1HTML\s0 escaped variant available) +.PP +\fIInterface Name, Description and Alias Variables\fR +.IX Subsection "Interface Name, Description and Alias Variables" +.PP +It might seem confusing with both \fIName\fR, \fIDescription\fR and \fIAlias\fR in +this context and to some extent it is. \fIName\fR and \fIDescription\fR are +usually supported on most equipment but how they are used varies, both +between manufacturers as well as between different cathegories of equipment +from the same manufacturer. The \fIAlias\fR is at least supported by Cisco +\&\s-1IOS,\s0 and that variable contains whatever is used in the \s-1IOS\s0 statement +called \*(L"description\*(R" for the interface (not to be confused with the \s-1SNMP\s0 +variables for \fIDescription\fR). +.PP +For better control from the command line consider \fB\f(CB$if_title_desc\fB\fR which contents +are controlled by the \fB\-\-if\-descr\fR command line option. +.ie n .IP "\fB\fB$if_snmp_descr\fB\fR" 4 +.el .IP "\fB\f(CB$if_snmp_descr\fB\fR" 4 +.IX Item "$if_snmp_descr" +This variable should contain the \*(L"raw\*(R" description of the interface as +determined by the \s-1SNMP\s0 polling of the router. (\s-1HTML\s0 escaped variant: +\&\fB\f(CB$html_if_snmp_descr\fB\fR) +.ie n .IP "\fB\fB$if_snmp_name\fB\fR" 4 +.el .IP "\fB\f(CB$if_snmp_name\fB\fR" 4 +.IX Item "$if_snmp_name" +The \*(L"raw\*(R" name for the interface as provided by \s-1SNMP\s0 polling. (\s-1HTML\s0 escaped +variant: \fB\f(CB$html_if_snmp_name\fB\fR) +.ie n .IP "\fB\fB$if_snmp_alias\fB\fR" 4 +.el .IP "\fB\f(CB$if_snmp_alias\fB\fR" 4 +.IX Item "$if_snmp_alias" +The \*(L"raw\*(R" ifAlias for the interface as provided by \s-1SNMP\s0 polling. (\s-1HTML\s0 +escaped variant: \fB\f(CB$html_if_snmp_alias\fB\fR) +.ie n .IP "\fB\fB$if_cisco_descr\fB\fR" 4 +.el .IP "\fB\f(CB$if_cisco_descr\fB\fR" 4 +.IX Item "$if_cisco_descr" +The \*(L"raw\*(R" CiscolocIfDescr for the interface as provided by \s-1SNMP\s0 polling. +(\s-1HTML\s0 escaped variant: \fB\f(CB$html_if_cisco_descr\fB\fR) +.ie n .IP "\fB\fB$if_description\fB\fR" 4 +.el .IP "\fB\f(CB$if_description\fB\fR" 4 +.IX Item "$if_description" +This is the \*(L"cooked\*(R" description string for the interface, taking into account +the \s-1SNMP\s0 values found for the interface's RDescr, ifAlias and +CiscolocIfDescr. (\s-1HTML\s0 escaped variant: \fB\f(CB$html_if_description\fB\fR) +.ie n .IP "\fB\fB$if_title\fB\fR" 4 +.el .IP "\fB\f(CB$if_title\fB\fR" 4 +.IX Item "$if_title" +The full string cfgmaker by default would have used for the Title[] directive +in the configuration as well as the content of the topmost H1 tag in the +PageTop[]. Is composed by the contents of \fB\f(CB$desc_prefix\fB\fR, +\&\fB\f(CB$if_title_desc\fB\fR and \fB\f(CB$sysname\fB\fR. +.Sp +As \fB\f(CB$if_title\fB\fR depends on \fB\f(CB$if_title_desc\fB\fR, it is possible to indirectly +control \fB\f(CB$if_title\fB\fR by using the command line option \fB\-\-if\-descr\fR. +.Sp +(\s-1HTML\s0 escaped variant: \fB\f(CB$html_if_title\fB\fR) +.ie n .IP "\fB\fB$if_port_name\fB\fR" 4 +.el .IP "\fB\f(CB$if_port_name\fB\fR" 4 +.IX Item "$if_port_name" +If the host is a Cisco Catalyst \s-1LAN\s0 switch, this variable is the name of +that port. (No \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$if_pp_port_name\fB\fR" 4 +.el .IP "\fB\f(CB$if_pp_port_name\fB\fR" 4 +.IX Item "$if_pp_port_name" +If the host is a Nortel Passport \s-1LAN\s0 switch, this variable is the name of +that port. (No \s-1HTML\s0 escaped variant available) +.ie n .IP "\fB\fB$desc_prefix\fB\fR" 4 +.el .IP "\fB\f(CB$desc_prefix\fB\fR" 4 +.IX Item "$desc_prefix" +This variable is a prefix of the description of what the target is to use in +the \*(L"Title[]\*(R" directive and in the H1 section of the \*(L"PageTop[]\*(R". Default is +\&\*(L"Traffic analysis for \*(R". (\s-1HTML\s0 escaped variant: \fB\f(CB$html_desc_prefix\fB\fR) +.ie n .IP "\fB\fB$if_title_desc\fB\fR" 4 +.el .IP "\fB\f(CB$if_title_desc\fB\fR" 4 +.IX Item "$if_title_desc" +This is the description of the interface normally used by cfgmaker as part +of the variable \fB\f(CB$if_title\fB\fR. The latter is used as the full string in the +\&\*(L"Title[]\*(R" directove and the H1 section in the PageTop[]. +.Sp +\&\fB\f(CB$if_title_desc\fB\fR is controlled by the command line option \fB\-\-if\-descr\fR +which indirectly controls the contents of \fB\f(CB$if_title\fB\fR +.Sp +(\s-1HTML\s0 escaped variant: \fB\f(CB$html_if_title_desc\fB\fR) +.PP +\fIHelp Functions for Templates\fR +.IX Subsection "Help Functions for Templates" +.PP +The following functions exists to facilitate the writing of host and +interface templates. +.IP "\fBhtml_escape(\f(BIstring\fB)\fR" 4 +.IX Item "html_escape(string)" +\&\fB\f(BIhtml_escape()\fB\fR takes a string as an argument and returns a new string +where the following substitutions has been done: the chars \*(L"<\*(R", \*(L">\*(R" and +\&\*(L"&\*(R" are replaced by \*(L"<\*(R", \*(L">\*(R" and \*(L"&\*(R" and that newlines embedded +in the string are prepended with \*(L"<\s-1BR\s0>\*(R" and appended with a space character +(newlines at the end of the string are not touched). +.ie n .IP "\fBoid_pick($router_connect,$v3opt,""oid1"",""oid2""...)\fR" 4 +.el .IP "\fBoid_pick($router_connect,$v3opt,``oid1'',``oid2''...)\fR" 4 +.IX Item "oid_pick($router_connect,$v3opt,oid1,oid2...)" +This function will try to poll each of the oids specified until +it is successful or has run out of oids. It will return the name of the +first oid that worked or undef if it is not successful +.PP +\fIExample Template Files\fR +.IX Subsection "Example Template Files" +.PP +Template Example 1: Eliminating Rejected Targets From Appearing +.IX Subsection "Template Example 1: Eliminating Rejected Targets From Appearing" +.PP +This template file generates exactly the same configuration code per +interface as cfgmaker does by default, with the exception that it eliminates +all lines (comments as well as config code) for an interface if the +interface happens to be rejected. +.PP +.Vb 3 +\& if(not $problem_lines) +\& { +\& $target_lines .= <<ECHO; +\& +\& Target[$target_name]: $if_ref:$router_connect +\& SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr" +\& ECHO +\& +\& if ($directory_name) { +\& $target_lines .= "Directory[$target_name]: $directory_name\en"; +\& } +\& +\& $target_lines .= <<ECHO; +\& MaxBytes[$target_name]: $if_speed +\& Title[$target_name]: $html_desc_prefix$html_if_title_desc \-\- $sysname +\& PageTop[$target_name]: <h1>$html_desc_prefix$html_if_title_desc \-\- $sysname</h1> +\& <div id="sysdetails"> +\& <table> +\& <tr> +\& <td>System:</td> +\& <td>$sysname in $html_syslocation</td> +\& </tr> +\& <tr> +\& <td>Maintainer:</td> +\& <td>$html_syscontact</td> +\& </tr> +\& <tr> +\& <td>Description:</td> +\& <td>$html_if_description</td> +\& </tr> +\& <tr> +\& <td>ifType:</td> +\& <td>$html_if_type_desc ($if_type_num)</td> +\& </tr> +\& <tr> +\& <td>ifName:</td> +\& <td>$html_if_snmp_name</td> +\& </tr> +\& ECHO +\& +\& $target_lines .= <<ECHO if defined $if_port_name; +\& <tr> +\& <td>Port Name:</td> +\& <td>$if_port_name</td> +\& </tr> +\& ECHO +\& +\& $target_lines .= <<ECHO if defined $if_pp_port_name; +\& <tr> +\& <td>Port Name:</td> +\& <td>$if_pp_port_name</td> +\& </tr> +\& ECHO +\& +\& $target_lines .= <<ECHO; +\& <tr> +\& <td>Max Speed:</td> +\& <td>$if_speed_str</td> +\& </tr> +\& ECHO +\& +\& $target_lines .= <<ECHO if $if_ip; +\& <tr> +\& <td>Ip:</td> +\& <td>$if_ip ($if_dns_name)</td> +\& </tr> +\& ECHO +\& +\& $target_lines .= <<ECHO; +\& </table> +\& </div> +\& ECHO +\& } else { +\& $head_lines=""; +\& $problem_lines=""; +\& $target_lines=""; +\& $separator_lines=""; +\& } +.Ve +.PP +\fITemplate Example 2: Simplier Version of Example 1\fR +.IX Subsection "Template Example 2: Simplier Version of Example 1" +.PP +Example 1 was partly intended to demonstrate how to customize the generation +of interface targets but also to provide a hint of how the variables are +used in the \*(L"default\*(R" template which one could consider that cfgmaker +normally uses. +.PP +If you're only intrested in the easiest way of entirely eliminating those +reject interfaces, the template below would do the job as well by using +\&\fB\f(CB$default_target_lines\fB\fR. +.PP +.Vb 8 +\& if($if_ok) { +\& $target_lines = $default_target_lines; +\& } else { +\& $head_lines=""; +\& $problem_lines=""; +\& $target_lines=""; +\& $separator_lines=""; +\& } +.Ve +.PP +\fITemplate Example 3: Creating \s-1CPU\s0 Targets for Hosts\fR +.IX Subsection "Template Example 3: Creating CPU Targets for Hosts" +.PP +Below is an example of a host template. +.PP +.Vb 3 +\& $head_lines .= <<ECHO; +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& ECHO +\& +\& my $target_name = $router_name . ".cpu"; +\& +\& $target_lines .= <<ECHO; +\& +\& YLegend[$target_name]: Percentage CPU load +\& ShortLegend[$target_name]: % +\& Legend1[$target_name]: CPU load in % +\& Legend2[$target_name]: +\& Legend3[$target_name]: Max Observed CPU load +\& Legend4[$target_name]: +\& LegendI[$target_name]: CPU Load: +\& LegendO[$target_name]: +\& WithPeak[$target_name]: ywm +\& MaxBytes[$target_name]: 100 +\& Options[$target_name]: growright, gauge, nopercent +\& Title[$target_name]: $router_name CPU load +\& Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect +\& PageTop[$target_name]: <h1>$router_name CPU load</h1> +\& <div> +\& <table> +\& <tr> +\& <td>System:</td> +\& <td>$router_name in $html_syslocation</td> +\& </tr> +\& <tr> +\& <td>Maintainer:</td> +\& <td>$html_syscontact</td> +\& </tr> +\& <tr> +\& <td>Description:</td> +\& <td>$html_sysdescr</td> +\& </tr> +\& <tr> +\& <td>Resource:</td> +\& <td>CPU.</td> +\& </tr> +\& </table> +\& </div> +\& ECHO +.Ve +.SH "EXAMPLES" +.IX Header "EXAMPLES" +The first example creates a config file for \fIrouter.place.xyz\fR: the router +has the community name \fIpublic\fR. Interfaces get identified by their +\&\s-1IP\s0 number. Two global options get added to the config file. The +config file gets redirected to \fImrtg.conf\fR. The '\e' signs at the end +of the line mean that this command should be written on a single line. +.PP +.Vb 4 +\& cfgmaker \-\-global "WorkDir: /home/tobi" \e +\& \-\-global "Options[_]: growright,bits" \e +\& \-\-ifref=ip \e +\& public@router.place.xyz > mrtg.cfg +.Ve +.PP +Note: if cfgmaker is not in your path, but you are in the directory where +cfgmaker is stored, you can start it with ./cfgmaker +.PP +The next example creates a config file for four devices: +\&\fIrouter1.place.xyz\fR, \fIrouter2.place.xyz\fR, \fIswitch1.place.xyz\fR and +\&\fIswitch2.place.xyz\fR all with the community \fIpublic\fR. +.PP +The two routers will have \fB\-\-ifref\fR set to \fBdescr\fR whilst the two +switches will use \fB\-\-ifref\fR set to \fBname\fR. Further the routers will +use \fB\-\-ifdesc\fR set to \fBalias\fR and \fIswitch1.place.xyz\fR will use +\&\fB\-\-ifdesc\fR set to \fBdescr\fR whilst \fIswitch2.place.xyz\fR use \fBname\fR instead. +.PP +Finally, there will be two Options lines inserted in the configuration: +One will be in the beginning, whilst the other will be inserted after +the lines related to the two routers but before those lines related +to the switches. +.PP +.Vb 12 +\& cfgmaker \-\-global "WorkDir: /home/tobi" \e +\& \-\-global "Options[_]: growright,bits" \e +\& \-\-ifref=descr \e +\& \-\-ifdesc=alias \e +\& public@router1.place.xyz \e +\& public@router2.place.xyz \e +\& \-\-global "Options[_]: growright" \e +\& \-\-ifref=name \e +\& \-\-ifdesc=descr \e +\& public@switch1.place.xyz \e +\& \-\-ifdesc=name \e +\& public@switch2.place.xyz > mrtg.cfg +.Ve +.PP +The next example demonstrates how to use the \fB\-\-community\fR, +\&\fB\-\-snmp\-options\fR and \fB\-\-dns\-domain\fR to make the command line +simpler. All the equipment will use the community \fIhidden\fR, except for +the ppp-server which use community \fIaccess\fR. All equipment uses these +\&\s-1SNMP\s0 options: \fB1s timeout\fR, \fB1 retry\fR and \fB\s-1SNMP\s0 version 2\fR (\fBbackoff\fR and +\&\fBport\fR is unspecified which means they use the default values). +The exception again is the ppp-server which uses \fB\s-1SNMP\s0 version 1\fR. +Finally, all the equipment is part of the domain \fIplace.xyz\fR, except +for the ppp-server which is part of the domain \fIremote.place.xyz\fR. +Note that the latter is achieved simply by specifying the name +of the ppp-server to be \fIppp-server.\f(BIremote\fI\fR . +.PP +.Vb 10 +\& cfgmaker \-\-global "WorkDir: /home/tobi" \e +\& \-\-global "Options[_]: growright,bits" \e +\& \-\-dns\-domain=place.xyz \e +\& \-\-community=hidden \e +\& \-\-snmp\-options=::1:1::2 \e +\& router1 \e +\& router2 \e +\& router3 \e +\& router4 \e +\& router5 \e +\& switch1 \e +\& switch2 \e +\& switch3 \e +\& switch4 \e +\& switch5 \e +\& switch6 \e +\& switch7 \e +\& access@ppp\-server.remote:::::1 > mrtg.cfg +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +mrtg-reference +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> and +Jakob Ilves <jakob.ilves@oracle.com> +.SH "LICENSE" +.IX Header "LICENSE" +\&\s-1GNU\s0 General Public License +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Cfgmaker is Copyright 2000 by Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/cfgmaker.pod b/doc/cfgmaker.pod index ee651aa..ee651aa 120000 --- a/src/doc/cfgmaker.pod +++ b/doc/cfgmaker.pod diff --git a/doc/cfgmaker.txt b/doc/cfgmaker.txt new file mode 100644 index 0000000..128cf67 --- /dev/null +++ b/doc/cfgmaker.txt @@ -0,0 +1,1206 @@ +CFGMAKER(1) mrtg CFGMAKER(1) + + + +NNAAMMEE + cfgmaker - Creates mrtg.cfg files (for mrtg-2.17.7) + +SSYYNNOOPPSSIISS + cfgmaker [options] [community@]router [[options] [community@]router + ...] + +OOPPTTIIOONNSS + --ifref=nr interface references by Interface Number (default) + --ifref=ip ... by Ip Address + --ifref=eth ... by Ethernet Number + --ifref=descr ... by Interface Description + --ifref=name ... by Interface Name + --ifref=type ... by Interface Type + You may also use multiple options separated by commas, + in which case the first available one is used: + e.g. --ifref=ip,name,nr + + --ifdesc=nr interface description uses Interface Number (default) + --ifdesc=ip ... uses Ip Address + --ifdesc=eth ... uses Ethernet Number + --ifdesc=descr ... uses Interface Description + --ifdesc=name ... uses Interface Name + --ifdesc=catname ... uses CatOS Interface Name + --ifdesc=ppname ... uses Passport Port Name + --ifdesc=alias ... uses Interface Alias + --ifdesc=type ... uses Interface Type + You may also use multiple options separated by commas, + in which case the first available one is used: + e.g. --ifdesc=catname,ppname,descr,alias,ip,name,nr + + --if-filter=f Test every interface against filter f to decide wether + or not to include that interface into the collection. + Currently f is being evaluated as a Perl expression + and it's truth value is used to reject or accept the + interface. + (Experimental, under development, might change) + + --if-template=templatefile + Replace the normal target entries for the interfaces + with an entry as specified by the contents in the file + templatefile. The file is supposed to contain Perl + code to be executed to generate the lines for the + target in the configuration file. + (Experimental, under development, might change) + + --host-template=templatefile + In addition to creating targets for a host's interfaces + do also create targets for the host itself as specified + by the contents in the file templatefile. The file is + supposed to contain Perl code to be executed to generate + the lines for the host related targets (such as CPU, + ping response time measurements etc.) in the config- + uration file. + (Experimental, under development, might change) + + --global "x: a" add global config entries + + --no-down do not look at admin or opr status of interfaces + + --show-op-down show interfaces which are operatively down + + --zero-speed=spd use this speed in bits-per-second as the interface + speed for all interfaces that return a speed of 0 + via ifSpeed/ifHighSpeed. 100Mbps = 100000000 + + --subdirs=format give each router its own subdirectory, naming each per + "format", in which HOSTNAME and SNMPNAME will be + replaced by the values of those items -- for instance, + --subdirs=HOSTNAME or --subdirs="HOSTNAME (SNMPNAME)" + + --noreversedns do not reverse lookup ip numbers + + --community=cmty Set the default community string to "cmty" instead of + "public". + + --enable-ipv6 Enable IPv6 support, if the required libraries are + present. Numeric IPv6 addresses must be enclosed + in square brackets, e.g. public@[2001:760:4::1]:161 + + --use-16bit Use 16bit SNMP request IDs to query all routers. + + --snmp-options=:[<port>][:[<tmout>][:[<retr>][:[<backoff>][:<ver>]]]] + + Specify default SNMP options to be appended to all + routers following. Individual fields can be empty. + Routers following might override some or all of the + options given to --snmp-options. + + --dns-domain=domain + Specifies a domain to append to the name of all + routers following. + + --nointerfaces Don't do generate any configuration lines for interfaces, + skip the step of gathering interface information and + don't run any interface template code. + + --interfaces Generate configuration lines for interfaces (this is the + default). The main purpose of this option is to negate + an --nointerfaces appearing earlier on the command line. + + --help brief help message + --man full documentation + --version print the version of cfgmaker + + --output=file output filename default is STDOUT + +DDEESSCCRRIIPPTTIIOONN + CCffggmmaakkeerr creates MRTG configuration files based on information pulled + from a router or another SNMP manageable device. + + [_c_o_m_m_u_n_i_t_y@@]_r_o_u_t_e_r + + _C_o_m_m_u_n_i_t_y is the community name of the device you want to create a + configuration for. If not specified, it defaults to 'ppuubblliicc'; you might + want to try this first if you do not know the community name of a + device. If you are using the wrong community name you will get no + response from the device. + + _R_o_u_t_e_r is the DNS name or the IP number of an SNMP-managable device. + Following the name you can specify 6 further options separated by + colons. The full syntax looks like this: + + rroouutteerr[:[pprrtt][:[ttmmoouutt][:[rreettrr][:[bbaacckkooffff][:vveerrss]]]]] + + Of special interest may be the last parameter, vveerrss. If you set this + to '2' then your device will be queried with SNMP version 2 requests. + This allows you to poll the 64 bit traffic counters in the device and + will thus work much better with fast interfaces (no more counter + overrun). Note that the order in which the routers are specified on + the command line do matter as the same order is used when the + configuration file is generated. The first specified router has it's + configuration lines genrated first, followed by the lines belonging to + the next router and so on. + + Note that the first line of the generated cfg file will contain all the + commandline options you used for generating it. This is to allow for + the easy 'regeneration' in case you want to add newhosts or make some + other global change. + + CCoonnffiigguurraattiioonn + Except for the ----oouuttppuutt and ----gglloobbaall options, all options affect only + the routers following them on the command line. If an option specified + earlier on the command line reappears later on the command line with + another value, the new value overrides the old value as far as + remaining routers are concerned. This way options might be tailored + for groups of routers or for individual routers. + + See ----oouuttppuutt and ----gglloobbaall for how their behaviour is affected by where + or how many times they appear on the command line. + + See the EExxaammpplleess below on how to set an option differently for multiple + routers. + + ----hheellpp + Print a brief help message and exit. + + ----mmaann + Prints the manual page and exits. + + ----vveerrssiioonn + Print the version of cfgmaker. This should match the version of + MRTG for which config files are being created. + + ----iiffrreeff nnrr|iipp|eetthh|ddeessccrr|nnaammee + Select the interface identification method. Default is nnrr which + identifies the router interfaces by their number. Unfortunately + the interface numbering scheme in an SNMP tree can change. Some + routers change their numbering when new interfaces are added, + others change thier numbering every full moon just for fun. + + To work around this sad problem MRTG can identify interfaces by 4 + other properties. None of these works for all interfaces, but you + should be able to find one which does fine for you. Note that + especially ethernet addrsses can be problematic as some routers + have the same ethernet address on most of their interface cards. + + Select iipp to identify the interface by its IP number. Use eetthh to + use the ethernet address for identification. Use ddeessccrr to use the + Interface description. Or use nnaammee to use the Interface name. + + You can specify multiple properties if you wish, separated by + commas. In this case, cfgmaker will use the first item in the list + which can provide unique identification. This allows you to + specify, for example, to use IP address and to use ifName if this + is not defined: + --ifref ip,name + + If your chosen method does not allow unique interface + identification on the device you are querying, ccffggmmaakkeerr will tell + you about it. + + ----iiffddeesscc nnrr|iipp|eetthh|ddeessccrr|nnaammee|ttyyppee|aalliiaass + Select what to use as the description of the interface. The + description appears in the "Title[]" property for the target as + well as the text header in the HTML code defined in the target's + "PageTop[]". Default is to use nnrr which is just the interface + number which isn't always useful to the viewer of the graphs. + + There are 6 other properties which could be used. Use iipp if you + want to use the interface's IP-address. Use eetthh if you want to use + the interface's ethernet address. If you want a better + description, you can use either ddeessccrr, nnaammee or aalliiaass. Exactly what + each of these do varies between different equipment so you might + need to experiment. For instance, for a serial interface on a + Cisco router running IOS using nnaammee might result in "S0" being the + interface description , ddeessccrr might result in "Serial0" and aalliiaass + might result in "Link to HQ" (provided that is what is used as the + interface's "description" in the router's configuration). + + Finally, if you want to describe the interface by it's Btype (i.e + "ethernetCSMA", "propPointtoPoint" etc) you can use ttyyppee. + + You can specify multiple properties if you wish, separated by + commas. In this case, cfgmaker will use the first item in the list + which is available for this interface. This allows you to specify, + for example, to use any of the different aliases in order of + preference. + + ----iiff--ffiilltteerr 'ffiilltteerr--eexxpprreessssiioonn' + First of all, this is under some development and is experimental. + + Use this if you want to have better control over what interfaces + gets included into the configuration. The ffiilltteerr--eexxpprreessssiioonn is + evaluated as a piece of Perl code and is expected to return a truth + value. If true, include the interface and if false, exclude the + interface. + + For a further discussion on how these filters work, see the section + "Details on Filters" below. + + ----iiff--tteemmppllaattee tteemmppllaattee--ffiillee + First of all, this is under some development and is experimental. + + Use this if you want to control what the line for each target + should look like in the configuration file. The contents of the + file tteemmppllaattee--ffiillee will be evaluated as a Perl program which + generates the lines using certain variables for input and output. + + For a further discussion on how these templates work, see the + section "Details on Temaplates" below. + + ----hhoosstt--tteemmppllaattee tteemmppllaattee--ffiillee + First of all, this is under some development and is experimental. + + Use this if you want to have some extra targets related to the host + itself such as CPU utilization, ping response time to the host, + number of busy modems etc. The contents of the file tteemmppllaattee--ffiillee + will be evaluated once per host as a Perl program which generates + the lines using certain variables for input and output. + + For a further discussion on how these templates work, see the + section "Details on Templates" below. + + ----ccoommmmuunniittyy ccoommmmuunniittyy--ssttrriinngg + Use this to set the community for the routers following on the + command line to ccoommmmuunniittyy--ssttrriinngg. Individual routers might + overrride this community string by using the syntax + ccoommmmuunniittyy@@rroouutteerr. + + ----eennaabbllee--iippvv66 + This option enables IPv6 support. It requires the appropriate perl + modules; if they are not found then IPv6 is disabled (see the ipv6 + documentation). + + cfgmaker will use IPv6 or IPv4 depending on the target. If the + target is a numeric address, the protocol depends on the type of + address. If the target is a hostname, cfgmaker will try to resolve + the name first to an IPv6 address then to an IPv4 address. + + IPv6 numeric addresses must be specified between square braces. + + For example: + + cfgmaker --enable-ipv6 [2001:760:4::1]:165:::2 + + If the target has both an IPv6 address and an IPv4 address with the + same hostname, cfgmaker first queries the target using IPv6 and + falls back to IPv4 if it fails. This is useful for targets which + don't support SNMP over IPv6. + + ----uussee--1166bbiitt + This option forces the use of 16bit SNMP request IDs. Some broken + SNMP agents do not accept 32bit request IDs. Try to avoid this + option as much as possible, complain to your agent vendor instead. + + ----ssnnmmpp--ooppttiioonnss :[ppoorrtt][:[ttiimmeeoouutt][:[rreettrriieess][:[bbaacckkooffff][:vveerrssiioonn]]]] + Use this to set the default SNMP options for all routers following + on the command line. Individual values might be omitted as well as + trailing colons. Note that routers might override individual (or + all) values specified by ----ssnnmmpp--ooppttiioonnss by using the syntax + + rroouutteerr[:[ppoorrtt][:[ttiimmeeoouutt][:[rreettrriieess][:[bbaacckkooffff][:vveerrssiioonn]]]]] + + ----gglloobbaall ""_b_l_a_: _a_b_c"" + Use this to add global options to the generated config file. You + can call ----gglloobbaall several times to add multiple options. The line + will appear in the configuration just before the config for the + next router appearing on the command line. + + --global "workdir: /home/mrtg" + + If you want some default Options you might want to put + + --global "options[_]: growright,bits" + + Specifying ----gglloobbaall after the last router on the command line will + create a line in the configuration file which will appear after all + the routers. + + ----nnoorreevveerrsseeddnnss + Do not try to reverse lookup IP numbers ... a must for DNS free + environments. + + ----nnoo--ddoowwnn + Normally cfgmaker will not include interfaces which are marked + anything but administratively and operationally UP. With this + switch you get them all. + + ----sshhooww--oopp--ddoowwnn + Include interfaces which are operatively down. + + ----zzeerroo--ssppeeeedd _s_p_e_e_d + Assign this speed in bits-per-second to all interfaces which return + 0 for ifSpeed and ifHighSpeed. Some switches, notably Foundry + equipment, return a speed of zero for some interfaces. For + example, to have all interfaces reporting zero set to 100Mbps, use + --zero-speed=100000000. + + ----ssuubbddiirrss _f_o_r_m_a_t + Give each router its own subdirectory for the HTML and graphics (or + .rrd) files. The directory name is the given _f_o_r_m_a_t string with a + couple of pattern replacements. The string "HOSTNAME" will be + replaced by the hostname of the router (however you specified it on + the ccffggmmaakkeerr commandline -- it may be an actual hostname or just an + IP address), and "SNMPNAME" will be replaced with the device's idea + of its own name (the same name that appears on the right side of + the "Title" lines). For instance, a call like: + + cfgmaker --subdirs=HOSTNAME__SNMPNAME public@10.10.0.18 + + would result in the generation of lines looking something like: + + Directory[10.10.0.18_1]: 10.10.0.18__fp2200-bothrip-1.3 + + ----oouuttppuutt _f_i_l_e + Write the output from ccffggmmaakkeerr into the file _f_i_l_e. The default is + to use "STDOUT". ----oouuttppuutt is expected to appear only once on the + command line. If used multiple times, the file specified by the + last ----oouuttppuutt will be used. + + ----nnooiinntteerrffaacceess + Don't generate configuration lines for interfaces. + + This makes cfgmaker skip all steps related to interfaces which + means it will not do any polling of the router to retrieve + interface information which speeds up the execution of cfgmaker and + it will neither run any interface templates. + + ----iinntteerrffaacceess + This makes cfgmaker generate configuration lines for interfaces + (the default behaviour). + + The main usage of this option is to negate an --nointerfaces + appearing earlier on the command line. + + SSNNMMPP VV33 OOppttiioonnss + CCffggmmaakkeerr supports SNMP V3 using the NNeett::SSNNMMPP perl module. There are + optional parameters affecting SNMP operation. + + --enablesnmpv3 {yes|no} + The ----eennaabblleessnnmmppvv33 option is an optional flag to check for the + presence of the NNeett::::SSNNMMPP libraries. CCffggmmaakkeerr will try to + determine whether this flag is required and will set the values + automatically. + + _S_N_M_P_v_3 _A_r_g_u_m_e_n_t_s + + A SNMP context is a collection of management information accessible by + a SNMP entity. An item of management information may exist in more + than one context and a SNMP entity potentially has access to many + contexts. The combination of a contextEngineID and a contextName + unambiguously identifies a context within an administrative domain. In + a SNMPv3 message, the contextEngineID and contextName are included as + part of the scopedPDU. All methods that generate a SNMP message + optionally take a ----ccoonntteexxtteennggiinneeiidd and ----ccoonntteexxttnnaammee argument to + configure these fields. + + Context Engine ID + The ----ccoonntteexxtteennggiinneeiidd argument expects a hexadecimal string + representing the desired contextEngineID. The string must be 10 to + 64 characters (5 to 32 octets) long and can be prefixed with an + optional "0x". Once the ----ccoonntteexxtteennggiinneeiidd is specified it stays + with the object until it is changed again or reset to default by + passing in the undefined value. By default, the contextEngineID is + set to match the authoritativeEngineID of the authoritative SNMP + engine. + + Context Name + The contextName is passed as a string which must be 0 to 32 octets + in length using the ----ccoonntteexxttnnaammee argument. The contextName stays + with the object until it is changed. The contextName defaults to + an empty string which represents the "default" context. + + _U_s_e_r_-_b_a_s_e_d _S_e_c_u_r_i_t_y _M_o_d_e_l _A_r_g_u_m_e_n_t_s + + The User-based Security Model (USM) used by SNMPv3 requires that a + securityName be specified using the ----uusseerrnnaammee argument. The creation + of a Net::SNMP object with the version set to SNMPv3 will fail if the + ----uusseerrnnaammee argument is not present. The ----uusseerrnnaammee argument expects a + string 1 to 32 octets in length. + + Different levels of security are allowed by the User-based Security + Model which address authentication and privacy concerns. A SNMPv3 + target will derive the security level (securityLevel) based on which of + the following arguments are specified. + + By default a securityLevel of 'noAuthNoPriv' is assumed. If the + ----aauutthhkkeeyy or ----aauutthhppaasssswwoorrdd arguments are specified, the securityLevel + becomes 'authNoPriv'. The ----aauutthhppaasssswwoorrdd argument expects a string + which is at least 1 octet in length. Optionally, the ----aauutthhkkeeyy + argument can be used so that a plain text password does not have to be + specified in a script. The ----aauutthhkkeeyy argument expects a hexadecimal + string produced by localizing the password with the + authoritativeEngineID for the specific destination device. The + "snmpkey" utility included with the Net::SNMP distribution can be used + to create the hexadecimal string (see snmpkey). + + Two different hash algorithms are defined by SNMPv3 which can be used + by the Security Model for authentication. These algorithms are + HMAC-MD5-96 "MD5" (RFC 1321) and HMAC-SHA-96 "SHA-1" (NIST FIPS PUB + 180-1). The default algorithm used by the module is HMAC-MD5-96. + This behavior can be changed by using the ----aauutthhpprroottooccooll argument. + This argument expects either the string 'md5' or 'sha' to be passed to + modify the hash algorithm. + + By specifying the arguments ----pprriivvkkeeyy or ----pprriivvppaasssswwoorrdd the + securityLevel associated with the object becomes 'authPriv'. According + to SNMPv3, privacy requires the use of authentication. Therefore, if + either of these two arguments are present and the ----aauutthhkkeeyy or + ----aauutthhppaasssswwoorrdd arguments are missing, the creation of the object fails. + The ----pprriivvkkeeyy and ----pprriivvppaasssswwoorrdd arguments expect the same input as the + ----aauutthhkkeeyy and ----aauutthhppaasssswwoorrdd arguments respectively. + + The User-based Security Model described in RFC 3414 defines a single + encryption protocol to be used for privacy. This protocol, CBC-DES + "DES" (NIST FIPS PUB 46-1), is used by default or if the string 'des' + is passed to the ----pprriivvpprroottooccooll argument. By working with the Extended + Security Options Consortium http://www.snmp.com/eso/, the module also + supports additional protocols which have been defined in draft + specifications. The draft + http://www.snmp.com/eso/draft-reeder-snmpv3-usm-3desede-00.txt defines + the support of CBC-3DES-EDE "Triple-DES" (NIST FIPS 46-3) in the User- + based Security Model. This protocol can be selected using the + ----pprriivvpprroottooccooll argument with the string '3desede'. The draft + http://www.snmp.com/eso/draft-blumenthal-aes-usm-04.txt describes the + use of CFB128-AES-128/192/256 "AES" (NIST FIPS PUB 197) in the USM. The + three AES encryption protocols, differentiated by their key sizes, can + be selected by passing 'aescfb128', 'aescfb192', or 'aescfb256' to the + --pprriivvpprroottooccooll argument. + + DDeettaaiillss oonn FFiilltteerrss + The purpose of the filters is to decide which interfaces to accept and + which interfaces to reject. This decision is done for each interface + by evaluating the filter expression as a piece of Perl code and + investigating the result of the evaluation. If true, accept the + interface otherwise reject it. + + When working with filters, remember that Perl has it's own idea of what + truth and false is. The empty string "" and the string "0" are false, + all other strings are true. This further imples that any integer value + of 0 is false as well as any undef value. It also implies that all + references are considered true. + + As the filter is evaluated as a Perl expression, several useful + constructs in Perl are worth mentioning: + + Expressions might be grouped by using parentheses "()". Expressions + might be combined using boolean operators such as the following: + + "aanndd" (equivalent with "&&&&") + Boolean "and" of the two expressions, is only true if both + expressions are true. Example: _e_x_p_r_e_s_s_i_o_n_1 aanndd _e_x_p_r_e_s_s_i_o_n_2 + + "oorr" (equivalent with "||||") + Boolean "or" of the two expressions, is true if either or both + expressions are true. Example: _e_x_p_r_e_s_s_i_o_n_1 oorr _e_x_p_r_e_s_s_i_o_n_2 + + "nnoott" (equivalent with "!!") + Boolean negation of a single expression. Example: nnoott _e_x_p_r_e_s_s_i_o_n + . Yet another example: !!_e_x_p_r_e_s_s_i_o_n + + (For more details on this I recommend a book on Perl) + + _P_r_e_d_e_f_i_n_e_d _F_i_l_t_e_r _V_a_r_i_a_b_l_e_s + + To facilitate, there are a number of predefined values available to use + in the filter. Note that these variables are also available when + templates interfaces are evaluated (but not host templates). + + Caveat: All these variables' names begin with a dollar sign ($), + which is a syntactic requirement for scalar variables in Perl. The + danger here is that the dollar sign in many shells is an active + character (often used for shell variables exactly as in Perl variables) + so it is important to ensure that the Perl expression isn't evaluated + by the command line shell as shell code before being passed to cfgmaker + as command line arguments. In shells like Bourne shell, ksh shell or + bash shell, placing the entire expression within single qoutes will + avoid such accidental evaluation: + + '--if-filter=($default_iftype && $if_admin)' + + $$iiff__ttyyppee + This is an integer specifying the interface type as per the SNMP + standards and as reported by the polled device. A complete list of + interface types would be impractical for this document , but there + are a number predefined varables below. Normally, cfgmaker puts in + the target's PageTop this iftype value within paranthesis after the + name of the interface type. (e.g "propPointToPointSerial (22)"). + + Here's a list of some of the most common interface types by number: + + 6 ethernetCsmacd + 7 iso88023Csmacd + 9 iso88025TokenRing + 15 fddi + 19 E1 + 20 basicISDN + 21 primaryISDN + 22 propPointToPointSerial + 23 ppp + 24 softwareLoopback + 30 ds3 + 32 frame-relay + 33 rs232 + 37 atm + 39 sonet + 44 frameRelayService + 46 hssi + 49 aal5 + 53 propVirtual + 62 Fast Ethernet (100BaseT) + 63 ISDN & X.25 + 69 Full Duplex Fast Ethernet (100BaseFX) + 94 Asymetric Digital Subscriber Loop (ADSL) + 117 Gigabit Ethernet + 134 ATM Sub Interface + + $$ddeeffaauulltt + True if and only if cfgmaker normally should accepted the interface + based on the interfaces administrative and operational state + (taking the flags ----nnoo--ddoowwnn and ----sshhooww--oopp--ddoowwnn into account) and + it's type (and a few other things). + + $$ddeeffaauulltt__iiffssttaattee + True if and only if cfgmaker would have accepted the interface + based on it's operational and administrative states (also taking + into account the presence of the flags ----nnoo--ddoowwnn and + ----sshhooww--oopp--ddoowwnn). + + $$ddeeffaauulltt__iiffttyyppee + True if and only if cfgmaker would have accepted the interface + based on it's type (and a few type specific details in addition). + + $$iiff__aaddmmiinn + True if and only if the interface is in an adminstrative up state. + + $$iiff__ooppeerr + True if and only if the interface is in an operational up state. + + A number of variables are also predefined to easily decide if an + interface belong to a certain cathegory or not. Below is all those + variables listed together with which if_type numbers each variable will + be true for. Note that some variables refer to other variables as + well. + + $$iiff__iiss__eetthheerrnneett + True for ethernet interfaces (nr 6, 7, 26, 62, 69 and 117). + + $$iiff__iiss__iissddnn + True for various ISDN interface types (nr 20, 21, 63, 75, 76 and + 77) + + $$iiff__iiss__ddiiaalluupp + True for dial-up interfaces such as PPP as well as ISDN. (nr 23, + 81, 82 and 108 in addition to the numbers of $$iiff__iiss__iissddnn). + + $$iiff__iiss__aattmm + True for miscellaneous ATM related interface types (nr 37, 49, 107, + 105, 106, 114 and 134). + + $$iiff__iiss__wwaann + True for WAN interfaces point to point, Frame Relay and High Speed + Serial ( 22,32,44,46) + + $$iiff__iiss__llaann + True for LAN interfaces (8, 9, 11, 15, 26, 55, 59, 60 and 115 in + addition to the numbers of $$iiff__iiss__eetthheerrnneett). + + $$iiff__iiss__ddssll + True for ADSL, RDSL, HDSL and SDSL (nr 94, 95, 96, 97) + + $$iiff__iiss__llooooppbbaacckk + True for software loopback interfaces (nr 24) + + $$iiff__iiss__cciissccoovvllaann + True for Cisco VLAN interfaces (interfaces with the word Vlan or + VLAN in their ifdescs) + + $$iiff__vvllaann__iidd + Returns the vlan id associated with a specific port on Cisco + Catalyst switches under both Catalyst OS and IOS, and 3Com + switches. If it is not a vlan interface, will return undef. + + $$iiff__cciissccoo__ttrruunnkk + Returns the trunking state of a specific port on Cisco Catalyst + switches under both Catalyst OS and IOS. Returns "1" if the + interface is a trunk, undef otherwise. + + $$iiff__MMTTUU + Returns the Maximum Transfer Unit associated with a specific port. + + Besides that, you can also use the variables defined for templates + below. Further, all the variables available in cfgmaker is at the + scripts disposal even if the use of such features is discouraged. More + "shortcuts" in the form of variables and functions will be made + available in the future instead. + + _E_x_a_m_p_l_e_s _o_n _F_i_l_t_e_r_s + + The following filter will not affect which interfaces get's included or + excluded, it will make cfgmaker behave as normally. + + '--if-filter=$default' + + The following filter will make cfgmaker exclude PPP (23) interfaces: + + '--if-filter=$default && $if_type!=23' + + The following filter will make cfgmaker behave as usual except that it + will consider the operational state of an interface irrelevant but + still reject all interfaces which are administratively down. + + '--if-filter=$if_admin && $default_iftype' + + DDeettaaiillss oonn TTeemmppllaatteess + The contents of the template files are evaluated as a Perl program. A + number or Perl variables are available for the program to read and + others are used to be written to. + + As quite a few of the predefined variables has values which are are + supposed to be used in HTML code some of them have an "HTML-escaped" + variant, e.g $html_syslocation is the HTML escaped variant of + $syslocation. The HTML escaping means that the chars "<", ">" and "&" + are replaced by "<", ">" and "&" and that newlines embedded + in the string are prepended with "<BR>" and appended with a space + character (if a newline is last in the string it is not touched). + + _W_r_i_t_a_b_l_e _T_e_m_p_l_a_t_e _V_a_r_i_a_b_l_e_s + + These are the variables available to store the configuration lines in. + Some of them are initialized prior to the evaluation of the template + but such content normally is comments for inclusion in the final + configuration file so those variables might be reset to the empty + string in the template code to eliminate the comments. The other way + around is also possible, the contents of these variables might be + extended with further information for various reasons such as debugging + etc. + + Once the template has been evaluated, the following happens: if the + template is a interface template and the actual interface for some + reason is rejected and thus needs to be commented out, all the lines in + the variable $$ttaarrggeett__lliinneess are turned into comments by adding a hash + mark ("#") at their beginning. Then all the variables $$hheeaadd__lliinneess, + $$pprroobblleemm__lliinneess , $$ttaarrggeett__lliinneess and $$sseeppaarraattoorr__lliinneess are concatenated + together to form the lines to add to the configuration file. + + $$ttaarrggeett__lliinneess + This variable is the placeholder for the configuration lines + created by the template. $$ttaarrggeett__lliinneess is predefined to be empty + when the template code is evaluated. + + $$hheeaadd__lliinneess + This variable is intended to be the placeholder for the comment + line appearing just before the target in the configuration file. + It is initialized with that comment line before the evaluation of + the template code and if the template doesn't modify $$hheeaadd__lliinneess + during evaluation, the comment will look like usual in the config + file. + + $$pprroobblleemm__lliinneess + This variable is intended to be the placholder for the comment + lines describing any problems which might have been encountered + when trying to add the target into the configuration. For host + templates it's normally not used and for those it's predefined as + the empty string. For interface templates $$pprroobblleemm__lliinneess is + predefined with the error description comments which cfgmaker + normally would use for rejected interfaces or as the empty string + for accepted interfaces. + + It is possible to test against $$pprroobblleemm__lliinneess to find out if an + interface will be included or rejected but this is not recommended. + Test against $$iiff__ookk instead. + + $$sseeppaarraattoorr__lliinneess + This variable is the placeholder for the string to use as the + separator between the code for individual targets. The contents of + this variable is put after each target (so the lines will appear + after the end of the last target in the config as well). + + _P_r_e_d_e_f_i_n_e_d _T_e_m_p_l_a_t_e _V_a_r_i_a_b_l_e_s + + All the variables below are available for interface templates to use. + For host templates, only those listed under "Host and System Variables" + are available. + + For interface templates the variables listed under "Predefined Filter + Variables" are also available. + + _H_o_s_t _a_n_d _S_y_s_t_e_m _V_a_r_i_a_b_l_e_s + + $$rroouutteerr__nnaammee + This is the fully qualified name for the router. It is affected by + the following items on the command line: the router name itself + and ----ddnnss--ddoommaaiinn. + + $$rroouutteerr__ccoonnnneecctt + This is the reference string for the router being polled. It is on + the form community@router possibly followed by some snmp options. + It is affected by the following items on the command line: the + router name itself, ----ccoommmmuunniittyy, ----ssnnmmpp--ooppttiioonnss and ----ddnnss--ddoommaaiinn. + (There's no HTML escaped variant available) + + $$ddiirreeccttoorryy__nnaammee + This variable should contain the directory name as cfgmaker + normally would use as the value for the "Directory[]" directive. + The value is determined by the ----ssuubbddiirrss command line option. If + ----ssuubbddiirrss isn't specified $$ddiirreeccttoorryy__nnaammee will be the empty string. + (There's no HTML escaped variant available) + + $$ssyyssccoonnttaacctt + This variable is the router's SNMP sysContact value. (HTML escaped + variant: $$hhttmmll__ssyyssccoonnttaacctt) + + $$ssyyssnnaammee + This variable is the router's SNMP sysName value. (No HTML escaped + variant available) + + $$ssyyssllooccaattiioonn + This variable is the router's SNMP sysLocation value. (HTML + escaped variant: $$hhttmmll__ssyyssllooccaattiioonn) + + $$ssyyssddeessccrr + This variable is the router's SNMP sysDescr value. It is normally + not used by cfgmaker but might be useful in a template. (HTML + escaped variant: $$hhttmmll__ssyyssddeessccrr) + + _I_n_t_e_r_f_a_c_e _T_a_r_g_e_t _R_e_l_a_t_e_d _V_a_r_i_a_b_l_e_s + + $$ttaarrggeett__nnaammee + This is what cfgmaker normally would use as the the name of the + target. The target name is what is found within the square + brackets, "[]", for target directives. (There's no HTML escaped + variant available) + + $$iiff__rreeff + This the reference string for the interface. It is expected to be + used in the "Target[xyz]" directive to distinguish what interface + to use. The value of this variable is affected by the ----iiffrreeff + command line option. It is normally used together with + $$rroouutteerr__ccoonnnneecctt. (There's no HTML escaped variant available) + + $$iiff__ookk + This variable is true if the interface is going to be included into + the configuration file, otherwise false. Don't test against other + variables such as $$pprroobblleemm__lliinneess to find out if an interface will + be rejected or not, use this $$iiff__ookk instead. + + $$ddeeffaauulltt__ttaarrggeett__lliinneess + This variable contains all the target lines which cfgmaker by + default outputs for this interface. It's useful if you want to + have the "standard target" but want to add some extra lines to it + by using a template. + + By default cfgmaker uses the following directives for each target it + generates: Target[], SetEnv[], MaxBytes[], Title[], PageTop[] and if + there is any directory specified also the Directory[] directive. + + To facilitate the creation of templates which generates target configs + which are similar to the default one, each of the above mentioned + directive lines have a corresponding variable containing the line as + cfgmaker would have output it by default. + + Note that none of these have a HTML escaped variant, text in them is + HTML escaped where needed. Also note that they do not have any newline + at the end. + + $$ddeeffaauulltt__ttaarrggeett__ddiirreeccttiivvee + This variable contains the default string for the Target[] + directive line. + + $$ddeeffaauulltt__sseetteennvv__ddiirreeccttiivvee + This variable contains the default string for the SetEnv[] + directive line. + + $$ddeeffaauulltt__ddiirreeccttoorryy__ddiirreeccttiivvee + This variable contains the default string for the Directory[] + directive line which means it is an empty string (with no newline) + if there's no directory. + + $$ddeeffaauulltt__mmaaxxbbyytteess__ddiirreeccttiivvee + This variable contains the default string for the MaxBytes[] + directive line. + + $$ddeeffaauulltt__ttiittllee__ddiirreeccttiivvee + This variable contains the default string for the Title[] directive + line. + + $$ddeeffaauulltt__ppaaggeettoopp__ddiirreeccttiivvee + This variable contains the default string for the PageTop[] + directive lines. + + _I_n_t_e_r_f_a_c_e _N_e_t_w_o_r_k _C_o_n_f_i_g_u_r_a_t_i_o_n _V_a_r_i_a_b_l_e_s + + $$iiff__iipp + This variable should contain the IP-address of the interface, if + any has been assigned to it. (There's no HTML escaped variant + available) + + $$iiffiinnddeexx + This variable is the SNMP ifIndex for the interface which per + definition always is an integer. (There's no HTML escaped variant + available) + + $$iiff__iinnddeexx + Equivalent with $$iiffiinnddeexx. + + $$iiff__eetthh + Contains the ethernet address of the interface, if any. (There's + no HTML escaped variant available) + + $$iiff__ssppeeeedd + This variable is the speed in bytes/second (with prefixes). + (There's no HTML escaped variant available) + + $$iiff__ssppeeeedd__ssttrr + This variable is a cooked speed description which is either in bits + or bytes depending on wether or not the bits option is active and + also with the proper prefix for the speed (k, M, G etc). (No HTML + escaped variant available) + + $$iiff__ttyyppee__ddeesscc + This variable is a textual description of the interface type. + (HTML escaped variant: $$hhttmmll__iiff__ttyyppee__ddeesscc) + + $$iiff__ttyyppee__nnuumm + This variable the integer value corresponding to the interface type + (for a listing for the value for the more common interface types, + see the section DETAILS ON FILTERS above). (No HTML escaped + variant available) + + $$iiff__ddnnss__nnaammee + This is the DNS name for the interface. (No HTML escaped variant + available) + + _I_n_t_e_r_f_a_c_e _N_a_m_e_, _D_e_s_c_r_i_p_t_i_o_n _a_n_d _A_l_i_a_s _V_a_r_i_a_b_l_e_s + + It might seem confusing with both _N_a_m_e, _D_e_s_c_r_i_p_t_i_o_n and _A_l_i_a_s in this + context and to some extent it is. _N_a_m_e and _D_e_s_c_r_i_p_t_i_o_n are usually + supported on most equipment but how they are used varies, both between + manufacturers as well as between different cathegories of equipment + from the same manufacturer. The _A_l_i_a_s is at least supported by Cisco + IOS, and that variable contains whatever is used in the IOS statement + called "description" for the interface (not to be confused with the + SNMP variables for _D_e_s_c_r_i_p_t_i_o_n). + + For better control from the command line consider $$iiff__ttiittllee__ddeesscc which + contents are controlled by the ----iiff--ddeessccrr command line option. + + $$iiff__ssnnmmpp__ddeessccrr + This variable should contain the "raw" description of the interface + as determined by the SNMP polling of the router. (HTML escaped + variant: $$hhttmmll__iiff__ssnnmmpp__ddeessccrr) + + $$iiff__ssnnmmpp__nnaammee + The "raw" name for the interface as provided by SNMP polling. + (HTML escaped variant: $$hhttmmll__iiff__ssnnmmpp__nnaammee) + + $$iiff__ssnnmmpp__aalliiaass + The "raw" ifAlias for the interface as provided by SNMP polling. + (HTML escaped variant: $$hhttmmll__iiff__ssnnmmpp__aalliiaass) + + $$iiff__cciissccoo__ddeessccrr + The "raw" CiscolocIfDescr for the interface as provided by SNMP + polling. (HTML escaped variant: $$hhttmmll__iiff__cciissccoo__ddeessccrr) + + $$iiff__ddeessccrriippttiioonn + This is the "cooked" description string for the interface, taking + into account the SNMP values found for the interface's RDescr, + ifAlias and CiscolocIfDescr. (HTML escaped variant: + $$hhttmmll__iiff__ddeessccrriippttiioonn) + + $$iiff__ttiittllee + The full string cfgmaker by default would have used for the Title[] + directive in the configuration as well as the content of the + topmost H1 tag in the PageTop[]. Is composed by the contents of + $$ddeesscc__pprreeffiixx, $$iiff__ttiittllee__ddeesscc and $$ssyyssnnaammee. + + As $$iiff__ttiittllee depends on $$iiff__ttiittllee__ddeesscc, it is possible to + indirectly control $$iiff__ttiittllee by using the command line option + ----iiff--ddeessccrr. + + (HTML escaped variant: $$hhttmmll__iiff__ttiittllee) + + $$iiff__ppoorrtt__nnaammee + If the host is a Cisco Catalyst LAN switch, this variable is the + name of that port. (No HTML escaped variant available) + + $$iiff__pppp__ppoorrtt__nnaammee + If the host is a Nortel Passport LAN switch, this variable is the + name of that port. (No HTML escaped variant available) + + $$ddeesscc__pprreeffiixx + This variable is a prefix of the description of what the target is + to use in the "Title[]" directive and in the H1 section of the + "PageTop[]". Default is "Traffic analysis for ". (HTML escaped + variant: $$hhttmmll__ddeesscc__pprreeffiixx) + + $$iiff__ttiittllee__ddeesscc + This is the description of the interface normally used by cfgmaker + as part of the variable $$iiff__ttiittllee. The latter is used as the full + string in the "Title[]" directove and the H1 section in the + PageTop[]. + + $$iiff__ttiittllee__ddeesscc is controlled by the command line option ----iiff--ddeessccrr + which indirectly controls the contents of $$iiff__ttiittllee + + (HTML escaped variant: $$hhttmmll__iiff__ttiittllee__ddeesscc) + + _H_e_l_p _F_u_n_c_t_i_o_n_s _f_o_r _T_e_m_p_l_a_t_e_s + + The following functions exists to facilitate the writing of host and + interface templates. + + hhttmmll__eessccaappee((_ss_tt_rr_ii_nn_gg)) + _hh_tt_mm_ll____ee_ss_cc_aa_pp_ee_((_)) takes a string as an argument and returns a new + string where the following substitutions has been done: the chars + "<", ">" and "&" are replaced by "<", ">" and "&" and + that newlines embedded in the string are prepended with "<BR>" and + appended with a space character (newlines at the end of the string + are not touched). + + ooiidd__ppiicckk(($$rroouutteerr__ccoonnnneecctt,,$$vv33oopptt,,""ooiidd11"",,""ooiidd22""......)) + This function will try to poll each of the oids specified until it + is successful or has run out of oids. It will return the name of + the first oid that worked or undef if it is not successful + + _E_x_a_m_p_l_e _T_e_m_p_l_a_t_e _F_i_l_e_s + + Template Example 1: Eliminating Rejected Targets From Appearing + + This template file generates exactly the same configuration code per + interface as cfgmaker does by default, with the exception that it + eliminates all lines (comments as well as config code) for an interface + if the interface happens to be rejected. + + if(not $problem_lines) + { + $target_lines .= <<ECHO; + + Target[$target_name]: $if_ref:$router_connect + SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr" + ECHO + + if ($directory_name) { + $target_lines .= "Directory[$target_name]: $directory_name\n"; + } + + $target_lines .= <<ECHO; + MaxBytes[$target_name]: $if_speed + Title[$target_name]: $html_desc_prefix$html_if_title_desc -- $sysname + PageTop[$target_name]: <h1>$html_desc_prefix$html_if_title_desc -- $sysname</h1> + <div id="sysdetails"> + <table> + <tr> + <td>System:</td> + <td>$sysname in $html_syslocation</td> + </tr> + <tr> + <td>Maintainer:</td> + <td>$html_syscontact</td> + </tr> + <tr> + <td>Description:</td> + <td>$html_if_description</td> + </tr> + <tr> + <td>ifType:</td> + <td>$html_if_type_desc ($if_type_num)</td> + </tr> + <tr> + <td>ifName:</td> + <td>$html_if_snmp_name</td> + </tr> + ECHO + + $target_lines .= <<ECHO if defined $if_port_name; + <tr> + <td>Port Name:</td> + <td>$if_port_name</td> + </tr> + ECHO + + $target_lines .= <<ECHO if defined $if_pp_port_name; + <tr> + <td>Port Name:</td> + <td>$if_pp_port_name</td> + </tr> + ECHO + + $target_lines .= <<ECHO; + <tr> + <td>Max Speed:</td> + <td>$if_speed_str</td> + </tr> + ECHO + + $target_lines .= <<ECHO if $if_ip; + <tr> + <td>Ip:</td> + <td>$if_ip ($if_dns_name)</td> + </tr> + ECHO + + $target_lines .= <<ECHO; + </table> + </div> + ECHO + } else { + $head_lines=""; + $problem_lines=""; + $target_lines=""; + $separator_lines=""; + } + + _T_e_m_p_l_a_t_e _E_x_a_m_p_l_e _2_: _S_i_m_p_l_i_e_r _V_e_r_s_i_o_n _o_f _E_x_a_m_p_l_e _1 + + Example 1 was partly intended to demonstrate how to customize the + generation of interface targets but also to provide a hint of how the + variables are used in the "default" template which one could consider + that cfgmaker normally uses. + + If you're only intrested in the easiest way of entirely eliminating + those reject interfaces, the template below would do the job as well by + using $$ddeeffaauulltt__ttaarrggeett__lliinneess. + + if($if_ok) { + $target_lines = $default_target_lines; + } else { + $head_lines=""; + $problem_lines=""; + $target_lines=""; + $separator_lines=""; + } + + _T_e_m_p_l_a_t_e _E_x_a_m_p_l_e _3_: _C_r_e_a_t_i_n_g _C_P_U _T_a_r_g_e_t_s _f_o_r _H_o_s_t_s + + Below is an example of a host template. + + $head_lines .= <<ECHO; + #--------------------------------------------------------------------- + ECHO + + my $target_name = $router_name . ".cpu"; + + $target_lines .= <<ECHO; + + YLegend[$target_name]: Percentage CPU load + ShortLegend[$target_name]: % + Legend1[$target_name]: CPU load in % + Legend2[$target_name]: + Legend3[$target_name]: Max Observed CPU load + Legend4[$target_name]: + LegendI[$target_name]: CPU Load: + LegendO[$target_name]: + WithPeak[$target_name]: ywm + MaxBytes[$target_name]: 100 + Options[$target_name]: growright, gauge, nopercent + Title[$target_name]: $router_name CPU load + Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect + PageTop[$target_name]: <h1>$router_name CPU load</h1> + <div> + <table> + <tr> + <td>System:</td> + <td>$router_name in $html_syslocation</td> + </tr> + <tr> + <td>Maintainer:</td> + <td>$html_syscontact</td> + </tr> + <tr> + <td>Description:</td> + <td>$html_sysdescr</td> + </tr> + <tr> + <td>Resource:</td> + <td>CPU.</td> + </tr> + </table> + </div> + ECHO + +EEXXAAMMPPLLEESS + The first example creates a config file for _r_o_u_t_e_r_._p_l_a_c_e_._x_y_z: the + router has the community name _p_u_b_l_i_c. Interfaces get identified by + their IP number. Two global options get added to the config file. The + config file gets redirected to _m_r_t_g_._c_o_n_f. The '\' signs at the end of + the line mean that this command should be written on a single line. + + cfgmaker --global "WorkDir: /home/tobi" \ + --global "Options[_]: growright,bits" \ + --ifref=ip \ + public@router.place.xyz > mrtg.cfg + + Note: if cfgmaker is not in your path, but you are in the directory + where cfgmaker is stored, you can start it with ./cfgmaker + + The next example creates a config file for four devices: + _r_o_u_t_e_r_1_._p_l_a_c_e_._x_y_z, _r_o_u_t_e_r_2_._p_l_a_c_e_._x_y_z, _s_w_i_t_c_h_1_._p_l_a_c_e_._x_y_z and + _s_w_i_t_c_h_2_._p_l_a_c_e_._x_y_z all with the community _p_u_b_l_i_c. + + The two routers will have ----iiffrreeff set to ddeessccrr whilst the two switches + will use ----iiffrreeff set to nnaammee. Further the routers will use ----iiffddeesscc + set to aalliiaass and _s_w_i_t_c_h_1_._p_l_a_c_e_._x_y_z will use ----iiffddeesscc set to ddeessccrr + whilst _s_w_i_t_c_h_2_._p_l_a_c_e_._x_y_z use nnaammee instead. + + Finally, there will be two Options lines inserted in the configuration: + One will be in the beginning, whilst the other will be inserted after + the lines related to the two routers but before those lines related to + the switches. + + cfgmaker --global "WorkDir: /home/tobi" \ + --global "Options[_]: growright,bits" \ + --ifref=descr \ + --ifdesc=alias \ + public@router1.place.xyz \ + public@router2.place.xyz \ + --global "Options[_]: growright" \ + --ifref=name \ + --ifdesc=descr \ + public@switch1.place.xyz \ + --ifdesc=name \ + public@switch2.place.xyz > mrtg.cfg + + The next example demonstrates how to use the ----ccoommmmuunniittyy, + ----ssnnmmpp--ooppttiioonnss and ----ddnnss--ddoommaaiinn to make the command line simpler. All + the equipment will use the community _h_i_d_d_e_n, except for the ppp-server + which use community _a_c_c_e_s_s. All equipment uses these SNMP options: 11ss + ttiimmeeoouutt, 11 rreettrryy and SSNNMMPP vveerrssiioonn 22 (bbaacckkooffff and ppoorrtt is unspecified + which means they use the default values). The exception again is the + ppp-server which uses SSNNMMPP vveerrssiioonn 11. Finally, all the equipment is + part of the domain _p_l_a_c_e_._x_y_z, except for the ppp-server which is part + of the domain _r_e_m_o_t_e_._p_l_a_c_e_._x_y_z. Note that the latter is achieved + simply by specifying the name of the ppp-server to be _p_p_p_-_s_e_r_v_e_r_._rr_ee_mm_oo_tt_ee + . + + cfgmaker --global "WorkDir: /home/tobi" \ + --global "Options[_]: growright,bits" \ + --dns-domain=place.xyz \ + --community=hidden \ + --snmp-options=::1:1::2 \ + router1 \ + router2 \ + router3 \ + router4 \ + router5 \ + switch1 \ + switch2 \ + switch3 \ + switch4 \ + switch5 \ + switch6 \ + switch7 \ + access@ppp-server.remote:::::1 > mrtg.cfg + +SSEEEE AALLSSOO + mrtg-reference + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> and Jakob Ilves + <jakob.ilves@oracle.com> + +LLIICCEENNSSEE + GNU General Public License + +CCOOPPYYRRIIGGHHTT + Cfgmaker is Copyright 2000 by Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 CFGMAKER(1) diff --git a/doc/indexmaker.1 b/doc/indexmaker.1 new file mode 100644 index 0000000..ff71d0c --- /dev/null +++ b/doc/indexmaker.1 @@ -0,0 +1,307 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "INDEXMAKER 1" +.TH INDEXMAKER 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +indexmaker \- Creates index files for mrtg web sites (mrtg\-2.17.7) +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +indexmaker [options] mrtg.cfg [other.cfg ...] +.SH "OPTIONS" +.IX Header "OPTIONS" +.Vb 1 +\& \-\-output=filename set output filename (default: stdout) +\& +\& \-\-filter title=~regexp select targets by matching regexp against titles +\& \-\-filter pagetop=~regexp select targets by matching regexp against pagetop +\& \-\-filter name=~regexp select targets by matchin regexp against name +\& +\& \-\-addhead=text insert this text between </TITLE> and </HEAD> +\& \-\-title=text set title of generated index file +\& \-\-subtitle=text add a subtitle to the generated index file +\& \-\-bodyopt=text set body tag options +\& \-\-headlevel=number use <Hnumber> at top of page (default: 1) +\& \-\-pagetop=text insert this text between <BODY> and <H1>...</H1> +\& \-\-pageend=text insert this text after the main body +\& \-\-pagetopend=text use this text for pagetop or pageend if undefined +\& \-\-nolegend do not add the Mrtg legend at the end of the page +\& +\& \-\-columns=number show graphs in a table with x columns (default: 2) +\& \-\-perhost show graphs of the same host on a row +\& \-\-compact try to make a vertically more compact page +\& \-\-optlog log the used command line in the page (default: log) +\& +\& \-\-sort=title sort graphs by title +\& \-\-sort=name sort graphs by their name +\& \-\-sort=descr sort graphs by their description +\& \-\-sort=original leave as is (default) +\& +\& \-\-enumerate add a sequence number to the title of each graph +\& +\& \-\-picfirst place pictures before text (default: text first) +\& \-\-width=number set width of graphs (default: not set) +\& \-\-height=number +\& \-\-sidebyside place text / pictures side by side (default: above/below) +\& \-\-bold use bold text (default: bold) +\& \-\-clicktext make the text link to the inner page (like the image) +\& +\& \-\-show=day pick which graph to show in the index (default) +\& \-\-show=week +\& \-\-show=month +\& \-\-show=year +\& \-\-show=none +\& +\& \-\-section=h1 h1 tag from pagetop as section heading (default) +\& \-\-section=title title as section headings for graphs +\& \-\-section=name graph name as section heading +\& \-\-section=descr graph description as section heading +\& \-\-section=ifname interface name (ifName) as section heading +\& \-\-section=portname port name entry in pagetop as section heading +\& \-\-sectionhost Try to prepend the host to the section heading if missing +\& +\& \-\-rrdviewer=path path to rrdviewer (default: /cgi\-bin/14all.cgi) +\& \-\-icondir=path path to icondir +\& \-\-prefix=path path from the location of the index.html to the graphs +\& \-\-headeradd=string add string to the html page header +\& \-\-autoprefix try to set prefix automatically +\& +\& \-\-<opt>\-file=file read string argument for option <opt> from file +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBIndexmaker\fR can create web pages which display the status of an +array of mrtg interface status pages. +.IP "\fB\-\-output\fR \fIfilename\fR" 4 +.IX Item "--output filename" +set output filename (default: stdout) +.IP "\fB\-\-filter\fR (\fBtitle\fR|\fBpagetop\fR|\fBname\fR)(\fB=~\fR|\fB!~\fR)\fIregexp\fR" 4 +.IX Item "--filter (title|pagetop|name)(=~|!~)regexp" +Several filters may get set. Each filter can match agains the contents +of a specific section of the mrtg config file. \fBName\fR refers to the +bit in square brackets (option[name]: bla). +.Sp +Depending on the match operator chosen (\fB=~\fR or \fB!~\fR) the match will be +positive or negative. +.Sp +Note that some shells consider \fB!\fR a special character. It may be +necessary to type \fB\e!~\fR instead. +.IP "\fB\-\-title\fR \fItext\fR" 4 +.IX Item "--title text" +Set title of generated index file (default: regexp) +.IP "\fB\-\-bodyopt\fR \fItext\fR" 4 +.IX Item "--bodyopt text" +The value of this argument gets appended to +the <\s-1BODY\s0> tag. This allows you to set document colors. +By default this option is set to +.Sp +.Vb 1 +\& bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000" +.Ve +.IP "\fB\-\-columns\fR \fInumber\fR" 4 +.IX Item "--columns number" +Display graphs in a table with \fInumber\fR columns (default: 2) +.IP "\fB\-\-sort\fR \fBtitle\fR|\fBname\fR|\fBdescr\fR|\fBoriginal\fR" 4 +.IX Item "--sort title|name|descr|original" +Sort the graphs in the page either by \fBtitle\fR, by \fBname\fR, by interface +\&\fBdescr\fRiption, or leave them as is. +.IP "\fB\-\-enumerate\fR" 4 +.IX Item "--enumerate" +Add a sequence number to the title of each graph +.IP "\fB\-\-width\fR \fInumber\fR" 4 +.IX Item "--width number" +Set width of graphs +.IP "\fB\-\-height\fR \fInumber\fR" 4 +.IX Item "--height number" +Set the height of the graphs +.IP "\fB\-\-show\fR \fBday\fR|\fBweek\fR|\fBmonth\fR|\fByear\fR|\fBnone\fR" 4 +.IX Item "--show day|week|month|year|none" +Select which graph to show in the index page. You can supress images +completely with \fB\-\-show=none\fR. +.IP "\fB\-\-section\fR \fBh1\fR|\fBtitle\fR|\fBname\fR|\fBdescription\fR|\fBportname\fR" 4 +.IX Item "--section h1|title|name|description|portname" +Select what to use as the title for each graph in the page. \fBh1\fR is +the H1 section from pagetop, \fBtitle\fR is the graph title, \fBname\fR is +the bit in square brackets (option[name]: bla), and \fBdescr\fR or +\&\fBdescription\fR is the text from the Description field of the PageTop +(the Cisco description text if it's available, otherwise just the +interface description). \fBportname\fR is the \f(CW\*(C`Port Name:\*(C'\fR from pagetop. +.IP "\fB\-\-sectionhost\fR" 4 +.IX Item "--sectionhost" +Extract the hostname from the target line (this does not work if the +target is a mathematial expression). Prepend the hostname (and a colon) +to the section if not already present. +.IP "\fB\-\-rrdviewer\fR \fIpath\fR" 4 +.IX Item "--rrdviewer path" +If you have set the \fBLogFormat: rrdtool\fR property in the mrtg.cfg +file, the index will take this into account. The only thing you must +tell it is the path to your grapher cgi. (default: /cgi\-bin/14all.cgi) +.IP "\fB\-\-prefix\fR \fIpath\fR" 4 +.IX Item "--prefix path" +By default we assume that the file generated by indexmaker is stored in +\&\fIWorkDir\fR. If you want to store it somewhere else, specify how to reach +\&\fIWorkDir\fR from the place where the Index is stored. Note that you have to +use '/' as path separator as this will be used in urls. Speaking of which, +you can even enter a whole url. +.IP "\fB\-\-autoprefix\fR \fIpath\fR" 4 +.IX Item "--autoprefix path" +Requires \-\-output. +Try to generate the prefix automatically by comparision of the path to the +output file set with \-\-output and the Htmldir set in the configuration files. +Particulary useful when multiple configuration files are specified, with +different Htmldir settings. +.IP "\fB\-\-optlog\fR" 4 +.IX Item "--optlog" +Default is logging in the generated page the command line, suppress with +\&\-\-nooptlog . Useful if the commandline contains a complex \-\-pagetop=string +which could confuse simple browsers. +.IP "\fB\-\-someoption\-file\fR \fIfilename\fR" 4 +.IX Item "--someoption-file filename" +For any someoption which takes a \fIstring\fR as parameter you can read the +string from a file by adding <\-file> to the option keyword. The whole +content of the file will be read and used as the \fIstring\fR. The file must +exist. +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> +.SH "LICENSE" +.IX Header "LICENSE" +\&\s-1GNU\s0 General Public License +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +2000\-2001 Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/indexmaker.pod b/doc/indexmaker.pod index 6c4a442..6c4a442 120000 --- a/src/doc/indexmaker.pod +++ b/doc/indexmaker.pod diff --git a/doc/indexmaker.txt b/doc/indexmaker.txt new file mode 100644 index 0000000..8fd91be --- /dev/null +++ b/doc/indexmaker.txt @@ -0,0 +1,173 @@ +INDEXMAKER(1) mrtg INDEXMAKER(1) + + + +NNAAMMEE + indexmaker - Creates index files for mrtg web sites (mrtg-2.17.7) + +SSYYNNOOPPSSIISS + indexmaker [options] mrtg.cfg [other.cfg ...] + +OOPPTTIIOONNSS + --output=filename set output filename (default: stdout) + + --filter title=~regexp select targets by matching regexp against titles + --filter pagetop=~regexp select targets by matching regexp against pagetop + --filter name=~regexp select targets by matchin regexp against name + + --addhead=text insert this text between </TITLE> and </HEAD> + --title=text set title of generated index file + --subtitle=text add a subtitle to the generated index file + --bodyopt=text set body tag options + --headlevel=number use <Hnumber> at top of page (default: 1) + --pagetop=text insert this text between <BODY> and <H1>...</H1> + --pageend=text insert this text after the main body + --pagetopend=text use this text for pagetop or pageend if undefined + --nolegend do not add the Mrtg legend at the end of the page + + --columns=number show graphs in a table with x columns (default: 2) + --perhost show graphs of the same host on a row + --compact try to make a vertically more compact page + --optlog log the used command line in the page (default: log) + + --sort=title sort graphs by title + --sort=name sort graphs by their name + --sort=descr sort graphs by their description + --sort=original leave as is (default) + + --enumerate add a sequence number to the title of each graph + + --picfirst place pictures before text (default: text first) + --width=number set width of graphs (default: not set) + --height=number + --sidebyside place text / pictures side by side (default: above/below) + --bold use bold text (default: bold) + --clicktext make the text link to the inner page (like the image) + + --show=day pick which graph to show in the index (default) + --show=week + --show=month + --show=year + --show=none + + --section=h1 h1 tag from pagetop as section heading (default) + --section=title title as section headings for graphs + --section=name graph name as section heading + --section=descr graph description as section heading + --section=ifname interface name (ifName) as section heading + --section=portname port name entry in pagetop as section heading + --sectionhost Try to prepend the host to the section heading if missing + + --rrdviewer=path path to rrdviewer (default: /cgi-bin/14all.cgi) + --icondir=path path to icondir + --prefix=path path from the location of the index.html to the graphs + --headeradd=string add string to the html page header + --autoprefix try to set prefix automatically + + --<opt>-file=file read string argument for option <opt> from file + +DDEESSCCRRIIPPTTIIOONN + IInnddeexxmmaakkeerr can create web pages which display the status of an array of + mrtg interface status pages. + + ----oouuttppuutt _f_i_l_e_n_a_m_e + set output filename (default: stdout) + + ----ffiilltteerr (ttiittllee|ppaaggeettoopp|nnaammee)(==~~|!!~~)_r_e_g_e_x_p + Several filters may get set. Each filter can match agains the + contents of a specific section of the mrtg config file. NNaammee refers + to the bit in square brackets (option[name]: bla). + + Depending on the match operator chosen (==~~ or !!~~) the match will be + positive or negative. + + Note that some shells consider !! a special character. It may be + necessary to type \\!!~~ instead. + + ----ttiittllee _t_e_x_t + Set title of generated index file (default: regexp) + + ----bbooddyyoopptt _t_e_x_t + The value of this argument gets appended to the <BODY> tag. This + allows you to set document colors. By default this option is set + to + + bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000" + + ----ccoolluummnnss _n_u_m_b_e_r + Display graphs in a table with _n_u_m_b_e_r columns (default: 2) + + ----ssoorrtt ttiittllee|nnaammee|ddeessccrr|oorriiggiinnaall + Sort the graphs in the page either by ttiittllee, by nnaammee, by interface + ddeessccrription, or leave them as is. + + ----eennuummeerraattee + Add a sequence number to the title of each graph + + ----wwiiddtthh _n_u_m_b_e_r + Set width of graphs + + ----hheeiigghhtt _n_u_m_b_e_r + Set the height of the graphs + + ----sshhooww ddaayy|wweeeekk|mmoonntthh|yyeeaarr|nnoonnee + Select which graph to show in the index page. You can supress + images completely with ----sshhooww==nnoonnee. + + ----sseeccttiioonn hh11|ttiittllee|nnaammee|ddeessccrriippttiioonn|ppoorrttnnaammee + Select what to use as the title for each graph in the page. hh11 is + the H1 section from pagetop, ttiittllee is the graph title, nnaammee is the + bit in square brackets (option[name]: bla), and ddeessccrr or + ddeessccrriippttiioonn is the text from the Description field of the PageTop + (the Cisco description text if it's available, otherwise just the + interface description). ppoorrttnnaammee is the "Port Name:" from pagetop. + + ----sseeccttiioonnhhoosstt + Extract the hostname from the target line (this does not work if + the target is a mathematial expression). Prepend the hostname (and + a colon) to the section if not already present. + + ----rrrrddvviieewweerr _p_a_t_h + If you have set the LLooggFFoorrmmaatt:: rrrrddttooooll property in the mrtg.cfg + file, the index will take this into account. The only thing you + must tell it is the path to your grapher cgi. (default: + /cgi-bin/14all.cgi) + + ----pprreeffiixx _p_a_t_h + By default we assume that the file generated by indexmaker is + stored in _W_o_r_k_D_i_r. If you want to store it somewhere else, + specify how to reach _W_o_r_k_D_i_r from the place where the Index is + stored. Note that you have to use '/' as path separator as this + will be used in urls. Speaking of which, you can even enter a whole + url. + + ----aauuttoopprreeffiixx _p_a_t_h + Requires --output. Try to generate the prefix automatically by + comparision of the path to the output file set with --output and + the Htmldir set in the configuration files. Particulary useful + when multiple configuration files are specified, with different + Htmldir settings. + + ----ooppttlloogg + Default is logging in the generated page the command line, suppress + with --nooptlog . Useful if the commandline contains a complex + --pagetop=string which could confuse simple browsers. + + ----ssoommeeooppttiioonn--ffiillee _f_i_l_e_n_a_m_e + For any someoption which takes a _s_t_r_i_n_g as parameter you can read + the string from a file by adding <-file> to the option keyword. The + whole content of the file will be read and used as the _s_t_r_i_n_g. The + file must exist. + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + +LLIICCEENNSSEE + GNU General Public License + +CCOOPPYYRRIIGGHHTT + 2000-2001 Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 INDEXMAKER(1) diff --git a/doc/mrtg-contrib.1 b/doc/mrtg-contrib.1 new file mode 100644 index 0000000..18955c9 --- /dev/null +++ b/doc/mrtg-contrib.1 @@ -0,0 +1,199 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-CONTRIB 1" +.TH MRTG-CONTRIB 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-contrib \- Contribution Guidelines for MRTG +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +If you have written an extension to mrtg or created a bug fix, please +consider contributing it to the project. As I get quite a number of +contributions every week, here are a few guidelines which explain how to +contribute so that I can use the contribution without too much additional +work. +.SS "Translations" +.IX Subsection "Translations" +\&\s-1MRTG\s0 messages have been translated to a number of languages but there are +still many which have not been covered yet. If you want to add yours, go +into the \fImrtg\-2.17.7/translate\fR directory and follow the instructions +given in the \fI\s-1README\s0\fR file. +.SS "Patches" +.IX Subsection "Patches" +When you have created your modification or extension to mrtg and want to +submit it to me, please crate a patch for the files which you have modified. +Do not send entire files unless they are new. +.PP +To create a patch, get hold of a copy of \s-1GNU\s0 diff (Many Unix systems will +have this installed already. In the \s-1NT\s0 world you might want to get +http://sources.redhat.com/cygwin/ to get all the nice \s-1GNU\s0 tools available.) +and type +.PP +.Vb 1 +\& diff \-\-unified \-\-ignore\-space\-change old\-file new\-file > simple.patch +.Ve +.PP +or if you have modified several files do +.PP +.Vb 1 +\& diff \-\-recursive \-\-unified \-\-ignore\-space\-change old\-dir/ new\-dir/ >long.patch +.Ve +.SS "Documentation" +.IX Subsection "Documentation" +All documentation of mrtg is done with the perl \fB\s-1POD\s0\fR system. If you want to +learn about it, type +.PP +.Vb 1 +\& perldoc perlpod +.Ve +.PP +and read the instructions. If you have bugfixes or additions to the existing +documents, make sure you modify the \fB\s-1POD\s0\fR files and not the html or txt +versions. +.PP +I take documentation very seriously. Whenever you create a new feature for +mrtg which you want to get included in the official release, your patch must +also contain modifications for the relevant \fBpod\fR file in the \fIdoc\fR tree or +for the documentation sections of \fIcfgmaker\fR and \fIindexmaker\fR. +.SH "ADDRESS" +.IX Header "ADDRESS" +Send your patches, translations and contributions to Tobias Oetiker +<tobi@oetiker.ch> +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-contrib.pod b/doc/mrtg-contrib.pod index f4afa6a..f4afa6a 100644 --- a/src/doc/mrtg-contrib.pod +++ b/doc/mrtg-contrib.pod diff --git a/doc/mrtg-contrib.txt b/doc/mrtg-contrib.txt new file mode 100644 index 0000000..7bce5de --- /dev/null +++ b/doc/mrtg-contrib.txt @@ -0,0 +1,61 @@ +MRTG-CONTRIB(1) mrtg MRTG-CONTRIB(1) + + + +NNAAMMEE + mrtg-contrib - Contribution Guidelines for MRTG + +DDEESSCCRRIIPPTTIIOONN + If you have written an extension to mrtg or created a bug fix, please + consider contributing it to the project. As I get quite a number of + contributions every week, here are a few guidelines which explain how + to contribute so that I can use the contribution without too much + additional work. + + TTrraannssllaattiioonnss + MRTG messages have been translated to a number of languages but there + are still many which have not been covered yet. If you want to add + yours, go into the _m_r_t_g_-_2_._1_7_._7_/_t_r_a_n_s_l_a_t_e directory and follow the + instructions given in the _R_E_A_D_M_E file. + + PPaattcchheess + When you have created your modification or extension to mrtg and want + to submit it to me, please crate a patch for the files which you have + modified. Do not send entire files unless they are new. + + To create a patch, get hold of a copy of GNU diff (Many Unix systems + will have this installed already. In the NT world you might want to get + http://sources.redhat.com/cygwin/ to get all the nice GNU tools + available.) and type + + diff --unified --ignore-space-change old-file new-file > simple.patch + + or if you have modified several files do + + diff --recursive --unified --ignore-space-change old-dir/ new-dir/ >long.patch + + DDooccuummeennttaattiioonn + All documentation of mrtg is done with the perl PPOODD system. If you want + to learn about it, type + + perldoc perlpod + + and read the instructions. If you have bugfixes or additions to the + existing documents, make sure you modify the PPOODD files and not the html + or txt versions. + + I take documentation very seriously. Whenever you create a new feature + for mrtg which you want to get included in the official release, your + patch must also contain modifications for the relevant ppoodd file in the + _d_o_c tree or for the documentation sections of _c_f_g_m_a_k_e_r and _i_n_d_e_x_m_a_k_e_r. + +AADDDDRREESSSS + Send your patches, translations and contributions to Tobias Oetiker + <tobi@oetiker.ch> + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-CONTRIB(1) diff --git a/doc/mrtg-faq.1 b/doc/mrtg-faq.1 new file mode 100644 index 0000000..2c783da --- /dev/null +++ b/doc/mrtg-faq.1 @@ -0,0 +1,232 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-FAQ 1" +.TH MRTG-FAQ 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-faq \- How to get help if you have problems with MRTG +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\s-1MRTG\s0 seems to raise a lot of questions. There are a number of resources +apart from the documentation where you can find help for mrtg. +.SH "FAQ" +.IX Header "FAQ" +In the following sections you'll find some additonal Frequently Asked Questions, with Answers. +.ie n .SS "Why is there no ""@#$%"" (my native language) version of \s-1MRTG\s0?" +.el .SS "Why is there no ``@#$%'' (my native language) version of \s-1MRTG\s0?" +.IX Subsection "Why is there no @#$% (my native language) version of MRTG?" +Nobody has contributed a \fI@#$%.pmd\fR file yet. Go into the +\&\fImrtg\-2.17.7/translate\fR directory and create your own translation file. +When you are happy with it send it to me for inclusion with the next mrtg +release. +.SS "I need a script to make mrtg work with my xyz device." +.IX Subsection "I need a script to make mrtg work with my xyz device." +Probably this has already been done. Check the stuff in the +\&\fImrtg\-2.17.7/contrib\fR directory. There is a file called \fI00INDEX\fR in +that directory which tells what you can find in there. +.SS "How does this \s-1SNMP\s0 thing work" +.IX Subsection "How does this SNMP thing work" +There are many resources on the net that explain \s-1SNMP.\s0 +Take a look at this article from the Linux Journal by David Guerrero +.PP +.Vb 1 +\& http://www.david\-guerrero.com/papers/snmp/ +.Ve +.PP +And at this rather long document from \s-1CISCO.\s0 +.PP +.Vb 1 +\& http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/snmp.htm +.Ve +.SS "The images created by \s-1MRTG\s0 look very strange." +.IX Subsection "The images created by MRTG look very strange." +Remove the *\-{week,day,month,year}.png files and start \s-1MRTG\s0 +again. Using \s-1MRTG\s0 for the first time, you might have to do this +twice. This will also help when you introduce new routers into the cfg +file. +.SS "What is my Community Name?" +.IX Subsection "What is my Community Name?" +Ask the person in charge of your Router or try 'public', as this is the +default Community Name. +.SS "My graphs show a flat line during an outage. Why ?" +.IX Subsection "My graphs show a flat line during an outage. Why ?" +Well, the short answer is that when an \s-1SNMP\s0 query goes out +and a response doesn't come back, \s-1MRTG\s0 has to assume something to put +in the graph, and by default it assumes that the last answer we got +back is probably closer to the truth than zero. This assumption is +not perfect (as you have noticed). It's a trade-off that happens to +fail during a total outage. +.PP +If this is an unacceptable trade-off, use the \fBunknaszero\fR option. +.PP +You may want to know what you're trading off, so in the spirit of +trade-offs, here's the long answer: +.PP +The problem is that \s-1MRTG\s0 doesn't know *why* the data didn't come back, all +it knows is that it didn't come back. It has to do something, and it +assumes it's a stray lost packet rather than an outage. +.PP +Why don't we always assume the circuit is down and use zero, which will +(we think) be more nearly right? Well, it turns out that you may be +taking advantage of \s-1MRTG\s0's \*(L"assume last\*(R" behaviour without being aware of +it. +.PP +\&\s-1MRTG\s0 uses \s-1SNMP \s0(Simple Network Management Protocol) to collect data, and +\&\s-1SNMP\s0 uses \s-1UDP \s0(User Datagram Protocol) to ship packets around. \s-1UDP\s0 is +connectionless (not guaranteed) unlike \s-1TCP\s0 where packets are tracked and +acknowledged and, if needed, retransmitted. \s-1UDP\s0 just throws +packets at the network and hopes they arrive. Sometimes they don't. +.PP +One likely cause of lost \s-1SNMP\s0 data is congestion; another is busy routers. +Other possibilities include transient telecommunications problems, router +buffer overflows (which may or may not be congestion-related), \*(L"dirty +lines\*(R" (links with high error rates), and acts of God. These things +happen all the time; we just don't notice because many interactive +services are TCP-based and the lost packets get retransmitted +automatically. +.PP +In the above cases where some \s-1SNMP\s0 packets are lost but traffic is +flowing, assuming zero is the wrong thing to do \- you end up with a graph +that looks like it's missing teeth whenever the link fills up. \s-1MRTG\s0 +interpolates the lost data to produce a smoother graph which is more +accurate in cases of intermittent packet loss. But with V2.8.4 and above, +you can use the \*(L"unknaszero\*(R" option to produce whichever graph is best +under the conditions typical for your network. +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-faq.pod b/doc/mrtg-faq.pod index b28f6e1..b28f6e1 100644 --- a/src/doc/mrtg-faq.pod +++ b/doc/mrtg-faq.pod diff --git a/doc/mrtg-faq.txt b/doc/mrtg-faq.txt new file mode 100644 index 0000000..d12325b --- /dev/null +++ b/doc/mrtg-faq.txt @@ -0,0 +1,95 @@ +MRTG-FAQ(1) mrtg MRTG-FAQ(1) + + + +NNAAMMEE + mrtg-faq - How to get help if you have problems with MRTG + +SSYYNNOOPPSSIISS + MRTG seems to raise a lot of questions. There are a number of resources + apart from the documentation where you can find help for mrtg. + +FFAAQQ + In the following sections you'll find some additonal Frequently Asked + Questions, with Answers. + + WWhhyy iiss tthheerree nnoo ""@@##$$%%"" ((mmyy nnaattiivvee llaanngguuaaggee)) vveerrssiioonn ooff MMRRTTGG?? + Nobody has contributed a _@_#_$_%_._p_m_d file yet. Go into the + _m_r_t_g_-_2_._1_7_._7_/_t_r_a_n_s_l_a_t_e directory and create your own translation file. + When you are happy with it send it to me for inclusion with the next + mrtg release. + + II nneeeedd aa ssccrriipptt ttoo mmaakkee mmrrttgg wwoorrkk wwiitthh mmyy xxyyzz ddeevviiccee.. + Probably this has already been done. Check the stuff in the + _m_r_t_g_-_2_._1_7_._7_/_c_o_n_t_r_i_b directory. There is a file called _0_0_I_N_D_E_X in that + directory which tells what you can find in there. + + HHooww ddooeess tthhiiss SSNNMMPP tthhiinngg wwoorrkk + There are many resources on the net that explain SNMP. Take a look at + this article from the Linux Journal by David Guerrero + + http://www.david-guerrero.com/papers/snmp/ + + And at this rather long document from CISCO. + + http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/snmp.htm + + TThhee iimmaaggeess ccrreeaatteedd bbyy MMRRTTGG llooookk vveerryy ssttrraannggee.. + Remove the *-{week,day,month,year}.png files and start MRTG again. + Using MRTG for the first time, you might have to do this twice. This + will also help when you introduce new routers into the cfg file. + + WWhhaatt iiss mmyy CCoommmmuunniittyy NNaammee?? + Ask the person in charge of your Router or try 'public', as this is the + default Community Name. + + MMyy ggrraapphhss sshhooww aa ffllaatt lliinnee dduurriinngg aann oouuttaaggee.. WWhhyy ?? + Well, the short answer is that when an SNMP query goes out and a + response doesn't come back, MRTG has to assume something to put in the + graph, and by default it assumes that the last answer we got back is + probably closer to the truth than zero. This assumption is not perfect + (as you have noticed). It's a trade-off that happens to fail during a + total outage. + + If this is an unacceptable trade-off, use the uunnkknnaasszzeerroo option. + + You may want to know what you're trading off, so in the spirit of + trade-offs, here's the long answer: + + The problem is that MRTG doesn't know *why* the data didn't come back, + all it knows is that it didn't come back. It has to do something, and + it assumes it's a stray lost packet rather than an outage. + + Why don't we always assume the circuit is down and use zero, which will + (we think) be more nearly right? Well, it turns out that you may be + taking advantage of MRTG's "assume last" behaviour without being aware + of it. + + MRTG uses SNMP (Simple Network Management Protocol) to collect data, + and SNMP uses UDP (User Datagram Protocol) to ship packets around. UDP + is connectionless (not guaranteed) unlike TCP where packets are tracked + and acknowledged and, if needed, retransmitted. UDP just throws + packets at the network and hopes they arrive. Sometimes they don't. + + One likely cause of lost SNMP data is congestion; another is busy + routers. Other possibilities include transient telecommunications + problems, router buffer overflows (which may or may not be congestion- + related), "dirty lines" (links with high error rates), and acts of God. + These things happen all the time; we just don't notice because many + interactive services are TCP-based and the lost packets get + retransmitted automatically. + + In the above cases where some SNMP packets are lost but traffic is + flowing, assuming zero is the wrong thing to do - you end up with a + graph that looks like it's missing teeth whenever the link fills up. + MRTG interpolates the lost data to produce a smoother graph which is + more accurate in cases of intermittent packet loss. But with V2.8.4 + and above, you can use the "unknaszero" option to produce whichever + graph is best under the conditions typical for your network. + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-FAQ(1) diff --git a/doc/mrtg-forum.1 b/doc/mrtg-forum.1 new file mode 100644 index 0000000..77b2980 --- /dev/null +++ b/doc/mrtg-forum.1 @@ -0,0 +1,267 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-FORUM 1" +.TH MRTG-FORUM 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-forum \- Interactive Help for MRTG users +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +There is a lot of written documentation for mrtg, but nevertheless you may +have a problem where you can't find the solution. +In this case some Human Help may be necessary. With \s-1MRTG\s0 there are several +ways to get Humans to help you. +.SH "MAILING-LIST" +.IX Header "MAILING-LIST" +There are three mailing lists for \s-1MRTG\s0 available. +.IP "mrtg" 4 +.IX Item "mrtg" +for discussion among mrtg users. +.IP "mrtg-announce" 4 +.IX Item "mrtg-announce" +for announcements regarding new versions of mrtg related software. +.IP "mrtg-developers" 4 +.IX Item "mrtg-developers" +for discussion among people who write software in connection with mrtg or +who hack mrtg itself. +.SS "\s-1THE RULES\s0" +.IX Subsection "THE RULES" +Please note that the memebers of the mrtg mailinglist value politeness +highly. This means behave in a way you would like others to behave +towards you. +.IP "\(bu" 4 +No shouting. (\s-1NO CAPS\s0) +.IP "\(bu" 4 +No rude language +.IP "\(bu" 4 +No demands. everybody is on the list out of their own free will. If +you do not get an answer to your question, chances are high that you +did not give sufficent details about the nature of your problem or +that the answer to your problem is in the documentation. +.IP "\(bu" 4 +If you do not follow the rules you will be unsubscribed from the list +with no further questions asked. +.IP "\(bu" 4 +Decisions about your unsubscription from the list will be taken by +.Sp +.Vb 2 +\& Alex van den Bogaerdt <alex at ergens.op.het.net> +\& Paul C. Williamson <pwilliamson at MANDTBANK.COM> +.Ve +.Sp +If you feel that you have been treated unfairly, you may send mail to +me and explain the situation. +.Sp +.Vb 1 +\& Tobi Oetiker <tobi@oetiker.ch> +.Ve +.SS "\s-1SUBSCRIBING\s0" +.IX Subsection "SUBSCRIBING" +These lists are managed by a mailing-list management program (listar). +It allows you to subscribe to these lists by sending a message with the +subject: \fBsubscribe\fR to the following address: +.PP +.Vb 1 +\& listname\-request@lists.oetiker.ch +.Ve +.PP +You will then get a message asking you to confirm your subscription. +.PP +For posting to the lists use the following address +.PP +.Vb 1 +\& listname@lists.oetiker.ch +.Ve +.PP +Note that only people who are subscribed to the list can post. +.PP +Further information about the usage of the mailing lists is +available by sending a message with the subject line \fBhelp\fR to +either one of the request addresses. +.PP +There is also a webinterface to the lists on +.PP +.Vb 1 +\& http://lists.oetiker.ch +.Ve +.PP +List archives are on +.PP +.Vb 1 +\& http://www.mail\-archive.com/index.php?hunt=mrtg +.Ve +.PP +and +.PP +.Vb 1 +\& http://gmane.org/find.php?list=mrtg +.Ve +.SH "NEWSGROUP" +.IX Header "NEWSGROUP" +For discussion of \s-1MRTG\s0 or related topics on the Usenet, please send your +posts to: +.PP +.Vb 1 +\& news:comp.dcom.net\-management +.Ve +.PP +Many \s-1MRTG\s0 users are in this forum and will help you. You can also find +an archive of past activity from this Newsgroup on: +.PP +.Vb 1 +\& http://groups.google.com/group/comp.dcom.net\-management +.Ve +.SH "IRC Channel" +.IX Header "IRC Channel" +For discussion of \s-1MRTG\s0 and related topics on \s-1IRC,\s0 the `#mrtg' channel on +EFNet has been created. +.PP +More information can be found at +.PP +.Vb 1 +\& http://mrtg.easymac.org +.Ve +.SH "MRTG Japan" +.IX Header "MRTG Japan" +There is a special Mailinglist for \s-1MRTG\s0 Users in Japan. It carries +translations of the traffic from MRTG-ANNOUNCE as well as updates on the +Japanese Translation of the \s-1MRTG\s0 documentation. Go to +http://www.mrtg.jp/ for further Information. +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> and many contributors diff --git a/src/doc/mrtg-forum.pod b/doc/mrtg-forum.pod index 954c9b9..954c9b9 100644 --- a/src/doc/mrtg-forum.pod +++ b/doc/mrtg-forum.pod diff --git a/doc/mrtg-forum.txt b/doc/mrtg-forum.txt new file mode 100644 index 0000000..f206053 --- /dev/null +++ b/doc/mrtg-forum.txt @@ -0,0 +1,115 @@ +MRTG-FORUM(1) mrtg MRTG-FORUM(1) + + + +NNAAMMEE + mrtg-forum - Interactive Help for MRTG users + +SSYYNNOOPPSSIISS + There is a lot of written documentation for mrtg, but nevertheless you + may have a problem where you can't find the solution. In this case + some Human Help may be necessary. With MRTG there are several ways to + get Humans to help you. + +MMAAIILLIINNGG--LLIISSTT + There are three mailing lists for MRTG available. + + mrtg + for discussion among mrtg users. + + mrtg-announce + for announcements regarding new versions of mrtg related software. + + mrtg-developers + for discussion among people who write software in connection with + mrtg or who hack mrtg itself. + + TTHHEE RRUULLEESS + Please note that the memebers of the mrtg mailinglist value politeness + highly. This means behave in a way you would like others to behave + towards you. + + +o No shouting. (NO CAPS) + + +o No rude language + + +o No demands. everybody is on the list out of their own free will. If + you do not get an answer to your question, chances are high that + you did not give sufficent details about the nature of your problem + or that the answer to your problem is in the documentation. + + +o If you do not follow the rules you will be unsubscribed from the + list with no further questions asked. + + +o Decisions about your unsubscription from the list will be taken by + + Alex van den Bogaerdt <alex at ergens.op.het.net> + Paul C. Williamson <pwilliamson at MANDTBANK.COM> + + If you feel that you have been treated unfairly, you may send mail + to me and explain the situation. + + Tobi Oetiker <tobi@oetiker.ch> + + SSUUBBSSCCRRIIBBIINNGG + These lists are managed by a mailing-list management program (listar). + It allows you to subscribe to these lists by sending a message with the + subject: ssuubbssccrriibbee to the following address: + + listname-request@lists.oetiker.ch + + You will then get a message asking you to confirm your subscription. + + For posting to the lists use the following address + + listname@lists.oetiker.ch + + Note that only people who are subscribed to the list can post. + + Further information about the usage of the mailing lists is available + by sending a message with the subject line hheellpp to either one of the + request addresses. + + There is also a webinterface to the lists on + + http://lists.oetiker.ch + + List archives are on + + http://www.mail-archive.com/index.php?hunt=mrtg + + and + + http://gmane.org/find.php?list=mrtg + +NNEEWWSSGGRROOUUPP + For discussion of MRTG or related topics on the Usenet, please send + your posts to: + + news:comp.dcom.net-management + + Many MRTG users are in this forum and will help you. You can also find + an archive of past activity from this Newsgroup on: + + http://groups.google.com/group/comp.dcom.net-management + +IIRRCC CChhaannnneell + For discussion of MRTG and related topics on IRC, the `#mrtg' channel + on EFNet has been created. + + More information can be found at + + http://mrtg.easymac.org + +MMRRTTGG JJaappaann + There is a special Mailinglist for MRTG Users in Japan. It carries + translations of the traffic from MRTG-ANNOUNCE as well as updates on + the Japanese Translation of the MRTG documentation. Go to + http://www.mrtg.jp/ for further Information. + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> and many contributors + + + +2.17.7 2018-07-13 MRTG-FORUM(1) diff --git a/doc/mrtg-ipv6.1 b/doc/mrtg-ipv6.1 new file mode 100644 index 0000000..9ebc69c --- /dev/null +++ b/doc/mrtg-ipv6.1 @@ -0,0 +1,236 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-IPV6 1" +.TH MRTG-IPV6 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-ipv6 \- IPv6 support in MRTG +.SH "OVERVIEW" +.IX Header "OVERVIEW" +\&\s-1MRTG\s0 and cfgmaker support \s-1SNMP\s0 over IPv6. IPv6 targets can be specified by +hostname or IPv6 address, and if the required libraries are present (see +below), queries will use IPv6. +.SH "USAGE" +.IX Header "USAGE" +.SS "Enabling IPv6" +.IX Subsection "Enabling IPv6" +IPv6 is currently disabled by default and must be explicitly enabled. In +\&\s-1MRTG\s0 this is done by turning on the \fBEnableIPv6\fR global option in the +configuration file. In cfgmaker, it is enabled with the \fB\-\-enable\-ipv6\fR +command-line option. +.PP +If IPv6 is disabled, \s-1MRTG\s0 and cfgmaker should behave in exactly the same way +as previous versions. So the addition of IPv6 support should have no effect +on existing \s-1MRTG\s0 setups unless IPv6 is enabled. +.PP +IPv6 support requires the Socket6 and \s-1INET6\s0 libraries (see below). If \s-1MRTG\s0 +can't find them, IPv6 is disabled. +.SS "Specifying IPv6 targets" +.IX Subsection "Specifying IPv6 targets" +IPv6 targets may be specified by name or IPv6 address. Numeric IPv6 addresses +may be used with both cfgmaker and \s-1MRTG,\s0 but they must be enclosed in square +brackets. +.PP +For example, a target could be specified as: +.PP +.Vb 1 +\& public@[2001:760:4::]:161 +.Ve +.PP +Hostnames work as expected: first an IPv6 name lookup is tried, then an IPv4 +lookup. +.SS "Targets that do not support \s-1SNMP\s0 over IPv6" +.IX Subsection "Targets that do not support SNMP over IPv6" +Many targets (this currently includes all Cisco routers) do not yet support +\&\s-1SNMP\s0 over IPv6 and must be monitored over IPv4. This can cause problems if +you specify a target through its \s-1DNS\s0 name and the name maps to both the IPv6 +address and the IPv4 address of the target: \s-1MRTG\s0 will only try IPv6, and will +fail. +.PP +To query these targets, use the \fBIPv4Only\fR per-target option, which tells +\&\s-1MRTG\s0 not to use \s-1SNMP\s0 over IPv6 for the target. +.PP +\&\s-1MRTG\s0 does not fall back to IPv4 for performance and correctness reasons. If +there are many routers to query, a timeout for every router would make \s-1MRTG\s0 +take too long to query them all. And if, for some reason, IPv6 connectivity to +the target is lost, \s-1MRTG\s0's error messages can help figure out what is wrong. +.PP +cfgmaker does fall back from IPv6 to IPv4. If IPv6 is enabled and cfgmaker is +given a hostname that resolves to both an IPv6 and an IPv4 address, it first +tries to query the target over IPv6. If it receives no answer, it tries again +using IPv4. If the target answers, cfgmaker sets the IPv4Only option in the +generated config file. +.SH "IPv6 LIBRARIES" +.IX Header "IPv6 LIBRARIES" +.SS "Libraries required" +.IX Subsection "Libraries required" +IPv6 support requires the \fBSocket6\fR and \fB\s-1INET6\s0\fR Perl modules. Both can be +downloaded from \s-1CPAN:\s0 +.PP +http://search.cpan.org/author/UMEMOTO/Socket6/ +.PP +http://search.cpan.org/author/MONDEJAR/INET6/ +.PP +If you use Debian, you will need the packages \fBlibsocket6\-perl\fR and +\&\fBlibio\-socket\-inet6\-perl\fR, which are (or should soon be) in unstable. +.PP +So far, IPv6 support has been tested on Linux only, and only with Socket6 +version 0.12. Also note that IPv6 won't work at all if you don't have +\&\s-1INET6\s0.pm version 2.00 or newer. +.SS "Installing the libraries" +.IX Subsection "Installing the libraries" +Building and installing Socket6 and \s-1INET6\s0 is very simple. For each module, +just unpack the archive and then do: +.PP +.Vb 2 +\& perl Makefile.PL +\& make +.Ve +.PP +and then: +.PP +.Vb 2 +\& su +\& make install +.Ve +.PP +If you have installed the libraries successfully, cfgmaker and mrtg should +automatically detect them and allow IPv6 support to be enabled. +.SH "AUTHOR" +.IX Header "AUTHOR" +Lorenzo Colitti <lorenzo location colitti.com> diff --git a/src/doc/mrtg-ipv6.pod b/doc/mrtg-ipv6.pod index 8c5eb3c..8c5eb3c 100644 --- a/src/doc/mrtg-ipv6.pod +++ b/doc/mrtg-ipv6.pod diff --git a/doc/mrtg-ipv6.txt b/doc/mrtg-ipv6.txt new file mode 100644 index 0000000..34ec5c1 --- /dev/null +++ b/doc/mrtg-ipv6.txt @@ -0,0 +1,97 @@ +MRTG-IPV6(1) mrtg MRTG-IPV6(1) + + + +NNAAMMEE + mrtg-ipv6 - IPv6 support in MRTG + +OOVVEERRVVIIEEWW + MRTG and cfgmaker support SNMP over IPv6. IPv6 targets can be specified + by hostname or IPv6 address, and if the required libraries are present + (see below), queries will use IPv6. + +UUSSAAGGEE + EEnnaabblliinngg IIPPvv66 + IPv6 is currently disabled by default and must be explicitly enabled. + In MRTG this is done by turning on the EEnnaabblleeIIPPvv66 global option in the + configuration file. In cfgmaker, it is enabled with the ----eennaabbllee--iippvv66 + command-line option. + + If IPv6 is disabled, MRTG and cfgmaker should behave in exactly the + same way as previous versions. So the addition of IPv6 support should + have no effect on existing MRTG setups unless IPv6 is enabled. + + IPv6 support requires the Socket6 and INET6 libraries (see below). If + MRTG can't find them, IPv6 is disabled. + + SSppeecciiffyyiinngg IIPPvv66 ttaarrggeettss + IPv6 targets may be specified by name or IPv6 address. Numeric IPv6 + addresses may be used with both cfgmaker and MRTG, but they must be + enclosed in square brackets. + + For example, a target could be specified as: + + public@[2001:760:4::]:161 + + Hostnames work as expected: first an IPv6 name lookup is tried, then an + IPv4 lookup. + + TTaarrggeettss tthhaatt ddoo nnoott ssuuppppoorrtt SSNNMMPP oovveerr IIPPvv66 + Many targets (this currently includes all Cisco routers) do not yet + support SNMP over IPv6 and must be monitored over IPv4. This can cause + problems if you specify a target through its DNS name and the name maps + to both the IPv6 address and the IPv4 address of the target: MRTG will + only try IPv6, and will fail. + + To query these targets, use the IIPPvv44OOnnllyy per-target option, which tells + MRTG not to use SNMP over IPv6 for the target. + + MRTG does not fall back to IPv4 for performance and correctness + reasons. If there are many routers to query, a timeout for every router + would make MRTG take too long to query them all. And if, for some + reason, IPv6 connectivity to the target is lost, MRTG's error messages + can help figure out what is wrong. + + cfgmaker does fall back from IPv6 to IPv4. If IPv6 is enabled and + cfgmaker is given a hostname that resolves to both an IPv6 and an IPv4 + address, it first tries to query the target over IPv6. If it receives + no answer, it tries again using IPv4. If the target answers, cfgmaker + sets the IPv4Only option in the generated config file. + +IIPPvv66 LLIIBBRRAARRIIEESS + LLiibbrraarriieess rreeqquuiirreedd + IPv6 support requires the SSoocckkeett66 and IINNEETT66 Perl modules. Both can be + downloaded from CPAN: + + http://search.cpan.org/author/UMEMOTO/Socket6/ + + http://search.cpan.org/author/MONDEJAR/INET6/ + + If you use Debian, you will need the packages lliibbssoocckkeett66--ppeerrll and + lliibbiioo--ssoocckkeett--iinneett66--ppeerrll, which are (or should soon be) in unstable. + + So far, IPv6 support has been tested on Linux only, and only with + Socket6 version 0.12. Also note that IPv6 won't work at all if you + don't have INET6.pm version 2.00 or newer. + + IInnssttaalllliinngg tthhee lliibbrraarriieess + Building and installing Socket6 and INET6 is very simple. For each + module, just unpack the archive and then do: + + perl Makefile.PL + make + + and then: + + su + make install + + If you have installed the libraries successfully, cfgmaker and mrtg + should automatically detect them and allow IPv6 support to be enabled. + +AAUUTTHHOORR + Lorenzo Colitti <lorenzo location colitti.com> + + + +2.17.7 2018-07-13 MRTG-IPV6(1) diff --git a/src/doc/mrtg-l.gif b/doc/mrtg-l.gif Binary files differindex 11eb3d7..11eb3d7 100644 --- a/src/doc/mrtg-l.gif +++ b/doc/mrtg-l.gif diff --git a/src/doc/mrtg-l.png b/doc/mrtg-l.png Binary files differindex 0730c9a..0730c9a 100644 --- a/src/doc/mrtg-l.png +++ b/doc/mrtg-l.png diff --git a/doc/mrtg-logfile.1 b/doc/mrtg-logfile.1 new file mode 100644 index 0000000..5c8ec65 --- /dev/null +++ b/doc/mrtg-logfile.1 @@ -0,0 +1,225 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-LOGFILE 1" +.TH MRTG-LOGFILE 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-logfile \- description of the mrtg\-2 logfile format +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +This document provides a description of the contents of +the mrtg\-2 logfile. +.SH "OVERVIEW" +.IX Header "OVERVIEW" +The logfile consists of two main sections. +.IP "The first Line" 4 +.IX Item "The first Line" +It stores the traffic counters from the most recent run of mrtg. +.IP "The rest of the File" 4 +.IX Item "The rest of the File" +Stores past traffic rate averates and maxima at increassing +intervals. +.PP +The first number on each line is a unix time stamp. It represents +the number of seconds since 1970. +.SH "DETAILS" +.IX Header "DETAILS" +.SS "The first Line" +.IX Subsection "The first Line" +The first line has 3 numbers which are: +.IP "A (1st column)" 4 +.IX Item "A (1st column)" +A timestamp of when \s-1MRTG\s0 last ran for this interface. The timestamp is the +number of non-skip seconds passed since the standard \s-1UNIX \s0\*(L"epoch\*(R" of midnight +on 1st of January 1970 \s-1GMT.\s0 +.IP "B (2nd column)" 4 +.IX Item "B (2nd column)" +The \*(L"incoming bytes counter\*(R" value. +.IP "C (3rd column)" 4 +.IX Item "C (3rd column)" +The \*(L"outgoing bytes counter\*(R" value. +.SS "The rest of the File" +.IX Subsection "The rest of the File" +The second and remaining lines of the file contains 5 numbers +which are: +.IP "A (1st column)" 4 +.IX Item "A (1st column)" +The Unix timestamp for the point in time the data on this line is relevant. +Note that the interval between timestamps increases as you progress through the +file. At first it is 5 minutes and at the end it is one day between two lines. +.Sp +This timestamp may be converted in OpenOffice Calc or \s-1MS\s0 Excel by using the +following formula +.Sp +.Vb 1 +\& =(x+y)/86400+DATE(1970;1;1) +.Ve +.Sp +(instead of \*(L";\*(R" it may be that you have to use \*(L",\*(R" this depends on the context and your locale settings) +.Sp +you can also ask perl to help by typing +.Sp +.Vb 1 +\& perl \-e \*(Aqprint scalar localtime(x),"\en"\*(Aq +.Ve +.Sp +\&\fBx\fR is the unix timestamp and \fBy\fR is the offset in seconds +from \s-1UTC. \s0(Perl knows \fBy\fR). +.IP "B (2nd column)" 4 +.IX Item "B (2nd column)" +The average incoming transfer rate in bytes per second. This is valid +for the time between the A value of the current line and the A value of the +previous line. +.IP "C (3rd column)" 4 +.IX Item "C (3rd column)" +The average outgoing transfer rate in bytes per second since the previous +measurement. +.IP "D (4th column)" 4 +.IX Item "D (4th column)" +The maximum incoming transfer rate in bytes per second for the current +interval. This is calculated from all the updates which have occured in the +current interval. If the current interval is 1 hour, and updates have +occured every 5 minutes, it will be the biggest 5 minute transfer rate seen +during the hour. +.IP "E (5th column)" 4 +.IX Item "E (5th column)" +The maximum outgoing transfer rate in bytes per second for the current interval. +.SH "AUTHOR" +.IX Header "AUTHOR" +Butch Kemper <kemper@bihs.net> and +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-logfile.pod b/doc/mrtg-logfile.pod index 4d8f2e6..4d8f2e6 100644 --- a/src/doc/mrtg-logfile.pod +++ b/doc/mrtg-logfile.pod diff --git a/doc/mrtg-logfile.txt b/doc/mrtg-logfile.txt new file mode 100644 index 0000000..a6e95e1 --- /dev/null +++ b/doc/mrtg-logfile.txt @@ -0,0 +1,90 @@ +MRTG-LOGFILE(1) mrtg MRTG-LOGFILE(1) + + + +NNAAMMEE + mrtg-logfile - description of the mrtg-2 logfile format + +SSYYNNOOPPSSIISS + This document provides a description of the contents of the mrtg-2 + logfile. + +OOVVEERRVVIIEEWW + The logfile consists of two main sections. + + The first Line + It stores the traffic counters from the most recent run of mrtg. + + The rest of the File + Stores past traffic rate averates and maxima at increassing + intervals. + + The first number on each line is a unix time stamp. It represents the + number of seconds since 1970. + +DDEETTAAIILLSS + TThhee ffiirrsstt LLiinnee + The first line has 3 numbers which are: + + A (1st column) + A timestamp of when MRTG last ran for this interface. The + timestamp is the number of non-skip seconds passed since the + standard UNIX "epoch" of midnight on 1st of January 1970 GMT. + + B (2nd column) + The "incoming bytes counter" value. + + C (3rd column) + The "outgoing bytes counter" value. + + TThhee rreesstt ooff tthhee FFiillee + The second and remaining lines of the file contains 5 numbers which + are: + + A (1st column) + The Unix timestamp for the point in time the data on this line is + relevant. Note that the interval between timestamps increases as + you progress through the file. At first it is 5 minutes and at the + end it is one day between two lines. + + This timestamp may be converted in OpenOffice Calc or MS Excel by + using the following formula + + =(x+y)/86400+DATE(1970;1;1) + + (instead of ";" it may be that you have to use "," this depends on + the context and your locale settings) + + you can also ask perl to help by typing + + perl -e 'print scalar localtime(x),"\n"' + + xx is the unix timestamp and yy is the offset in seconds from UTC. + (Perl knows yy). + + B (2nd column) + The average incoming transfer rate in bytes per second. This is + valid for the time between the A value of the current line and the + A value of the previous line. + + C (3rd column) + The average outgoing transfer rate in bytes per second since the + previous measurement. + + D (4th column) + The maximum incoming transfer rate in bytes per second for the + current interval. This is calculated from all the updates which + have occured in the current interval. If the current interval is 1 + hour, and updates have occured every 5 minutes, it will be the + biggest 5 minute transfer rate seen during the hour. + + E (5th column) + The maximum outgoing transfer rate in bytes per second for the + current interval. + +AAUUTTHHOORR + Butch Kemper <kemper@bihs.net> and Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-LOGFILE(1) diff --git a/src/doc/mrtg-m.gif b/doc/mrtg-m.gif Binary files differindex ec4ee9a..ec4ee9a 100644 --- a/src/doc/mrtg-m.gif +++ b/doc/mrtg-m.gif diff --git a/src/doc/mrtg-m.png b/doc/mrtg-m.png Binary files differindex 743e495..743e495 100644 --- a/src/doc/mrtg-m.png +++ b/doc/mrtg-m.png diff --git a/doc/mrtg-mibhelp.1 b/doc/mrtg-mibhelp.1 new file mode 100644 index 0000000..61d56b8 --- /dev/null +++ b/doc/mrtg-mibhelp.1 @@ -0,0 +1,344 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-MIBHELP 1" +.TH MRTG-MIBHELP 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-mibhelp \- A Table of some interesting OIDs +.SH "OVERVIEW" +.IX Header "OVERVIEW" +This File Contains a collection of interesting \s-1MIB\s0 Entries ... +mrtg knows about their names ... depending on the \s-1ASN.1\s0 Syntax +you may have to put \fBgauge\fR into the \fBOptions[]:\fR parameter. +.PP +For information about how to create a \fBTarget[]:\fR parameter which +references these \s-1MIB\s0 entries, please consult mrtg-reference. +.SH "MIB LIST" +.IX Header "MIB LIST" +.SS "ifOperStatus" +.IX Subsection "ifOperStatus" +.Vb 4 +\& Descriptor: ifOperStatus +\& Identifier: 1.3.6.1.2.1.2.2.1.8 +\& ASN.1 Syntax: INTEGER +\& Enumeration: up 1, down 2, testing 3 +.Ve +.PP +The current operational state of the interface. +The \fItesting\fR\|(3) state indicates that no operational +packets can be passed. +.SS "ifAdminStatus" +.IX Subsection "ifAdminStatus" +.Vb 4 +\& Descriptor: ifAdminStatus +\& Identifier: 1.3.6.1.2.1.2.2.1.7 +\& ASN.1 Syntax: INTEGER +\& Enumeration: up 1, down 2, testing 3 +.Ve +.PP +The current administrative state of the interface. +The \fItesting\fR\|(3) state indicates that no operational +packets can be passed. +.SS "ifInOctets" +.IX Subsection "ifInOctets" +.Vb 3 +\& Descriptor: ifInOctets +\& Identifier: 1.3.6.1.2.1.2.2.1.10 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The total number of octets received on the +interface, including framing characters. +.SS "ifInUcastPkts" +.IX Subsection "ifInUcastPkts" +.Vb 3 +\& Descriptor: ifInUcastPkts +\& Identifier: 1.3.6.1.2.1.2.2.1.11 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of subnetwork-unicast packets +delivered to a higher-layer protocol. +.SS "ifInNUcastPkts" +.IX Subsection "ifInNUcastPkts" +.Vb 3 +\& Descriptor: ifInNUcastPkts +\& Identifier: 1.3.6.1.2.1.2.2.1.12 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of non-unicast (i.e., subnetwork\- +broadcast or subnetwork-multicast) packets +delivered to a higher-layer protocol. +.SS "ifInDiscards" +.IX Subsection "ifInDiscards" +.Vb 3 +\& Descriptor: ifInDiscards +\& Identifier: 1.3.6.1.2.1.2.2.1.13 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of inbound packets which were chosen +to be discarded even though no errors had been +detected to prevent their being deliverable to a +higher-layer protocol. One possible reason for +discarding such a packet could be to free up +buffer space. +.SS "ifInErrors" +.IX Subsection "ifInErrors" +.Vb 3 +\& Descriptor: ifInErrors +\& Identifier: 1.3.6.1.2.1.2.2.1.14 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of inbound packets that contained +errors preventing them from being deliverable to a +higher-layer protocol. +.SS "ifInUnknownProtos" +.IX Subsection "ifInUnknownProtos" +.Vb 3 +\& Descriptor: ifInUnknownProtos +\& Identifier: 1.3.6.1.2.1.2.2.1.15 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of packets received via the interface +which were discarded because of an unknown or +unsupported protocol. +.SS "ifOutOctets" +.IX Subsection "ifOutOctets" +.Vb 3 +\& Descriptor: ifOutOctets +\& Identifier: 1.3.6.1.2.1.2.2.1.16 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The total number of octets transmitted out of the +interface, including framing characters. +.SS "ifOutUcastPkts" +.IX Subsection "ifOutUcastPkts" +.Vb 3 +\& Descriptor: ifOutUcastPkts +\& Identifier: 1.3.6.1.2.1.2.2.1.17 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The total number of packets that higher-level +protocols requested be transmitted to a +subnetwork-unicast address, including those that +were discarded or not sent. +.SS "ifOutNUcastPkts" +.IX Subsection "ifOutNUcastPkts" +.Vb 3 +\& Descriptor: ifOutNUcastPkts +\& Identifier: 1.3.6.1.2.1.2.2.1.18 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The total number of packets that higher-level +protocols requested be transmitted to a non\- +unicast (i.e., a subnetwork-broadcast or +subnetwork-multicast) address, including those +that were discarded or not sent. +.SS "ifOutDiscards" +.IX Subsection "ifOutDiscards" +.Vb 3 +\& Descriptor: ifOutDiscards +\& Identifier: 1.3.6.1.2.1.2.2.1.19 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of outbound packets which were chosen +to be discarded even though no errors had been +detected to prevent their being transmitted. One +possible reason for discarding such a packet could +be to free up buffer space. +.SS "ifOutErrors" +.IX Subsection "ifOutErrors" +.Vb 3 +\& Descriptor: ifOutErrors +\& Identifier: 1.3.6.1.2.1.2.2.1.20 +\& ASN.1 Syntax: Counter32 +.Ve +.PP +The number of outbound packets that could not be +transmitted because of errors. +.SS "ifOutQLen" +.IX Subsection "ifOutQLen" +.Vb 3 +\& Descriptor: ifOutQLen +\& Identifier: 1.3.6.1.2.1.2.2.1.21 +\& ASN.1 Syntax: Unsigned32 +.Ve +.PP +The length of the output packet queue (in +packets). +.SS "frInOctets" +.IX Subsection "frInOctets" +From: Simon Ferrett <simonf@world.net> +.PP +.Vb 2 +\& \*(AqfrInOctets\*(Aq => \*(Aq1.3.6.1.2.1.10.32.2.1.9\*(Aq +\& \*(AqfrOutOctets\*(Aq => \*(Aq1.3.6.1.2.1.10.32.2.1.7\*(Aq +.Ve +.PP +which when used in the form: +.PP +.Vb 1 +\& frInOctets.pp.dd&frOutOctets.pp.dd:community@cisco.router +.Ve +.PP +where pp is the physical port that the frame relay pvc is +defined on and dd is the \s-1DLCI\s0 of the pvc gets you the in +and out octets for just that pvc. +.SS "ifAdminHack and ifOperHack" +.IX Subsection "ifAdminHack and ifOperHack" +The return values of ifAdminStatus and ifOperStatus are not very useful +for graphing. Use ifOperHack and ifAdminHack instead. They return 1 for +\&\s-1UP\s0 and 0 otherwise. +.PP +Note these are not real \s-1MIB\s0 entities but mrtg hacks +.SS "PseudoZero and PseudoOne" +.IX Subsection "PseudoZero and PseudoOne" +will return 0 and 1 respectively +.PP +Note these are not real \s-1MIB\s0 entities but mrtg hacks +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-mibhelp.pod b/doc/mrtg-mibhelp.pod index 2f410c8..2f410c8 100644 --- a/src/doc/mrtg-mibhelp.pod +++ b/doc/mrtg-mibhelp.pod diff --git a/doc/mrtg-mibhelp.txt b/doc/mrtg-mibhelp.txt new file mode 100644 index 0000000..d5425b8 --- /dev/null +++ b/doc/mrtg-mibhelp.txt @@ -0,0 +1,168 @@ +MRTG-MIBHELP(1) mrtg MRTG-MIBHELP(1) + + + +NNAAMMEE + mrtg-mibhelp - A Table of some interesting OIDs + +OOVVEERRVVIIEEWW + This File Contains a collection of interesting MIB Entries ... mrtg + knows about their names ... depending on the ASN.1 Syntax you may have + to put ggaauuggee into the OOppttiioonnss[[]]:: parameter. + + For information about how to create a TTaarrggeett[[]]:: parameter which + references these MIB entries, please consult mrtg-reference. + +MMIIBB LLIISSTT + iiffOOppeerrSSttaattuuss + Descriptor: ifOperStatus + Identifier: 1.3.6.1.2.1.2.2.1.8 + ASN.1 Syntax: INTEGER + Enumeration: up 1, down 2, testing 3 + + The current operational state of the interface. The _t_e_s_t_i_n_g(3) state + indicates that no operational packets can be passed. + + iiffAAddmmiinnSSttaattuuss + Descriptor: ifAdminStatus + Identifier: 1.3.6.1.2.1.2.2.1.7 + ASN.1 Syntax: INTEGER + Enumeration: up 1, down 2, testing 3 + + The current administrative state of the interface. The _t_e_s_t_i_n_g(3) + state indicates that no operational packets can be passed. + + iiffIInnOOcctteettss + Descriptor: ifInOctets + Identifier: 1.3.6.1.2.1.2.2.1.10 + ASN.1 Syntax: Counter32 + + The total number of octets received on the interface, including framing + characters. + + iiffIInnUUccaassttPPkkttss + Descriptor: ifInUcastPkts + Identifier: 1.3.6.1.2.1.2.2.1.11 + ASN.1 Syntax: Counter32 + + The number of subnetwork-unicast packets delivered to a higher-layer + protocol. + + iiffIInnNNUUccaassttPPkkttss + Descriptor: ifInNUcastPkts + Identifier: 1.3.6.1.2.1.2.2.1.12 + ASN.1 Syntax: Counter32 + + The number of non-unicast (i.e., subnetwork- broadcast or subnetwork- + multicast) packets delivered to a higher-layer protocol. + + iiffIInnDDiissccaarrddss + Descriptor: ifInDiscards + Identifier: 1.3.6.1.2.1.2.2.1.13 + ASN.1 Syntax: Counter32 + + The number of inbound packets which were chosen to be discarded even + though no errors had been detected to prevent their being deliverable + to a higher-layer protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + iiffIInnEErrrroorrss + Descriptor: ifInErrors + Identifier: 1.3.6.1.2.1.2.2.1.14 + ASN.1 Syntax: Counter32 + + The number of inbound packets that contained errors preventing them + from being deliverable to a higher-layer protocol. + + iiffIInnUUnnkknnoowwnnPPrroottooss + Descriptor: ifInUnknownProtos + Identifier: 1.3.6.1.2.1.2.2.1.15 + ASN.1 Syntax: Counter32 + + The number of packets received via the interface which were discarded + because of an unknown or unsupported protocol. + + iiffOOuuttOOcctteettss + Descriptor: ifOutOctets + Identifier: 1.3.6.1.2.1.2.2.1.16 + ASN.1 Syntax: Counter32 + + The total number of octets transmitted out of the interface, including + framing characters. + + iiffOOuuttUUccaassttPPkkttss + Descriptor: ifOutUcastPkts + Identifier: 1.3.6.1.2.1.2.2.1.17 + ASN.1 Syntax: Counter32 + + The total number of packets that higher-level protocols requested be + transmitted to a subnetwork-unicast address, including those that were + discarded or not sent. + + iiffOOuuttNNUUccaassttPPkkttss + Descriptor: ifOutNUcastPkts + Identifier: 1.3.6.1.2.1.2.2.1.18 + ASN.1 Syntax: Counter32 + + The total number of packets that higher-level protocols requested be + transmitted to a non- unicast (i.e., a subnetwork-broadcast or + subnetwork-multicast) address, including those that were discarded or + not sent. + + iiffOOuuttDDiissccaarrddss + Descriptor: ifOutDiscards + Identifier: 1.3.6.1.2.1.2.2.1.19 + ASN.1 Syntax: Counter32 + + The number of outbound packets which were chosen to be discarded even + though no errors had been detected to prevent their being transmitted. + One possible reason for discarding such a packet could be to free up + buffer space. + + iiffOOuuttEErrrroorrss + Descriptor: ifOutErrors + Identifier: 1.3.6.1.2.1.2.2.1.20 + ASN.1 Syntax: Counter32 + + The number of outbound packets that could not be transmitted because of + errors. + + iiffOOuuttQQLLeenn + Descriptor: ifOutQLen + Identifier: 1.3.6.1.2.1.2.2.1.21 + ASN.1 Syntax: Unsigned32 + + The length of the output packet queue (in packets). + + ffrrIInnOOcctteettss + From: Simon Ferrett <simonf@world.net> + + 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9' + 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7' + + which when used in the form: + + frInOctets.pp.dd&frOutOctets.pp.dd:community@cisco.router + + where pp is the physical port that the frame relay pvc is defined on + and dd is the DLCI of the pvc gets you the in and out octets for just + that pvc. + + iiffAAddmmiinnHHaacckk aanndd iiffOOppeerrHHaacckk + The return values of ifAdminStatus and ifOperStatus are not very useful + for graphing. Use ifOperHack and ifAdminHack instead. They return 1 for + UP and 0 otherwise. + + Note these are not real MIB entities but mrtg hacks + + PPsseeuuddooZZeerroo aanndd PPsseeuuddooOOnnee + will return 0 and 1 respectively + + Note these are not real MIB entities but mrtg hacks + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-MIBHELP(1) diff --git a/doc/mrtg-nt-guide.1 b/doc/mrtg-nt-guide.1 new file mode 100644 index 0000000..c3224d1 --- /dev/null +++ b/doc/mrtg-nt-guide.1 @@ -0,0 +1,526 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-NT-GUIDE 1" +.TH MRTG-NT-GUIDE 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-nt\-guide \- The MRTG 2.17.7 Windows Installation Guide +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +Installing \s-1MRTG\s0 on a Windows box is not quite as \*(L"click and point\*(R" as some +might want it to be. But then again, it is not all that difficult if you +follow the instructions below. +.SH "PREREQUISITES" +.IX Header "PREREQUISITES" +To get \s-1MRTG\s0 to work on Windows you need the following: +.IP "\(bu" 4 +A current copy of Perl. +For Example ActivePerl 5.8.8 from ActiveState +http://www.activestate.com/store/activeperl/download/ +.IP "\(bu" 4 +The latest version of \s-1MRTG\s0 from http://oss.oetiker.ch/mrtg/pub. Look for +mrtg\-2.17.7.zip or better. The archive also contains a precompiled copy of +rateup.exe for Win32. +.SH "INSTALLING" +.IX Header "INSTALLING" +I suggest you do the following from the machine that will be running \s-1MRTG,\s0 +which, in this case, is also a web server. All examples are for doing things +to a \s-1LOCAL\s0 machine. +.IP "First" 4 +.IX Item "First" +Unzip \s-1MRTG\s0 to C:\emrtg\-2.17.7 on the Windows machine of your choice. +.IP "Next" 4 +.IX Item "Next" +Install Perl on the same Windows machine. You might want to make sure +that the Perl binary directory is listed in your system path. +.Sp +.Vb 1 +\& C:\ePerl\ebin;%SystemRoot%\esystem32;%SystemRoot%;... +.Ve +.Sp +You can manually check this by going to [Control Panel]\->[System]\->[Environment] +.PP +To see if everything is installed properly you can open a Command Shell +and go into \fIc:\emrtg\-2.17.7\ebin\fR. Type: +.PP +.Vb 1 +\& perl mrtg +.Ve +.PP +This should give you a friendly error message complaining about the missing \s-1MRTG\s0 +configuration file. Now, you have successfully installed \s-1MRTG\s0 and Perl. +.SH "CONFIGURING MRTG" +.IX Header "CONFIGURING MRTG" +Now it is time to create a configuration for \s-1MRTG.\s0 But before we begin you need to know a few things. Take an +opportunity to gather the following information: +.IP "\(bu" 4 +The \s-1IP\s0 address or hostname and the \s-1SNMP\s0 port number, (if non standard), of the device you want to monitor. +.IP "\(bu" 4 +If you want to monitor something other than bytes in and out, you must also know the \s-1SNMPOID\s0 of what you +want to monitor. +.IP "\(bu" 4 +Finally you need to know the read-only \s-1SNMP\s0 community string +for your device. If you don't know it, try \fBpublic\fR, that is the default. +.PP +For the rest of this document we will be using device \fB10.10.10.1\fR ( a \s-1CISCO\s0 +Catalyst 5000) with Community string \fBpublic\fR. We are interested in monitoring +traffic, and the \s-1CPU\s0 load. Let's begin. +.PP +The first thing we do in setting up \s-1MRTG\s0 is making a default config file. +Get to a cmd prompt and change to the \fIc:\emrtg\-2.17.7\ebin\fR directory. Type the +following command: +.PP +.Vb 1 +\& perl cfgmaker public@10.10.10.1 \-\-global "WorkDir: c:\ewww\emrtg" \-\-output mrtg.cfg +.Ve +.PP +This creates an initial \s-1MRTG\s0 config file for you. Note that in this file all interfaces +of your router will be stored by number. Unfortunately, these numbers are likely to change whenever you +reconfigure your router. In order to work around this you can get \fIcfgmaker\fR to produce a configuration +which is based on Ip numbers, or even Interface Descriptions. Check cfgmaker +.PP +If you get an error message complaining about \fBno such name\fR or \fBno +response\fR, your community name is probably wrong. +.PP +Now, let's take a look at the mrtg.cfg file that was created. +.PP +In Perl, a \f(CW\*(C`#\*(C'\fR is a comment, synonymous with \f(CW\*(C`REM\*(C'\fR in \s-1DOS.\s0 +.PP +Add the following to the top of the mrtg.cfg file: +.PP +.Vb 1 +\& WorkDir: c:\ewww\emrtg +.Ve +.PP +This is where the web pages are created, usually a web root. +.PP +.Vb 6 +\& ###################################################################### +\& # Description: LCP SUWGB +\& # Contact: Administrator +\& # System Name: LC\-Bridge +\& # Location: Here +\& #..................................................................... +.Ve +.PP +TargetDevice's \s-1IP\s0 Address:Interface Number:Community:IP Address +.PP +.Vb 1 +\& Target[10.10.10.1.1]: 1:public@10.10.10.1 +.Ve +.PP +This is the interface speed (Default is 10 megabits; for 100Mbit devices use 12500000 and so on...) +.PP +.Vb 1 +\& MaxBytes[10.10.10.1.1]: 1250000 +\& +\& Title[10.10.10.1.1]: LC\-Bridge (sample.device): ether0 +.Ve +.PP +This section determines how the web page headers will look +.PP +.Vb 9 +\& PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ether0(1)</TD></TR> +\& <TR><TD>IP:</TD><TD>sample.device(10.10.10.1)</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& Target[10.10.10.1.2]: 2:public@10.10.10.1 +\& MaxBytes[10.10.10.1.2]: 1250000 +\& Title[10.10.10.1.2]: LC\-Bridge (): ulink0 +\& PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ulink0(2)</TD></TR> +\& <TR><TD>IP:</TD><TD>()</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +.Ve +.PP +And that's a very basic \s-1MRTG\s0 config file. You can run this and see your +results by going into the \fIc:\emrtg\-2.17.7\ebin\fR directory and typing: +.PP +.Vb 1 +\& perl mrtg mrtg.cfg +.Ve +.PP +It is normal to get errors for the first two times you run this command. The +errors will alert you about the fact that there have not been any log files +in existence before. +.PP +If you take a look at those web pages they are not very exciting (yet). You need +to have the \s-1MRTG\s0 files run every five minutes to produce the desired results. +Just run it again after a few minutes. You should now be able to see the first +lines in your graphs. +.SH "MAKE MRTG RUN ALL THE TIME" +.IX Header "MAKE MRTG RUN ALL THE TIME" +Starting \s-1MRTG\s0 by hand every time you want to run it is not going to make you +happy I guess. +.PP +There is a special option you can set in the \s-1MRTG\s0 configuration file so +so that \s-1MRTG\s0 will not terminate after it was started. Instead it +will wait for 5 minutes and then run again. +.PP +Add the option +.PP +.Vb 1 +\& RunAsDaemon: yes +.Ve +.PP +to your mrtg.cfg file and start it with: +.PP +.Vb 1 +\& start /Dc:\emrtg\-2.17.7\ebin wperl mrtg \-\-logging=eventlog mrtg.cfg +.Ve +.PP +If you use \fBwperl\fR instead of \fBperl\fR, no console window will show. \s-1MRTG\s0 is now +running in the background. If it runs into problems it will tell you so +over the EventLog. To stop \s-1MRTG,\s0 open the Task Manager and terminate the +\&\fBwperl.exe\fR process. If mrtg has anything to tell you these messages +can be found in the event log. +.PP +If you put a shortcut with +.PP +.Vb 2 +\& Target: wperl mrtg \-\-logging=eventlog mrtg.cfg +\& Start in: c:\emrtg\-2.17.7\ebin +.Ve +.PP +into your start-up folder, \s-1MRTG\s0 will now start whenever you login to your \s-1NT\s0 +box. +.PP +If you do not want to log into your box just to start \s-1MRTG.\s0 Have a look +at http://www.firedaemon.com/mrtg\-howto.html which describes a free tool to +start any program as a Service. The pages gives specific instructions for +\&\s-1MRTG\s0 users. +.SH "HOW TO SETUP MRTG AS A WINDOWS SERVICE" +.IX Header "HOW TO SETUP MRTG AS A WINDOWS SERVICE" +.SS "Additional Prerequisites" +.IX Subsection "Additional Prerequisites" +.IP "\(bu" 4 +\&\s-1MRTG\s0 must be installed and fully configured on the target system. In the +following exercise the assumption is that \s-1MRTG\s0 is installed under c:\emrtg\e +and all the sample files use this location. +.IP "\(bu" 4 +Microsoft Tools \fB\s-1SRVANY\s0.exe\fR (Applications as Services Utility) and +\&\fB\s-1INSTSRV\s0.exe\fR (Service Installer) \- Those files can be downloaded from +Microsoft as a part of Windows 2000 Resource Kit at +<http://www.microsoft.com/windows2000/techinfo/reskit/tools/default.asp>. +They are also available from other locations such as +<http://www.electrasoft.com/srvany/srvany.htm>, +<http://www.iopus.com/guides/srvany.htm>, etc. Detailed instructions on how +to use this package are available at +<http://support.microsoft.com/kb/q137890/>. In order to follow the steps in +this HOW-TO you \fB\s-1MUST\s0\fR obtain both executables. +.IP "\(bu" 4 +You must have administrative rights on the target system. +.SS "Preparation" +.IX Subsection "Preparation" +Please complete the following steps before starting the installation: +.IP "\(bu" 4 +Copy \fBsrvany.exe\fR and \fBinstsrv.exe\fR to c:\emrtg\-2.17.7\ebin\e (your \s-1MRTG\s0 bin directory). +.IP "\(bu" 4 +Create a file called \fBmrtg.reg\fR anywhere on your system and paste the +following content into it: +.Sp +.Vb 1 +\& Windows Registry Editor Version 5.00 +\& +\& [HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eServices\eMRTG\eParameters] +\& "Application"="c:\e\eperl\e\ebin\e\ewperl.exe" +\& "AppParameters"="c:\e\emrtg\-2.17.7\e\ebin\e\emrtg \-\-logging=eventlog c:\e\emrtg\-2.17.7\e\ebin\e\emrtg.cfg" +\& "AppDirectory"="c:\e\emrtg\-2.17.7\e\ebin\e\e" +.Ve +.SS "Service Installation" +.IX Subsection "Service Installation" +Once again, assuming that \s-1MRTG\s0 is already fully installed and configured on +the target system under c:\emrtg\e the following steps are necessary to setup +\&\s-1MRTG\s0 as a service. +.PP +Using the command prompt go into the temporary directory where you unzipped +the package. When there type the following command to create a service +named \*(L"\s-1MRTG\*(R"\s0 in the Windows Services management console: +.PP +.Vb 1 +\& instsrv MRTG c:\emrtg\ebin\esrvany.exe +.Ve +.PP +Now you need to create the \fBApp*\fR entries required for the new service. You +can do this by either right-clicking on the mrtg.reg file and selecting +\&'merge' or by running the following command: +.PP +.Vb 1 +\& regedit /s mrtg.reg +.Ve +.PP +After setting up the registry entry it is time to point it to your \s-1MRTG\s0 +installation. If you have installed \s-1MRTG\s0 under \fIc:\emrtg\e\fR, you can skip this +step. Open your registry editor (Start \-> Run \-> regedt32), and locate the +\&\fB[HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eServices\eMRTG]\fR key. Make +sure that the \fBImagePath\fR variable is correctly pointing to \fBsrvany.exe\fR +located in your \s-1MRTG\s0 bin directory (for example c:\emrtg\ebin\esrvany.exe). +Next you have to expand the \s-1MRTG\s0 tree, and go to the +\&\fB[HKEY_LOCAL_MACHINE\eSYSTEM\eCurrentControlSet\eServices\eMRTG\eParameters]\fR +key. Under Parameters make sure that all the \fBApplication\fR variables are +setup properly. +.PP +At this point you are ready to run the service. The only thing left to do +is to start the \s-1MRTG\s0 service in the Services management console. After you +do this, you should see two new processes running on your system: srvany.exe +and wperl.exe. Make sure to stop any previously running \s-1MRTG\s0 processes to +avoid conflict. +.PP +Note that it is imperative to set the \fBRunAsDaemon: yes\fR option or the +service will stop after just one single run! +.SH "EXAMPLE" +.IX Header "EXAMPLE" +Now lets look at a config file to monitor what we wanted to on our mythical +Cisco Cat 5000 \*(-- utilization on ports 3, 5, 10, and 24, and the \s-1CPU\s0 Load, +which will show us nonstandard mrtg configurations as well as more options.. +.PP +.Vb 2 +\& WorkDir: c:\ewww\emrtg +\& RunAsDaemon: yes +\& +\& ###################################################################### +\& # Description: LCP SUWGB +\& # Contact: Administrator +\& # System Name: LC\-Bridge +\& # Location: Here +\& #..................................................................... +\& +\& Target[10.10.10.1.1]: 3:public@10.10.10.1 +\& MaxBytes[10.10.10.1.1]: 1250000 +\& Title[10.10.10.1.1]: LC\-Bridge (sample\-device): ether0 +\& PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ether0(3)</TD></TR> +\& <TR><TD>IP:</TD><TD>sample\-device(10.10.10.1)</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& +\& Target[10.10.10.1.2]: 5:public@10.10.10.1 +\& MaxBytes[10.10.10.1.2]: 1250000 +\& Title[10.10.10.1.2]: LC\-Bridge (): ulink0 +\& PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ulink0(5)</TD></TR> +\& <TR><TD>IP:</TD><TD>()</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& +\& Target[10.10.10.1.1]: 10:public@10.10.10.1 +\& MaxBytes[10.10.10.1.1]: 1250000 +\& Title[10.10.10.1.1]: LC\-Bridge (sample\-device): ether0 +\& PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ether0(10)</TD></TR> +\& <TR><TD>IP:</TD><TD>sample\-device(10.10.10.1)</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& +\& Target[10.10.10.1.2]: 24:public@10.10.10.1 +\& MaxBytes[10.10.10.1.2]: 1250000 +\& Title[10.10.10.1.2]: LC\-Bridge (): ulink0 +\& PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> +\& <TABLE> +\& <TR><TD>System:</TD><TD>LC\-Bridge inAndover</TD></TR> +\& <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> +\& <TR><TD>Interface:</TD><TD>ulink0(24)</TD></TR> +\& <TR><TD>IP:</TD><TD>()</TD></TR> +\& <TR><TD>Max Speed:</TD> +\& <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> +\& </TABLE> +\& +\& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\& +\& # Router CPU load % +\& Target[cpu.1]:1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:public@10.10.10.1 +\& RouterUptime[cpu.1]: public@10.10.10.1 +\& MaxBytes[cpu.1]: 100 +\& Title[cpu.1]: CPU LOAD +\& PageTop[cpu.1]: <H1>CPU Load %</H1> +\& Unscaled[cpu.1]: ymwd +\& ShortLegend[cpu.1]: % +\& XSize[cpu.1]: 380 +\& YSize[cpu.1]: 100 +\& YLegend[cpu.1]: CPU Utilization +\& Legend1[cpu.1]: CPU Utilization in % (Load) +\& Legend2[cpu.1]: CPU Utilization in % (Load) +\& Legend3[cpu.1]: +\& Legend4[cpu.1]: +\& LegendI[cpu.1]: +\& LegendO[cpu.1]: Usage +\& Options[cpu.1]: gauge +.Ve +.PP +This is a nice example of how to monitor any \s-1SNMP\s0 device if you know what \s-1OID\s0 +you want to use. Once again, for an explanation of the more advance features of +mrtg, please see the rest of the documentation. +.SH "AUTHORS" +.IX Header "AUTHORS" +Tobi Oetiker <tobi@oetiker.ch>, +David S. Divins <ddivins@moon.jic.com>, +Steve Pierce <MRTG@HDL.com>, +Artyom Adjemov <one.bofh@gmail.com>, +Ilja Ivanov <ivanov@bseu.by> +Karel Fajkus <http://fajkus.cz/> diff --git a/src/doc/mrtg-nt-guide.pod b/doc/mrtg-nt-guide.pod index 57359d0..57359d0 100644 --- a/src/doc/mrtg-nt-guide.pod +++ b/doc/mrtg-nt-guide.pod diff --git a/doc/mrtg-nt-guide.txt b/doc/mrtg-nt-guide.txt new file mode 100644 index 0000000..0fa5ff0 --- /dev/null +++ b/doc/mrtg-nt-guide.txt @@ -0,0 +1,366 @@ +MRTG-NT-GUIDE(1) mrtg MRTG-NT-GUIDE(1) + + + +NNAAMMEE + mrtg-nt-guide - The MRTG 2.17.7 Windows Installation Guide + +SSYYNNOOPPSSIISS + Installing MRTG on a Windows box is not quite as "click and point" as + some might want it to be. But then again, it is not all that difficult + if you follow the instructions below. + +PPRREERREEQQUUIISSIITTEESS + To get MRTG to work on Windows you need the following: + + +o A current copy of Perl. For Example ActivePerl 5.8.8 from + ActiveState http://www.activestate.com/store/activeperl/download/ + + +o The latest version of MRTG from http://oss.oetiker.ch/mrtg/pub. + Look for mrtg-2.17.7.zip or better. The archive also contains a + precompiled copy of rateup.exe for Win32. + +IINNSSTTAALLLLIINNGG + I suggest you do the following from the machine that will be running + MRTG, which, in this case, is also a web server. All examples are for + doing things to a LOCAL machine. + + First + Unzip MRTG to C:\mrtg-2.17.7 on the Windows machine of your choice. + + Next + Install Perl on the same Windows machine. You might want to make + sure that the Perl binary directory is listed in your system path. + + C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%;... + + You can manually check this by going to [Control + Panel]->[System]->[Environment] + + To see if everything is installed properly you can open a Command Shell + and go into _c_:_\_m_r_t_g_-_2_._1_7_._7_\_b_i_n. Type: + + perl mrtg + + This should give you a friendly error message complaining about the + missing MRTG configuration file. Now, you have successfully installed + MRTG and Perl. + +CCOONNFFIIGGUURRIINNGG MMRRTTGG + Now it is time to create a configuration for MRTG. But before we begin + you need to know a few things. Take an opportunity to gather the + following information: + + +o The IP address or hostname and the SNMP port number, (if non + standard), of the device you want to monitor. + + +o If you want to monitor something other than bytes in and out, you + must also know the SNMPOID of what you want to monitor. + + +o Finally you need to know the read-only SNMP community string for + your device. If you don't know it, try ppuubblliicc, that is the default. + + For the rest of this document we will be using device 1100..1100..1100..11 ( a + CISCO Catalyst 5000) with Community string ppuubblliicc. We are interested in + monitoring traffic, and the CPU load. Let's begin. + + The first thing we do in setting up MRTG is making a default config + file. Get to a cmd prompt and change to the _c_:_\_m_r_t_g_-_2_._1_7_._7_\_b_i_n + directory. Type the following command: + + perl cfgmaker public@10.10.10.1 --global "WorkDir: c:\www\mrtg" --output mrtg.cfg + + This creates an initial MRTG config file for you. Note that in this + file all interfaces of your router will be stored by number. + Unfortunately, these numbers are likely to change whenever you + reconfigure your router. In order to work around this you can get + _c_f_g_m_a_k_e_r to produce a configuration which is based on Ip numbers, or + even Interface Descriptions. Check cfgmaker + + If you get an error message complaining about nnoo ssuucchh nnaammee or nnoo + rreessppoonnssee, your community name is probably wrong. + + Now, let's take a look at the mrtg.cfg file that was created. + + In Perl, a "#" is a comment, synonymous with "REM" in DOS. + + Add the following to the top of the mrtg.cfg file: + + WorkDir: c:\www\mrtg + + This is where the web pages are created, usually a web root. + + ###################################################################### + # Description: LCP SUWGB + # Contact: Administrator + # System Name: LC-Bridge + # Location: Here + #..................................................................... + + TargetDevice's IP Address:Interface Number:Community:IP Address + + Target[10.10.10.1.1]: 1:public@10.10.10.1 + + This is the interface speed (Default is 10 megabits; for 100Mbit + devices use 12500000 and so on...) + + MaxBytes[10.10.10.1.1]: 1250000 + + Title[10.10.10.1.1]: LC-Bridge (sample.device): ether0 + + This section determines how the web page headers will look + + PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ether0(1)</TD></TR> + <TR><TD>IP:</TD><TD>sample.device(10.10.10.1)</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + Target[10.10.10.1.2]: 2:public@10.10.10.1 + MaxBytes[10.10.10.1.2]: 1250000 + Title[10.10.10.1.2]: LC-Bridge (): ulink0 + PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ulink0(2)</TD></TR> + <TR><TD>IP:</TD><TD>()</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + #--------------------------------------------------------------- + + And that's a very basic MRTG config file. You can run this and see your + results by going into the _c_:_\_m_r_t_g_-_2_._1_7_._7_\_b_i_n directory and typing: + + perl mrtg mrtg.cfg + + It is normal to get errors for the first two times you run this + command. The errors will alert you about the fact that there have not + been any log files in existence before. + + If you take a look at those web pages they are not very exciting (yet). + You need to have the MRTG files run every five minutes to produce the + desired results. Just run it again after a few minutes. You should now + be able to see the first lines in your graphs. + +MMAAKKEE MMRRTTGG RRUUNN AALLLL TTHHEE TTIIMMEE + Starting MRTG by hand every time you want to run it is not going to + make you happy I guess. + + There is a special option you can set in the MRTG configuration file so + so that MRTG will not terminate after it was started. Instead it will + wait for 5 minutes and then run again. + + Add the option + + RunAsDaemon: yes + + to your mrtg.cfg file and start it with: + + start /Dc:\mrtg-2.17.7\bin wperl mrtg --logging=eventlog mrtg.cfg + + If you use wwppeerrll instead of ppeerrll, no console window will show. MRTG is + now running in the background. If it runs into problems it will tell + you so over the EventLog. To stop MRTG, open the Task Manager and + terminate the wwppeerrll..eexxee process. If mrtg has anything to tell you these + messages can be found in the event log. + + If you put a shortcut with + + Target: wperl mrtg --logging=eventlog mrtg.cfg + Start in: c:\mrtg-2.17.7\bin + + into your start-up folder, MRTG will now start whenever you login to + your NT box. + + If you do not want to log into your box just to start MRTG. Have a look + at http://www.firedaemon.com/mrtg-howto.html which describes a free + tool to start any program as a Service. The pages gives specific + instructions for MRTG users. + +HHOOWW TTOO SSEETTUUPP MMRRTTGG AASS AA WWIINNDDOOWWSS SSEERRVVIICCEE + AAddddiittiioonnaall PPrreerreeqquuiissiitteess + +o MRTG must be installed and fully configured on the target system. + In the following exercise the assumption is that MRTG is installed + under c:\mrtg\ and all the sample files use this location. + + +o Microsoft Tools SSRRVVAANNYY..eexxee (Applications as Services Utility) and + IINNSSTTSSRRVV..eexxee (Service Installer) - Those files can be downloaded + from Microsoft as a part of Windows 2000 Resource Kit at + <http://www.microsoft.com/windows2000/techinfo/reskit/tools/default.asp>. + They are also available from other locations such as + <http://www.electrasoft.com/srvany/srvany.htm>, + <http://www.iopus.com/guides/srvany.htm>, etc. Detailed + instructions on how to use this package are available at + <http://support.microsoft.com/kb/q137890/>. In order to follow the + steps in this HOW-TO you MMUUSSTT obtain both executables. + + +o You must have administrative rights on the target system. + + PPrreeppaarraattiioonn + Please complete the following steps before starting the installation: + + +o Copy ssrrvvaannyy..eexxee and iinnssttssrrvv..eexxee to c:\mrtg-2.17.7\bin\ (your MRTG + bin directory). + + +o Create a file called mmrrttgg..rreegg anywhere on your system and paste the + following content into it: + + Windows Registry Editor Version 5.00 + + [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRTG\Parameters] + "Application"="c:\\perl\\bin\\wperl.exe" + "AppParameters"="c:\\mrtg-2.17.7\\bin\\mrtg --logging=eventlog c:\\mrtg-2.17.7\\bin\\mrtg.cfg" + "AppDirectory"="c:\\mrtg-2.17.7\\bin\\" + + SSeerrvviiccee IInnssttaallllaattiioonn + Once again, assuming that MRTG is already fully installed and + configured on the target system under c:\mrtg\ the following steps are + necessary to setup MRTG as a service. + + Using the command prompt go into the temporary directory where you + unzipped the package. When there type the following command to create + a service named "MRTG" in the Windows Services management console: + + instsrv MRTG c:\mrtg\bin\srvany.exe + + Now you need to create the AApppp** entries required for the new service. + You can do this by either right-clicking on the mrtg.reg file and + selecting 'merge' or by running the following command: + + regedit /s mrtg.reg + + After setting up the registry entry it is time to point it to your MRTG + installation. If you have installed MRTG under _c_:_\_m_r_t_g_\, you can skip + this step. Open your registry editor (Start -> Run -> regedt32), and + locate the [[HHKKEEYY__LLOOCCAALL__MMAACCHHIINNEE\\SSYYSSTTEEMM\\CCuurrrreennttCCoonnttrroollSSeett\\SSeerrvviicceess\\MMRRTTGG]] + key. Make sure that the IImmaaggeePPaatthh variable is correctly pointing to + ssrrvvaannyy..eexxee located in your MRTG bin directory (for example + c:\mrtg\bin\srvany.exe). Next you have to expand the MRTG tree, and go + to the + [[HHKKEEYY__LLOOCCAALL__MMAACCHHIINNEE\\SSYYSSTTEEMM\\CCuurrrreennttCCoonnttrroollSSeett\\SSeerrvviicceess\\MMRRTTGG\\PPaarraammeetteerrss]] + key. Under Parameters make sure that all the AApppplliiccaattiioonn variables + are setup properly. + + At this point you are ready to run the service. The only thing left to + do is to start the MRTG service in the Services management console. + After you do this, you should see two new processes running on your + system: srvany.exe and wperl.exe. Make sure to stop any previously + running MRTG processes to avoid conflict. + + Note that it is imperative to set the RRuunnAAssDDaaeemmoonn:: yyeess option or the + service will stop after just one single run! + +EEXXAAMMPPLLEE + Now lets look at a config file to monitor what we wanted to on our + mythical Cisco Cat 5000 -- utilization on ports 3, 5, 10, and 24, and + the CPU Load, which will show us nonstandard mrtg configurations as + well as more options.. + + WorkDir: c:\www\mrtg + RunAsDaemon: yes + + ###################################################################### + # Description: LCP SUWGB + # Contact: Administrator + # System Name: LC-Bridge + # Location: Here + #..................................................................... + + Target[10.10.10.1.1]: 3:public@10.10.10.1 + MaxBytes[10.10.10.1.1]: 1250000 + Title[10.10.10.1.1]: LC-Bridge (sample-device): ether0 + PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ether0(3)</TD></TR> + <TR><TD>IP:</TD><TD>sample-device(10.10.10.1)</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + #--------------------------------------------------------------- + + Target[10.10.10.1.2]: 5:public@10.10.10.1 + MaxBytes[10.10.10.1.2]: 1250000 + Title[10.10.10.1.2]: LC-Bridge (): ulink0 + PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ulink0(5)</TD></TR> + <TR><TD>IP:</TD><TD>()</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + #--------------------------------------------------------------- + + Target[10.10.10.1.1]: 10:public@10.10.10.1 + MaxBytes[10.10.10.1.1]: 1250000 + Title[10.10.10.1.1]: LC-Bridge (sample-device): ether0 + PageTop[10.10.10.1.1]: <H1>Traffic Analysis for ether0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ether0(10)</TD></TR> + <TR><TD>IP:</TD><TD>sample-device(10.10.10.1)</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + #--------------------------------------------------------------- + + Target[10.10.10.1.2]: 24:public@10.10.10.1 + MaxBytes[10.10.10.1.2]: 1250000 + Title[10.10.10.1.2]: LC-Bridge (): ulink0 + PageTop[10.10.10.1.2]: <H1>Traffic Analysis for ulink0</H1> + <TABLE> + <TR><TD>System:</TD><TD>LC-Bridge inAndover</TD></TR> + <TR><TD>Maintainer:</TD><TD>Administrator</TD></TR> + <TR><TD>Interface:</TD><TD>ulink0(24)</TD></TR> + <TR><TD>IP:</TD><TD>()</TD></TR> + <TR><TD>Max Speed:</TD> + <TD>1250.0 kBytes/s (ethernetCsmacd)</TD></TR> + </TABLE> + + #--------------------------------------------------------------- + + # Router CPU load % + Target[cpu.1]:1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:public@10.10.10.1 + RouterUptime[cpu.1]: public@10.10.10.1 + MaxBytes[cpu.1]: 100 + Title[cpu.1]: CPU LOAD + PageTop[cpu.1]: <H1>CPU Load %</H1> + Unscaled[cpu.1]: ymwd + ShortLegend[cpu.1]: % + XSize[cpu.1]: 380 + YSize[cpu.1]: 100 + YLegend[cpu.1]: CPU Utilization + Legend1[cpu.1]: CPU Utilization in % (Load) + Legend2[cpu.1]: CPU Utilization in % (Load) + Legend3[cpu.1]: + Legend4[cpu.1]: + LegendI[cpu.1]: + LegendO[cpu.1]: Usage + Options[cpu.1]: gauge + + This is a nice example of how to monitor any SNMP device if you know + what OID you want to use. Once again, for an explanation of the more + advance features of mrtg, please see the rest of the documentation. + +AAUUTTHHOORRSS + Tobi Oetiker <tobi@oetiker.ch>, David S. Divins <ddivins@moon.jic.com>, + Steve Pierce <MRTG@HDL.com>, Artyom Adjemov <one.bofh@gmail.com>, Ilja + Ivanov <ivanov@bseu.by> Karel Fajkus <http://fajkus.cz/> + + + +2.17.7 2018-07-13 MRTG-NT-GUIDE(1) diff --git a/doc/mrtg-nw-guide.1 b/doc/mrtg-nw-guide.1 new file mode 100644 index 0000000..1942a63 --- /dev/null +++ b/doc/mrtg-nw-guide.1 @@ -0,0 +1,537 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-NW-GUIDE 1" +.TH MRTG-NW-GUIDE 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-nw\-guide \- MRTG for NetWare +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +This guide is intended to aid in the installation and configuration of \s-1MRTG\s0 on a NetWare server. +.SH "OVERVIEW" +.IX Header "OVERVIEW" +\&\s-1MRTG\s0 is a relative newcomer to the NetWare platform. Earlier versions of NetWare could not run \s-1MRTG\s0 natively for +several reasons: +.IP "\(bu" 4 +Absence of NetWare \s-1OS\s0 support in the \s-1MRTG\s0 package. +.IP "\(bu" 4 +A NetWare server commandline length limitation. +.IP "\(bu" 4 +Absence of the Rateup executable (Rateup.nlm). +.IP "\(bu" 4 +A standard installation method. +.IP "\(bu" 4 +Problems with NetWare's implementation of Perl. +.PP +Support for the NetWare \s-1OS\s0 has now been fully added into \s-1MRTG,\s0 beginning with \s-1MRTG\s0 release 2.12.2. +.PP +Liberallly minded operating systems support a commandline length approaching 1000 characters. In such environments it +was an easy matter to pass the sometimes high number of parameters used by \s-1MRTG\s0's Rateup executable directly on the +commandline. Until NetWare 6.5, NetWare had a commandline limit of 512 characters. This limitation was also removed +for NetWare 6.0 by Service Pack 5. For other NetWare versions and earlier Service Packs, this limitation remains. To +permit a 'standard' interface for NetWare, the Rateup executable has been modified to also read its parameters from +a file, and the \s-1MRTG\s0 script has been modified to support this method on a NetWare platform. (See New Rateup Switch) +.PP +A Rateup \s-1NLM\s0 is now available, along with the necessary scripts to build it if required. See the NetWare Support +section of this document for further details. Additionally, mrtg.pl has been revised because of the unique (to NetWare) +name of executables (\s-1NLM\s0). +.PP +The absence of a specific installation procedure has caused \s-1MRTG\s0 to fail in the past because the Perl script could +not find or load the Rateup executable. The installation method supplied here will solve this problem for now. +.PP +The \s-1MRTG\s0.pl script in the 2.12.2 (or later) version of \s-1MRTG\s0 has been configured to suit all likely versions of +NetWare able to use Perl5, and bypasses all of the known problems with NetWare Perl running \s-1MRTG.\s0 +.SH "PREREQUISITES" +.IX Header "PREREQUISITES" +You will need the following: +.IP "\(bu" 4 +Perl 5.8.0 for NetWare with latest Perl Updates (February, 2005 or later; previous versions \s-1MAY\s0 work) +.IP "\(bu" 4 +NetWare 5.1 w/ \s-1SP8,\s0 NetWare 6.0 w/ \s-1SP5\s0 or NetWare 6.5 w/ \s-1SP2.\s0 +.IP "\(bu" 4 +A copy of the \s-1MRTG\s0 Package (v2.12.2 at time of writting) +.IP "\(bu" 4 +Three .ncf files to execute the Perl scripts at the NetWare server console. +.IP "\(bu" 4 +A copy of the Rateup \s-1NLM \s0(Pre-built or compiled) +.IP "\(bu" 4 +Optionally, any NetWare supported Web Server (Netscape, Apache 1.3 or 2.0) +.PP +For copies of the .ncf files and Rateup \s-1NLM,\s0 see NetWare Support in this document. +.SH "INSTALLING MRTG" +.IX Header "INSTALLING MRTG" +.IP "1." 4 +Install the latest Perl 5.8.x release on your server. See the Perl documentation for details. +.IP "2." 4 +Create the following directories: +.Sp +.Vb 10 +\& SYS:/Mrtg +\& SYS:/Mrtg/bin +\& SYS:/Mrtg/contrib (Optional for this document) +\& SYS:/Mrtg/doc (Optional for this document) +\& SYS:/Mrtg/html +\& SYS:/Mrtg/html/images +\& SYS:/Mrtg/html/work +\& SYS:/Mrtg/lib +\& SYS:/Mrtg/logs +\& SYS:/Mrtg/translate +.Ve +.IP "3." 4 +Copy from the \s-1MRTG\s0 package the following files: +.Sp +.Vb 1 +\& \ebin\e* to SYS:/Mrtg/bin All files. See Note 1. +.Ve +.Sp +Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker files. +The rateup.exe will \s-1NOT\s0 be needed on the NetWare server. +.Sp +.Vb 4 +\& \econtrib\e* to SYS:/Mrtg/contrib/ Include sub\-directories +\& \edoc\e* to SYS:/Mrtg/doc/ All files +\& \eimages\e* to SYS:/Mrtg/html/images/ All files +\& \etranslate\e* to SYS:/Mrtg/translate/ All files. See Note 2. +.Ve +.Sp +Note 2: For English-only language support, all \etranslate files \s-1EXCEPT\s0 Locales_mrtg may be deleted. +.Sp +.Vb 1 +\& \elib\e* to SYS:/Mrtg/lib Include sub\-directories. See Note 3. +.Ve +.Sp +Note 3: This will create the SYS:/Mrtg/lib/mrtg2 and ./pod directories. +.IP "4." 4 +Create copies of the three .ncf files and install them: +.Sp +.Vb 1 +\& *.ncf to SYS:/Mrtg/bin +.Ve +.Sp +See NetWare Support in this document for details on how to create copies of these files. +.IP "5." 4 +See Compiling Rateup.nlm"> in this document for details on compiling the Rateup \s-1NLM\s0 yourself if desired. +A prebuit verion is available in the .\emrtg\ebin directory where it must remain. +.SH "CONFIGURING MRTG" +.IX Header "CONFIGURING MRTG" +.IP "\(bu" 4 +Refer to Novell documentation on configuring and loading \s-1SNMP\s0 support on your server if this is the device to +be monitored. +.IP "\(bu" 4 +Edit sys:/mrtg/bin/MakeMrtgCfg.ncf: +.Sp +replace ccccc with the \s-1GET\s0 community name for the \s-1SNMP\s0 device (typically 'public'), +.Sp +replace ddddd with the \s-1DNS\s0 name or \s-1IP\s0 address of the device to be monitored. e.g public@www.myserver.com, public@10.202.65.180 +.Sp +Note 1: These are \s-1NOT\s0 mail addresses, they just look like one! +.Sp +Note 2: If multiple devices are to be monitored, add their entries to the same line: +.Sp +e.g perl cfgmaker.pl public@www.myserver.com public@10.202.65.180 > sys:/mrtg/bin/mrtg.cfg +.Sp +In this \*(L"Getting Started\*(R", it is 'suggested' to only monitor a single device. +.IP "\(bu" 4 +At the server console, run: +.Sp +.Vb 1 +\& sys:/mrtg/bin/MakeMrtgCfg.ncf +.Ve +.Sp +This will create Mrtg.cfg in sys:/mrtg/bin. +.IP "\(bu" 4 +Edit the Mrtg.cfg configuration file created in the previous step. Note the following: +.Sp +It was found, when testing \s-1MRTG\s0 on a NetWare 6.5 server using a \s-1NIC\s0 Interface, that mrtg.cfg contained +the following message: +.Sp +.Vb 5 +\& ### Interface 1 >> Descr: \*(AqIntel(R)\-8255x\-based\-Network\-Connection\*(Aq... +\& ### The following interface is commented out because: +\& ### * has a speed of 0 which makes no sense +\& # +\& ... +.Ve +.Sp +If this occurs, edit MakeMrtgCfg.ncf and add the following parameter as shown: +.Sp +.Vb 1 +\& perl sys:\emrtg\ebin\ecfgmaker.pl \-\-zero\-speed=nnn public@10.202.65.180 > sys:\emrtg\ebin\eMrtg.cfg +.Ve +.Sp +where \fBnnn\fR is the interface speed in bits per second. For a 100 Megabit \s-1LAN NIC,\s0 nnn = 10000000. It will be +necessary to re-execute the MakeMrtgCfg.ncf script before continuing with this section. +.Sp +Below line 16 (*** Global Defaults), add: +.Sp +.Vb 4 +\& HtmlDir: <a path> e.g HtmlDir: sys:/mrtg/html +\& ImageDir: <a path> e.g ImageDir: sys:/mrtg/html/work +\& LogDir: <a path> e.g LogDir: sys:/mrtg/logs +\& IconDir: <a path> e.g IconDir: ./images +.Ve +.Sp +Note 1. The HtmlDir entry specifies where \s-1MRTG\s0 will create its \s-1HTML\s0 pages. +.Sp +Note 2. The ImageDir entry specifies where the created graphic icons are placed. +.Sp +Note 3. The IconDir entry specifies where the supplied \s-1MRTG\s0 icons are located. +It \s-1MUST\s0 be a relative path from HtmlDir or absolute \s-1URL.\s0 The value shown +is recommended. +.IP "\(bu" 4 +At the server console run: +.Sp +.Vb 1 +\& sys:/mrtg/bin/RunMrtg.ncf +.Ve +.Sp +several times. By the third time it should run without showing error messages on the console screen. +.Sp +This should create. +.Sp +\&\- A \s-1HTML\s0 page in the (HtmlDir) directory for each monitored device, +.Sp +\&\- A .dat file in the (ImageDir) directory for each monitored device, +.Sp +\&\- Several .png icons in the (ImageDir) directory, +.Sp +\&\- Some log file entries in the (LogDir) directory. +.Sp +Note: If you experience a \*(L"Use of uninitialised value in split\*(R" error, it will be necessary to +create a 'Path' environment variable at the server console; use the following example +.Sp +.Vb 1 +\& env path="SYS:\e" (The actual value is immaterial, as long as the var itself exists.) +.Ve +.IP "\(bu" 4 +Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the indicated <path> shown in the following example to +match the value entered for (HtmlDir). +.Sp +.Vb 1 +\& perl \-\-noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html +.Ve +.IP "\(bu" 4 +Create an index.html page linking the seperate device \s-1HTML\s0 page(s). At the server console, run: +.Sp +.Vb 1 +\& sys:/mrtg/bin/MakeMrtgIndex.ncf +.Ve +.Sp +This will create index.html in the (HtmlDir) directory. +.IP "\(bu" 4 +Optionally, configure a Web Server to permit access to the directory specified in (HtmlDir) to view the \s-1MRTG\s0 +graphs remotely, at, for example: +.Sp +.Vb 1 +\& http://ip_or_dns/mrtg/index.html +.Ve +.Sp +A sample configuration for an Apache Webserver is shown: +.Sp +.Vb 6 +\& Alias /mrtg/ "SYS:/mrtg/html/" +\& <Directory "SYS:/mrtg/html"> +\& AllowOverride None +\& Order allow,deny +\& Allow from all +\& </Directory> +.Ve +.IP "\(bu" 4 +Set the property of the directory pointed to by (ImageDir), to 'Purge Immediate'. +.IP "\(bu" 4 +Finally, read the \s-1MRTG\s0 documentation for much more detailed configuration/usage information. +.PP +Welcome to \s-1MRTG\s0!! +.SH "MAKE MRTG RUN ALL THE TIME" +.IX Header "MAKE MRTG RUN ALL THE TIME" +\&\s-1MRTG\s0 can be made to run periodically by at least two means: +.IP "\(bu" 4 +Using \s-1CRON\s0 Scheduling +.IP "\(bu" 4 +Running \s-1MRTG\s0 in Daemon Mode +.SS "\s-1CRON\s0 Scheduling" +.IX Subsection "CRON Scheduling" +To use \s-1CRON\s0 scheduling, create a \s-1CRON\s0 Scheduler entry to execute the RunMrtg.ncf file on a frequency appropriate for +the server environment and information desired. The following entry in the sys:\eetc\ecrontab file will execute \s-1MRTG\s0 +every five minutes: +.PP +.Vb 1 +\& 0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\emrtg\ebin\erunmrtg.ncf +.Ve +.PP +The \s-1CRON\s0 Scheduler (cron.nlm) can be started automatically by adding it in \s-1AUTOEXEC\s0.ncf or, manually loading it at +the server console. +.SS "\s-1MRTG\s0 in Daemon Mode" +.IX Subsection "MRTG in Daemon Mode" +Refer to the MRTG-Reference document for information about the 'RunAsDaemon' option. Its use is outside the scope +of this document. +.SH "TROUBLESHOOTING" +.IX Header "TROUBLESHOOTING" +Read the \s-1MRTG\s0 documents, Perl documents or, finally, submit questions to the \s-1MRTG\s0 User forums. +.PP +For NetWare specific issues, submit questions to the Perl forum at +news://developer\-forums.novell.com/novell.devsup.perl (Novell Developer Forums). +.SH "COMPILING RATEUP.NLM" +.IX Header "COMPILING RATEUP.NLM" +In addition to the rateup.c and Makefile.Netware supplied with the \s-1MRTG\s0 release, you will also need: +.IP "\(bu" 4 +Metrowerks CodeWarrior with NetWare Support \s-1OR GCC\s0 Compiler (v3.0.3 or later) with NlmConv Utility +.IP "\(bu" 4 +Novell LibC \s-1NDK \s0(February 2004 or later) +.IP "\(bu" 4 +\&\s-1GD\s0 Graphics Library (v2.0.33 or later) +.IP "\(bu" 4 +LibPNG Graphics Library (v1.2.8 or later) +.IP "\(bu" 4 +ZLib Library (v1.2.3 or later) +.IP "\(bu" 4 +The get_ver.awk script +.IP "\(bu" 4 +A copy of the \s-1GNU\s0 build tools. (See http://sourceforge.net/projects/gnuwin32/) +.PP +The auxiliary libraries can be obtained from: +.PP +\&\s-1GD\s0 Graphics Library. (See http://www.boutell.com/gd/ ) +.PP +\&\s-1PNG\s0 Graphics Library. (See http://libpng.sourceforge.net/ ) +.PP +zLib Compression Library. (See http://www.gzip.org/zlib/ ) +.PP +Edit the Makefile.Netware file as required to match your installation paths; search +the file for the key word 'Edit'. +.SH "NETWARE SUPPORT" +.IX Header "NETWARE SUPPORT" +For copies of the \s-1NCF\s0 and get_ver.awk scripts, see Appendix. +.PP +For NetWare specific issues, submit questions to the Perl forum at +news://developer\-forums.novell.com/novell.devsup.perl (Novell Developer Forums). +.PP +To move the \s-1MRTG\s0 application to a volume other than \s-1SYS:\s0 you will need to edit the \s-1NCF\s0 +scripts provided plus the MRTG[.pl] script itself in two places. +.SH "NEW RATEUP SWITCH" +.IX Header "NEW RATEUP SWITCH" +The MRTG[.pl] script, when used on a NetWare platform, uses Rateup[.nlm] with the new +commandline switch: +.PP +.Vb 1 +\& RATEUP \-f filename +.Ve +.PP +where the filename parameter can include a leading path element. +.PP +The file format is exactly the same as that used on the commandline by other operating +systems, including the leading path and name of the Rateup \s-1NLM.\s0 +.SH "APPENDIX" +.IX Header "APPENDIX" +The Appendix includes 'copies' of the following files: +.IP "\(bu" 4 +The \s-1NCF\s0 files used during \s-1MRTG\s0 configuration, +.PP +To create copies of these files, simply 'cut and paste' into your favourite '\fBtext editor\fR' and save +under their respective names. You should remove the leading space from each line. +.PP +\fIMakeMrtgCfg.NCF\fR +.IX Subsection "MakeMrtgCfg.NCF" +.PP +.Vb 6 +\& # MakeMrtgCfg.NCF +\& # Purpose : Create the MRTG Configuration File +\& # Changed : 5/05/2005 New +\& # Located : SYS:MRTG\eBIN +\& # Set For : +\& # Params : +\& +\& # Edit this file and: +\& +\& # Replace ccccc with your device GET SNMP Community Name \- If unsure try \*(Aqpublic\*(Aq. +\& # Replace ddddd with your device IP (n.n.n.n) or domain name. +\& +\& perl \-\-noscreen sys:\emrtg\ebin\ecfgmaker.pl ccccc@ddddd > sys:\emrtg\ebin\eMrtg.cfg +\& +\& # +\& # End of MakeMrtgCfg.NCF +.Ve +.PP +\fIRunMrtg.NCF\fR +.IX Subsection "RunMrtg.NCF" +.PP +.Vb 6 +\& # RunMrtg.NCF +\& # Purpose : Run the MRTG Application +\& # Changed : 5/05/2005 New +\& # Located : SYS:MRTG\eBIN +\& # Set For : +\& # Params : +\& +\& # The paths are as per the examples recommended in "Getting Started". +\& +\& perl \-\-noscreen sys:\emrtg\ebin\emrtg.pl sys:\emrtg\ebin\emrtg.cfg +\& +\& # +\& # End of RunMrtg.NCF +.Ve +.PP +\fIMakeMrtgIndex.NCF\fR +.IX Subsection "MakeMrtgIndex.NCF" +.PP +.Vb 6 +\& # MakeMrtgIndex.NCF +\& # Purpose : Create the HTML Index File for MRTG HTML data pages +\& # Changed : 5/05/2005 New +\& # Located : SYS:MRTG\eBIN +\& # Set For : +\& # Params : +\& +\& # Note: Edit this file and change the redirected output to the location +\& # specified for HtmlDir or WorkDir. The sys:\eapache2\ehtdocs\emrtg\eindex.html +\& # is based on the examples in "Getting Started". +\& +\& perl \-\-noscreen sys:\emrtg\ebin\eindexmaker.pl sys:\emrtg\ebin\eMrtg.cfg > sys:\emrtg\ehtml\eindex.html +\& +\& # +\& # End of MakeMrtgIndex.NCF +.Ve +.SH "LICENSE" +.IX Header "LICENSE" +\&\s-1GNU\s0 General Public License +.SH "CREDITS" +.IX Header "CREDITS" +The \s-1MRTG\s0 for NetWare exists largely through the efforts of Guenter Knauf and feedback from beta testers. +.SH "AUTHOR" +.IX Header "AUTHOR" +Norm W.. diff --git a/src/doc/mrtg-nw-guide.pod b/doc/mrtg-nw-guide.pod index b83529a..b83529a 100644 --- a/src/doc/mrtg-nw-guide.pod +++ b/doc/mrtg-nw-guide.pod diff --git a/doc/mrtg-nw-guide.txt b/doc/mrtg-nw-guide.txt new file mode 100644 index 0000000..f026206 --- /dev/null +++ b/doc/mrtg-nw-guide.txt @@ -0,0 +1,408 @@ +MRTG-NW-GUIDE(1) mrtg MRTG-NW-GUIDE(1) + + + +NNAAMMEE + mrtg-nw-guide - MRTG for NetWare + +SSYYNNOOPPSSIISS + This guide is intended to aid in the installation and configuration of + MRTG on a NetWare server. + +OOVVEERRVVIIEEWW + MRTG is a relative newcomer to the NetWare platform. Earlier versions + of NetWare could not run MRTG natively for several reasons: + + +o Absence of NetWare OS support in the MRTG package. + + +o A NetWare server commandline length limitation. + + +o Absence of the Rateup executable (Rateup.nlm). + + +o A standard installation method. + + +o Problems with NetWare's implementation of Perl. + + Support for the NetWare OS has now been fully added into MRTG, + beginning with MRTG release 2.12.2. + + Liberallly minded operating systems support a commandline length + approaching 1000 characters. In such environments it was an easy matter + to pass the sometimes high number of parameters used by MRTG's Rateup + executable directly on the commandline. Until NetWare 6.5, NetWare had + a commandline limit of 512 characters. This limitation was also removed + for NetWare 6.0 by Service Pack 5. For other NetWare versions and + earlier Service Packs, this limitation remains. To permit a 'standard' + interface for NetWare, the Rateup executable has been modified to also + read its parameters from a file, and the MRTG script has been modified + to support this method on a NetWare platform. (See New Rateup Switch) + + A Rateup NLM is now available, along with the necessary scripts to + build it if required. See the NetWare Support section of this document + for further details. Additionally, mrtg.pl has been revised because of + the unique (to NetWare) name of executables (NLM). + + The absence of a specific installation procedure has caused MRTG to + fail in the past because the Perl script could not find or load the + Rateup executable. The installation method supplied here will solve + this problem for now. + + The MRTG.pl script in the 2.12.2 (or later) version of MRTG has been + configured to suit all likely versions of NetWare able to use Perl5, + and bypasses all of the known problems with NetWare Perl running MRTG. + +PPRREERREEQQUUIISSIITTEESS + You will need the following: + + +o Perl 5.8.0 for NetWare with latest Perl Updates (February, 2005 or + later; previous versions MAY work) + + +o NetWare 5.1 w/ SP8, NetWare 6.0 w/ SP5 or NetWare 6.5 w/ SP2. + + +o A copy of the MRTG Package (v2.12.2 at time of writting) + + +o Three .ncf files to execute the Perl scripts at the NetWare server + console. + + +o A copy of the Rateup NLM (Pre-built or compiled) + + +o Optionally, any NetWare supported Web Server (Netscape, Apache 1.3 + or 2.0) + + For copies of the .ncf files and Rateup NLM, see NetWare Support in + this document. + +IINNSSTTAALLLLIINNGG MMRRTTGG + 1. Install the latest Perl 5.8.x release on your server. See the Perl + documentation for details. + + 2. Create the following directories: + + SYS:/Mrtg + SYS:/Mrtg/bin + SYS:/Mrtg/contrib (Optional for this document) + SYS:/Mrtg/doc (Optional for this document) + SYS:/Mrtg/html + SYS:/Mrtg/html/images + SYS:/Mrtg/html/work + SYS:/Mrtg/lib + SYS:/Mrtg/logs + SYS:/Mrtg/translate + + 3. Copy from the MRTG package the following files: + + \bin\* to SYS:/Mrtg/bin All files. See Note 1. + + Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker + files. The rateup.exe will NOT be needed on the NetWare server. + + \contrib\* to SYS:/Mrtg/contrib/ Include sub-directories + \doc\* to SYS:/Mrtg/doc/ All files + \images\* to SYS:/Mrtg/html/images/ All files + \translate\* to SYS:/Mrtg/translate/ All files. See Note 2. + + Note 2: For English-only language support, all \translate files + EXCEPT Locales_mrtg may be deleted. + + \lib\* to SYS:/Mrtg/lib Include sub-directories. See Note 3. + + Note 3: This will create the SYS:/Mrtg/lib/mrtg2 and ./pod + directories. + + 4. Create copies of the three .ncf files and install them: + + *.ncf to SYS:/Mrtg/bin + + See NetWare Support in this document for details on how to create + copies of these files. + + 5. See Compiling Rateup.nlm"> in this document for details on + compiling the Rateup NLM yourself if desired. A prebuit verion is + available in the .\mrtg\bin directory where it must remain. + +CCOONNFFIIGGUURRIINNGG MMRRTTGG + +o Refer to Novell documentation on configuring and loading SNMP + support on your server if this is the device to be monitored. + + +o Edit sys:/mrtg/bin/MakeMrtgCfg.ncf: + + replace ccccc with the GET community name for the SNMP device + (typically 'public'), + + replace ddddd with the DNS name or IP address of the device to be + monitored. e.g public@www.myserver.com, public@10.202.65.180 + + Note 1: These are NOT mail addresses, they just look like one! + + Note 2: If multiple devices are to be monitored, add their entries + to the same line: + + e.g perl cfgmaker.pl public@www.myserver.com public@10.202.65.180 + > sys:/mrtg/bin/mrtg.cfg + + In this "Getting Started", it is 'suggested' to only monitor a + single device. + + +o At the server console, run: + + sys:/mrtg/bin/MakeMrtgCfg.ncf + + This will create Mrtg.cfg in sys:/mrtg/bin. + + +o Edit the Mrtg.cfg configuration file created in the previous step. + Note the following: + + It was found, when testing MRTG on a NetWare 6.5 server using a NIC + Interface, that mrtg.cfg contained the following message: + + ### Interface 1 >> Descr: 'Intel(R)-8255x-based-Network-Connection'... + ### The following interface is commented out because: + ### * has a speed of 0 which makes no sense + # + ... + + If this occurs, edit MakeMrtgCfg.ncf and add the following + parameter as shown: + + perl sys:\mrtg\bin\cfgmaker.pl --zero-speed=nnn public@10.202.65.180 > sys:\mrtg\bin\Mrtg.cfg + + where nnnnnn is the interface speed in bits per second. For a 100 + Megabit LAN NIC, nnn = 10000000. It will be necessary to re-execute + the MakeMrtgCfg.ncf script before continuing with this section. + + Below line 16 (*** Global Defaults), add: + + HtmlDir: <a path> e.g HtmlDir: sys:/mrtg/html + ImageDir: <a path> e.g ImageDir: sys:/mrtg/html/work + LogDir: <a path> e.g LogDir: sys:/mrtg/logs + IconDir: <a path> e.g IconDir: ./images + + Note 1. The HtmlDir entry specifies where MRTG will create its HTML + pages. + + Note 2. The ImageDir entry specifies where the created graphic + icons are placed. + + Note 3. The IconDir entry specifies where the supplied MRTG icons + are located. It MUST be a relative path from HtmlDir or absolute + URL. The value shown is recommended. + + +o At the server console run: + + sys:/mrtg/bin/RunMrtg.ncf + + several times. By the third time it should run without showing + error messages on the console screen. + + This should create. + + - A HTML page in the (HtmlDir) directory for each monitored device, + + - A .dat file in the (ImageDir) directory for each monitored + device, + + - Several .png icons in the (ImageDir) directory, + + - Some log file entries in the (LogDir) directory. + + Note: If you experience a "Use of uninitialised value in split" + error, it will be necessary to create a 'Path' environment variable + at the server console; use the following example + + env path="SYS:\" (The actual value is immaterial, as long as the var itself exists.) + + +o Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the indicated <path> + shown in the following example to match the value entered for + (HtmlDir). + + perl --noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html + + +o Create an index.html page linking the seperate device HTML page(s). + At the server console, run: + + sys:/mrtg/bin/MakeMrtgIndex.ncf + + This will create index.html in the (HtmlDir) directory. + + +o Optionally, configure a Web Server to permit access to the + directory specified in (HtmlDir) to view the MRTG graphs remotely, + at, for example: + + http://ip_or_dns/mrtg/index.html + + A sample configuration for an Apache Webserver is shown: + + Alias /mrtg/ "SYS:/mrtg/html/" + <Directory "SYS:/mrtg/html"> + AllowOverride None + Order allow,deny + Allow from all + </Directory> + + +o Set the property of the directory pointed to by (ImageDir), to + 'Purge Immediate'. + + +o Finally, read the MRTG documentation for much more detailed + configuration/usage information. + + Welcome to MRTG!! + +MMAAKKEE MMRRTTGG RRUUNN AALLLL TTHHEE TTIIMMEE + MRTG can be made to run periodically by at least two means: + + +o Using CRON Scheduling + + +o Running MRTG in Daemon Mode + + CCRROONN SScchheedduulliinngg + To use CRON scheduling, create a CRON Scheduler entry to execute the + RunMrtg.ncf file on a frequency appropriate for the server environment + and information desired. The following entry in the sys:\etc\crontab + file will execute MRTG every five minutes: + + 0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf + + The CRON Scheduler (cron.nlm) can be started automatically by adding it + in AUTOEXEC.ncf or, manually loading it at the server console. + + MMRRTTGG iinn DDaaeemmoonn MMooddee + Refer to the MRTG-Reference document for information about the + 'RunAsDaemon' option. Its use is outside the scope of this document. + +TTRROOUUBBLLEESSHHOOOOTTIINNGG + Read the MRTG documents, Perl documents or, finally, submit questions + to the MRTG User forums. + + For NetWare specific issues, submit questions to the Perl forum at + news://developer-forums.novell.com/novell.devsup.perl (Novell Developer + Forums). + +CCOOMMPPIILLIINNGG RRAATTEEUUPP..NNLLMM + In addition to the rateup.c and Makefile.Netware supplied with the MRTG + release, you will also need: + + +o Metrowerks CodeWarrior with NetWare Support OR GCC Compiler (v3.0.3 + or later) with NlmConv Utility + + +o Novell LibC NDK (February 2004 or later) + + +o GD Graphics Library (v2.0.33 or later) + + +o LibPNG Graphics Library (v1.2.8 or later) + + +o ZLib Library (v1.2.3 or later) + + +o The get_ver.awk script + + +o A copy of the GNU build tools. (See + http://sourceforge.net/projects/gnuwin32/) + + The auxiliary libraries can be obtained from: + + GD Graphics Library. (See http://www.boutell.com/gd/ ) + + PNG Graphics Library. (See http://libpng.sourceforge.net/ ) + + zLib Compression Library. (See http://www.gzip.org/zlib/ ) + + Edit the Makefile.Netware file as required to match your installation + paths; search the file for the key word 'Edit'. + +NNEETTWWAARREE SSUUPPPPOORRTT + For copies of the NCF and get_ver.awk scripts, see Appendix. + + For NetWare specific issues, submit questions to the Perl forum at + news://developer-forums.novell.com/novell.devsup.perl (Novell Developer + Forums). + + To move the MRTG application to a volume other than SYS: you will need + to edit the NCF scripts provided plus the MRTG[.pl] script itself in + two places. + +NNEEWW RRAATTEEUUPP SSWWIITTCCHH + The MRTG[.pl] script, when used on a NetWare platform, uses + Rateup[.nlm] with the new commandline switch: + + RATEUP -f filename + + where the filename parameter can include a leading path element. + + The file format is exactly the same as that used on the commandline by + other operating systems, including the leading path and name of the + Rateup NLM. + +AAPPPPEENNDDIIXX + The Appendix includes 'copies' of the following files: + + +o The NCF files used during MRTG configuration, + + To create copies of these files, simply 'cut and paste' into your + favourite 'tteexxtt eeddiittoorr' and save under their respective names. You + should remove the leading space from each line. + + _M_a_k_e_M_r_t_g_C_f_g_._N_C_F + + # MakeMrtgCfg.NCF + # Purpose : Create the MRTG Configuration File + # Changed : 5/05/2005 New + # Located : SYS:MRTG\BIN + # Set For : + # Params : + + # Edit this file and: + + # Replace ccccc with your device GET SNMP Community Name - If unsure try 'public'. + # Replace ddddd with your device IP (n.n.n.n) or domain name. + + perl --noscreen sys:\mrtg\bin\cfgmaker.pl ccccc@ddddd > sys:\mrtg\bin\Mrtg.cfg + + # + # End of MakeMrtgCfg.NCF + + _R_u_n_M_r_t_g_._N_C_F + + # RunMrtg.NCF + # Purpose : Run the MRTG Application + # Changed : 5/05/2005 New + # Located : SYS:MRTG\BIN + # Set For : + # Params : + + # The paths are as per the examples recommended in "Getting Started". + + perl --noscreen sys:\mrtg\bin\mrtg.pl sys:\mrtg\bin\mrtg.cfg + + # + # End of RunMrtg.NCF + + _M_a_k_e_M_r_t_g_I_n_d_e_x_._N_C_F + + # MakeMrtgIndex.NCF + # Purpose : Create the HTML Index File for MRTG HTML data pages + # Changed : 5/05/2005 New + # Located : SYS:MRTG\BIN + # Set For : + # Params : + + # Note: Edit this file and change the redirected output to the location + # specified for HtmlDir or WorkDir. The sys:\apache2\htdocs\mrtg\index.html + # is based on the examples in "Getting Started". + + perl --noscreen sys:\mrtg\bin\indexmaker.pl sys:\mrtg\bin\Mrtg.cfg > sys:\mrtg\html\index.html + + # + # End of MakeMrtgIndex.NCF + +LLIICCEENNSSEE + GNU General Public License + +CCRREEDDIITTSS + The MRTG for NetWare exists largely through the efforts of Guenter + Knauf and feedback from beta testers. + +AAUUTTHHOORR + Norm W.. + + + +2.17.7 2018-07-13 MRTG-NW-GUIDE(1) diff --git a/src/doc/mrtg-r.gif b/doc/mrtg-r.gif Binary files differindex cc19bd6..cc19bd6 100644 --- a/src/doc/mrtg-r.gif +++ b/doc/mrtg-r.gif diff --git a/src/doc/mrtg-r.png b/doc/mrtg-r.png Binary files differindex a753c6a..a753c6a 100644 --- a/src/doc/mrtg-r.png +++ b/doc/mrtg-r.png diff --git a/doc/mrtg-reference.1 b/doc/mrtg-reference.1 new file mode 100644 index 0000000..ea403cc --- /dev/null +++ b/doc/mrtg-reference.1 @@ -0,0 +1,2437 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-REFERENCE 1" +.TH MRTG-REFERENCE 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-reference \- MRTG 2.17.7 configuration reference +.SH "OVERVIEW" +.IX Header "OVERVIEW" +The runtime behaviour of \s-1MRTG\s0 is governed by a configuration file. +Run-of-the-mill configuration files can be generated with \fBcfgmaker\fR. +(Check cfgmaker). But for more elaborate configurations some hand-tuning +is required. +.PP +This document describes all the configuration options understood by +the mrtg software. +.SH "SYNTAX" +.IX Header "SYNTAX" +\&\s-1MRTG\s0 configuration file syntax follows some simple rules: +.IP "\(bu" 4 +Keywords must start at the beginning of a line. +.IP "\(bu" 4 +Lines which follow a keyword line which start +with a blank are appended to the keyword line +.IP "\(bu" 4 +Empty Lines are ignored +.IP "\(bu" 4 +Lines starting with a # sign are comments. +.IP "\(bu" 4 +You can add other files into the configuration file using +.Sp +\&\fBInclude:\fR \fIfile\fR +.Sp +Example: +.Sp +.Vb 1 +\& Include: base\-options.inc +.Ve +.Sp +If included files are specified with relative paths, both the current +working directory and the directory containing the main config file will +be searched for the files. The current working directory will be searched +first. +.Sp +If the included filename contains an asterisk, then this is taken as a +wildcard for zero or more characters, and all matching files are included. +Thus, you can use this statement to include all files in a specified +subdirectory. +.Sp +Example: +.Sp +.Vb 1 +\& Include: servers/*.cfg +.Ve +.Sp +In this case, you should be very careful that your wildcard pattern does not +find a match relative to the current working directory if you mean it to be +relative to the main config file directory, since the working directory is +checked for a match first (as with a normal Include directive). Therefore, +use of something like '*/*' is discouraged. +.SH "GLOBAL KEYWORDS" +.IX Header "GLOBAL KEYWORDS" +.SS "WorkDir" +.IX Subsection "WorkDir" +WorkDir specifies where the logfiles and the webpages should +be created. +.PP +Example: +.PP +.Vb 1 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +.Ve +.SH "OPTIONAL GLOBAL KEYWORDS" +.IX Header "OPTIONAL GLOBAL KEYWORDS" +.SS "HtmlDir" +.IX Subsection "HtmlDir" +HtmlDir specifies the directory where the html (or shtml, +but we'll get on to those later) lives. +.PP +\&\s-1NOTE:\s0 Workdir overrides the settings for htmldir, imagedir +and logdir. +.PP +Example: +.PP +.Vb 1 +\& Htmldir: /www/mrtg/ +.Ve +.SS "ImageDir" +.IX Subsection "ImageDir" +ImageDir specifies the directory where the images live. They +should be under the html directory. +.PP +Example: +.PP +.Vb 1 +\& Imagedir: /www/mrtg/images +.Ve +.SS "LogDir" +.IX Subsection "LogDir" +LogDir specifies the directory where the logs are stored. +This need not be under htmldir directive. +.PP +Example: +.PP +.Vb 1 +\& Logdir: /www/mrtg/logs +.Ve +.SS "Forks (\s-1UNIX\s0 only)" +.IX Subsection "Forks (UNIX only)" +With system that supports fork (\s-1UNIX\s0 for example), mrtg can fork itself into multiple +instances while it is acquiring data via snmp. +.PP +For situations with high latency or a great number of devices +this will speed things up considerably. It will not make things faster, +though, if you query a single switch sitting next door. +.PP +As far as I know \s-1NT\s0 can not fork so this option is not available on \s-1NT.\s0 +.PP +Example: +.PP +.Vb 1 +\& Forks: 4 +.Ve +.SS "EnableIPv6" +.IX Subsection "EnableIPv6" +When set to yes, IPv6 support is enabled if the required libraries are +present (see the mrtg\-ipv6 manpage). When IPv6 is enabled, mrtg can talk +to routers using \s-1SNMP\s0 over IPv6 and targets may be specified by their +numeric IPv6 addresses as well as by hostname or IPv4 address. +.PP +If IPv6 is enabled and the target is a hostname, mrtg will try to resolve +the hostname to an IPv6 address and, if this fails, to an IPv4 address. +Note that mrtg will only use IPv4 if you specify an IPv4 address or a +hostname with no corresponding IPv6 address; it will not fall back to IPv4 +if it simply fails to communicate with the target using IPv6. This is by +design. +.PP +Note that many routers do not currently support \s-1SNMP\s0 over IPv6. Use the +\&\fIIPv4Only\fR per target option for these routers. +.PP +IPv6 is disabled by default. +.PP +Example: +.PP +.Vb 1 +\& EnableIPv6: Yes +.Ve +.SS "EnableSnmpV3" +.IX Subsection "EnableSnmpV3" +When set to yes, uses the Net::SNMP module instead of the \s-1SNMP_SESSION\s0 module for +generating snmp queries. This allows the use of SNMPv3 if other snmpv3 parameters +are set. +.PP +SNMPv3 is disabled by default. +.PP +Example: +.PP +.Vb 1 +\& EnableSnmpV3: yes +.Ve +.SS "Refresh" +.IX Subsection "Refresh" +How many seconds apart should the browser (Netscape) be +instructed to reload the page? If this is not defined, the +default is 300 seconds (5 minutes). +.PP +Example: +.PP +.Vb 1 +\& Refresh: 600 +.Ve +.SS "Interval" +.IX Subsection "Interval" +How often do you call mrtg? The default is 5 minutes. If +you call it less often, you should specify it here. +This does two things: +.IP "\(bu" 4 +The generated \s-1HTML\s0 page contains the right +information about the calling interval ... +.IP "\(bu" 4 +A \s-1META\s0 header in the generated \s-1HTML\s0 page will instruct +caches about the time-to-live of this page ..... +.PP +In this example, we tell mrtg that we will be calling it +every 10 minutes. If you are calling mrtg every 5 +minutes, you can leave this line commented out. +.PP +Example: +.PP +.Vb 1 +\& Interval: 10 +.Ve +.PP +Note that unless you are using rrdtool you can not set Interval to less +than 5 minutes. If you are using rrdtool you can set interval in the format +.PP +.Vb 1 +\& Interval: MM[:SS] +.Ve +.PP +Down to 1 second. Note though, setting the Interval for an rrdtool/mrtg +setup will influence the initial creation of the database. If you change the +interval later, all existing databases will remain at the resolution they +were initially created with. Also note that you must make sure that your +mrtg-rrd Web-frontend can deal with this kind of Interval setting. +.SS "MaxAge" +.IX Subsection "MaxAge" +\&\s-1MRTG\s0 relies heavily on the real time clock of your computer. If the time is +set to a wrong value, especially if it is advanced far into the future, +this will cause mrtg to expire lots of supposedly old data from the log files. +.PP +To prevent this, you can add a 'reasonability' check by specifying a maximum +age for log files. If a file seems to be older, mrtg will not touch it but +complain instead, giving you a chance to investigate the cause. +.PP +Example: +.PP +.Vb 1 +\& MaxAge: 7200 +.Ve +.PP +The example above will make mrtg refuse to update log files older than 2 +hours (7200 seconds). +.SS "WriteExpires" +.IX Subsection "WriteExpires" +With this switch mrtg will generate .meta files for \s-1CERN\s0 +and Apache servers which contain Expiration tags for the +html and gif files. The *.meta files will be created in +the same directory as the other files, so you will have +to set \*(L"MetaDir .\*(R" and \*(L"MetaFiles on\*(R" +in your apache.conf or .htaccess file for this to work +.PP +\&\s-1NOTE:\s0 If you are running Apache\-1.2 or later, you can use the mod_expire +to achieve the same effect ... see the file htaccess.txt +.PP +Example: +.PP +.Vb 1 +\& WriteExpires: Yes +.Ve +.SS "NoMib2" +.IX Subsection "NoMib2" +Normally we ask the \s-1SNMP\s0 device for 'sysUptime' and 'sysName' properties. +Some do not have these. If you want to avoid getting complaints from +mrtg about these missing properties, specify the nomib2 option. +.PP +An example of agents which do not implement base mib2 attributes are +Computer Associates \- Unicenter \s-1TNG\s0 Agents. \s-1CA\s0 relies on using the base +\&\s-1OS SNMP\s0 agent in addition to its own agents to supplement the management +of a system. +.PP +Example: +.PP +.Vb 1 +\& NoMib2: Yes +.Ve +.SS "SingleRequest" +.IX Subsection "SingleRequest" +Some \s-1SNMP\s0 implementations can not deal with requests asking for +multiple snmp variables in one go. Set this in your cfg file to force +mrtg to only ask for one variable per request. +.PP +Examples +.PP +.Vb 1 +\& SingleRequest: Yes +.Ve +.SS "SnmpOptions" +.IX Subsection "SnmpOptions" +Apart from the per target timeout options, you can also configure the +behaviour of the snmpget process on a more profound level. SnmpOptions +accepts a hash of options. The following options are currently supported: +.PP +.Vb 7 +\& timeout => $default_timeout, +\& retries => $default_retries, +\& backoff => $default_backoff, +\& default_max_repetitions => $max_repetitions, +\& use_16bit_request_ids => 1, +\& lenient_source_port_matching => 0, +\& lenient_source_address_matching => 1 +.Ve +.PP +The values behind the options indicate the current default value. +Note that these settings \s-1OVERRIDE\s0 the per target timeout settings. +.PP +A per-target SnmpOptions[] keyword will override the global settings. +That keyword is primarily for SNMPv3. +.PP +The 16bit request ids are the only way to query the broken \s-1SNMP\s0 +implementation of \s-1SMC\s0 Barricade routers. +.PP +Example: +.PP +.Vb 1 +\& SnmpOptions: retries => 2, only_ip_address_matching => 0 +.Ve +.PP +Note that \s-1AS/400\s0 snmp seems to be broken in a way which prevents mrtg from +working with it unless +.PP +.Vb 1 +\& SnmpOptions: lenient_source_port_matching => 1 +.Ve +.PP +is set. +.SS "IconDir" +.IX Subsection "IconDir" +If you want to keep the mrtg icons in someplace other than the +working (or imagedir) directory, use the \fIIconDir\fR variable for +defining the url of the icons directory. +.PP +Example: +.PP +.Vb 1 +\& IconDir: /mrtgicons/ +.Ve +.SS "LoadMIBs" +.IX Subsection "LoadMIBs" +Load the \s-1MIB\s0 file(s) specified and make its OIDs available as +symbolic names. For better efficiancy, a cache of MIBs is maintained +in the WorkDir. +.PP +Example: +.PP +.Vb 1 +\& LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib +.Ve +.SS "Language" +.IX Subsection "Language" +Switch output format to the selected Language (Check the \fItranslate\fR directory +to see which languages are supported at the moment. In this directory you +can also find instructions on how to create new translations). +.PP +Currently the following laguages are supported: +.PP +big5 +brazilian +bulgarian +catalan +chinese +croatian +czech +danish +dutch +eucjp +french +galician +gb +gb2312 +german +greek +hungarian +icelandic +indonesia +iso2022jp +italian +korean +lithuanian +malay +norwegian +polish +portuguese +romanian +russian +russian1251 +serbian +slovak +slovenian +spanish +swedish +turkish +ukrainian +.PP +Example: +.PP +.Vb 1 +\& Language: danish +.Ve +.SS "LogFormat" +.IX Subsection "LogFormat" +Setting LogFormat to 'rrdtool' in your mrtg.cfg file enables rrdtool mode. +In rrdtool mode, mrtg relies on \fBrrdtool\fR to do its logging. See mrtg-rrd. +.PP +Example: +.PP +.Vb 1 +\& LogFormat: rrdtool +.Ve +.SS "LibAdd" +.IX Subsection "LibAdd" +If you are using rrdtool mode and your \fBrrdtool\fR Perl module (RRDs.pm) +is not installed in a location where perl can find it on its own, you can +use LibAdd to supply an appropriate path. +.PP +Example: +.PP +.Vb 1 +\& LibAdd: /usr/local/rrdtool/lib/perl/ +.Ve +.SS "PathAdd" +.IX Subsection "PathAdd" +If the \fBrrdtool\fR executable can not be found in the normal \f(CW\*(C`PATH\*(C'\fR, you can +use this keyword to add a suitable directory to your path. +.PP +Example: +.PP +.Vb 1 +\& PathAdd: /usr/local/rrdtool/bin/ +.Ve +.SS "RRDCached" +.IX Subsection "RRDCached" +If you are running RRDTool 1.4 or later with \fBrrdcached\fR, then you can +configure \s-1MRTG\s0 to take advantage of this for updates, either by using the +\&\s-1RRDCACHED_ADDRESS\s0 environment variable, or by setting the RRDCached keyword +in the configuration file. Note that, if both are set, the configuration file +keyword will take precedence. +.PP +Only \s-1UNIX\s0 domain sockets are fully supported prior to RRDTool v1.5, and +you should note that using RRDCached mode will disable all Threshold checking +normally done by \s-1MRTG. \s0 Appropriate warning messages will be printed if +necessary. +.PP +Examples: +.PP +.Vb 1 +\& RRDCached: unix:/var/tmp/rrdcached.sock +\& +\& RRDCached: localhost:42217 +.Ve +.SS "RunAsDaemon" +.IX Subsection "RunAsDaemon" +The RunAsDaemon keyword enables daemon mode operation. The purpose of daemon +mode is that \s-1MRTG\s0 is launched once and not repeatedly (as it is with cron). +This behavior saves computing resourses as loading and parsing +of configuration files happens only once on startup, and if the configuration +file is modified. +.PP +Using daemon mode \s-1MRTG\s0 itself is responible for timing the measurement +intervals. Therfore its important to set the Interval keyword to an +apropiate value. +.PP +Note that when using daemon mode \s-1MRTG\s0 should no longer be started from cron +as each new process runs forever. Instead \s-1MRTG\s0 should be +started from the command prompt or by a system startup script. +.PP +If you want mrtg to run under a particular user and group (it is not +recomended to run \s-1MRTG\s0 as root) then you can use the \fB\-\-user=\fR\fIuser_name\fR +and \fB\-\-group=\fR\fIgroup_name\fR options on the mrtg commandline. +.PP +.Vb 1 +\& mrtg \-\-user=mrtg_user \-\-group=mrtg_group mrtg.cfg +.Ve +.PP +Also note that in daemon mode restarting the process is required in order to +activate changes in the config file. +.PP +Under \s-1UNIX,\s0 the Daemon switch causes mrtg to fork into background after +checking its config file. On Windows \s-1NT\s0 the \s-1MRTG\s0 process will detach from +the console, but because the \s-1NT/2000\s0 shell waits for its children you have to +use this special start sequence when you launch the program: +.PP +.Vb 1 +\& start /b perl mrtg mrtg.cfg +.Ve +.PP +You may have to add path information equal to what you add when you run mrtg +from the commandline. +.PP +Example +.PP +.Vb 2 +\& RunAsDaemon: Yes +\& Interval: 5 +.Ve +.PP +This makes \s-1MRTG\s0 run as a daemon beginning data collection every 5 minutes +.PP +If you are daemontools and still want to run mrtg as a daemon you can +additionally specify +.PP +.Vb 1 +\& NoDetach: Yes +.Ve +.PP +this will make mrtg run but without detaching it from the terminal. +.PP +If the modification date on the configuration file changes during operation, +then \s-1MRTG\s0 will re-read the configuration on the next polling cycle. Note that +sub-files which are included from the main configuration do not have their +modification times monitored, only the top-level file is so checked. +.SS "ConversionCode" +.IX Subsection "ConversionCode" +Some devices may produce non-numeric values that would nevertheless +be useful to graph with \s-1MRTG\s0 if those values could be converted to numbers. +The ConversionCode keyword specifies the path to a file containing Perl code +to perform such conversions. The code in this file must consist of one or more +Perl subroutines. Each subroutine must accept a single string argument and +return a single numeric value. When RRDtool is in use, a decimal value may +be returned. When the name of one of these subroutines is specified in a +target definition (see below), \s-1MRTG\s0 calls it twice for that target, once to +convert the the input value being monitored and a second time to convert the +output value. The subroutine must return an undefined value if the conversion +fails. In case of failure, a warning may be posted to the \s-1MRTG\s0 log file using +Perl's warn function. \s-1MRTG\s0 imports the subroutines into a separate name space +(package MRTGConversion), so the user need not worry about pollution of \s-1MRTG\s0's +global name space. \s-1MRTG\s0 automatically prepends this package declaration to +the user-supplied code. +.PP +Example: Suppose a particular \s-1OID\s0 returns a character string whose length is +proportional to the value to be monitored. To convert this string to a +number that can be graphed by \s-1MRTG,\s0 create a file arbitrarily named +\&\*(L"MyConversions.pl\*(R" containing the following code: +.PP +.Vb 5 +\& # Return the length of the string argument +\& sub Length2Int { +\& my $value = shift; +\& return length( $value ); +\& } +.Ve +.PP +Then include the following global keyword in the \s-1MRTG\s0 configuration file +(assuming that the conversion code file is saved in the mrtg/bin directory +along with mrtg itself): +.PP +.Vb 1 +\& ConversionCode: MyConversions.pl +.Ve +.PP +This will cause \s-1MRTG\s0 to include the definition of the subroutine Length2Int +in its execution environment. Length2Int can then be invoked on any target +by appending \*(L"|Length2Int\*(R" to the target definition as follows: +.PP +.Vb 1 +\& Target[myrouter]: 1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.1:public@mydevice|Length2Int +.Ve +.PP +See \*(L"Extended Host Name Syntax\*(R" below for complete target definition syntax +information. +.SS "SendToGraphite" +.IX Subsection "SendToGraphite" +If you want to send a copy of the collected data into a Graphite database in addition +to storing it in the RRDfile, you can provide your Graphite database name/ip and port +number here. +.PP +This requires the Net::Graphite perl module which is available from \s-1CPAN.\s0 +.PP +Examples: +.PP +.Vb 2 +\& # If your Graphite receiver is running on the same host as the MRTG daemon and using the default port +\& SendToGraphite: 127.0.0.1,2003 +\& +\& # If your Graphite receiver is running on 192.168.100.50 port 5000 +\& SendToGraphite: 192.168.100.50,5000 +\& +\& # If your Graphite receiver is running on graphite.mydomain.com port 2003 +\& SendToGraphite: graphite.mydomain.com,2003 +.Ve +.PP +Graphite's namespace has a number of restrictions on what characters are +allowed. The SendToGraphite functionality makes an attempt to convert the \s-1MRTG \s0 +target name and, if specified, the Legendi and Legendo values to Graphite namespace +friendly values. Specifically, the following conversion rules apply: +.IP "\(bu" 4 +Underscores in the target_name are converted to periods which are Graphite namespace delimiters. +.IP "\(bu" 4 +Comma characters are not allowed so they are removed. +.IP "\(bu" 4 +The string \*(L"m2g\*(R" for \s-1MRTG\s0 to Graphite is prepended onto the Graphite namespace variable. +.PP +Example \s-1MRTG\s0 target to Graphite namespace conversion: +.PP +.Vb 2 +\& # Our MRTG target name from mrtg.cfg is as follows +\& Target[switch_GigabitEthernet0_5]: \eGigabitEthernet0/5:public1@switch:::::2 +.Ve +.PP +After the conversion you will end up with these Graphite namespace values +.PP +.Vb 2 +\& m2g.switch.gigabitethernet0.5.in +\& m2g.switch.gigabitethernet0.5.out +.Ve +.PP +Next is a more complicated example because Legendi and Legendo are in use to denote min and max +voltage values that pertain to some \s-1APC UPS SNMP\s0 OIDs +.PP +.Vb 4 +\& # Target, Legendi, and Legendo are specified in mrtg.cfg as follows +\& Target[apc_minmaxline]: 1.3.6.1.4.1.318.1.1.1.3.2.3.0&1.3.6.1.4.1.318.1.1.1.3.2.2.0:public@apc: +\& LegendI[apc_minmaxline]: upsAdvInputMinLineVoltage +\& LegendO[apc_minmaxline]: upsAdvInputMaxLineVoltage +.Ve +.PP +After the conversion you will end up with these Graphite namespace values +.PP +.Vb 2 +\& m2g.apc.minmaxline.upsAdvInputMinLineVoltage +\& m2g.apc.minmaxline.upsAdvInputMaxLineVoltage +.Ve +.PP +If you don't see the data showing up in Graphite, chances are there are invalid characters in +the namespace. To debug this, use the DEBUG=qw(log) directive at the top of the \s-1MRTG\s0 script +to find out what is happening with the \s-1MRTG\s0 to Graphite namespace conversion. +.PP +DEBUG=qw(log) will generate some output similar to what appears below +.PP +.Vb 2 +\& 2016\-10\-13 06:08:39 \-\- \-\-log: RRDs::update(/var/www/mrtg/switch/switch_gigabitethernet0_5.rrd, \*(Aq1476356919:2738746035:2927936327\*(Aq) +\& 2016\-10\-13 06:08:39 \-\- \-\-log: graphite\->send(m2g.switch.gigabitethernet0.5.in,2738746035,1476356919) +\& +\& 2016\-10\-13 06:08:39 \-\- \-\-log: graphite\->send(m2g.switch.gigabitethernet0.5.out,2927936327,1476356919) +\& +\& 2016\-10\-13 06:09:25 \-\- \-\-log: RRDs::update(/var/www/mrtg/apc/apc_minmaxline.rrd, \*(Aq1476356965:122:123\*(Aq) +\& 2016\-10\-13 06:09:25 \-\- \-\-log: graphite\->send(m2g.apc.minmaxline.upsAdvInputMinLineVoltage,122,1476356965) +\& +\& 2016\-10\-13 06:09:25 \-\- \-\-log: graphite\->send(m2g.apc.minmaxline.upsAdvInputMaxLineVoltage,123,1476356965) +.Ve +.PP +If the \s-1MRTG\s0 log output looks reasonable, then take a look at Graphite's carbon-cache logs. +.SH "PER TARGET CONFIGURATION" +.IX Header "PER TARGET CONFIGURATION" +Each monitoring target must be identified by a unique name. This +name must be appended to each parameter belonging to the same +target. The name will also be used for naming the +generated webpages, logfiles and images for this target. +.SS "Target" +.IX Subsection "Target" +With the \fITarget\fR keyword you tell mrtg what it should +monitor. The \fITarget\fR keyword takes arguments in a wide +range of formats: +.IP "Basic" 4 +.IX Item "Basic" +The most basic format is \*(L"port:community@router\*(R" +This will generate a traffic graph for the interface 'port' +of the host 'router' (dns name or \s-1IP\s0 address) +and it will use the community 'community' (snmp password) +for the snmp query. +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: 2:public@wellfleet\-fddi.domain +.Ve +.Sp +If your community contains a \*(L"@\*(R" or a \*(L" \*(R" these characters +must be escaped with a \*(L"\e\*(R". +.Sp +.Vb 1 +\& Target[bla]: 2:stu\e pi\e@d@router +.Ve +.IP "SNMPv2c" 4 +.IX Item "SNMPv2c" +If you have a fast router you might want to try to poll the ifHC* counters. +This feature gets activated by switching to SNMPv2c. Unfortunately not all +devices support SNMPv2c yet. If it works, this will prevent your counters +from wraping within the 5 minute polling interval, since we now use 64 bit +instead of the normal 32 bit. +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: 2:public@router1:::::2 +.Ve +.IP "SNMPv3" 4 +.IX Item "SNMPv3" +As an alternative to SNMPv2c, SNMPv3 provides access to the ifHC* counters, +along with encryption. Not all devices support SNMPv3, and you will also +need the perl Net::SNMP library in order to use it. It is recommended that +cfgmaker be used to generate configurations involving SNMPv3, as it will +check if the Net::SNMP library is loadable, and will switch to SNMPv2c if +v3 is unavailable. +.Sp +\&\s-1SNMP\s0 v3 requires additional authentication parameters, passed using the +SnmpOptions[] per-target keyword. +.Sp +Example: + Target[myrouter]: 2:router1:::::3 + SnmpOptions[myrouter]: username=>'user1' +.IP "noHC" 4 +.IX Item "noHC" +Not all routers that support SNMPv2 or SNMPv3 provide the ifHC* counters +on every interface. The noHC[] per-target keyword signals that the +low-speed counters ifInOctets and ifOutOctets should be queried instead. +cfgmaker will automatically insert this tag if SNMPv2 or SNMPv3 is specified +but the ifHC* counters are unavailable. +.Sp +Example: + Target[myrouter]: #Bri0:router1:::::3 + SnmpOptions[myrouter]: username=>'user1' + noHC[myrouter]: yes +.IP "Reversing" 4 +.IX Item "Reversing" +Sometimes you are sitting on the wrong side of the +link, and you would like to have mrtg report Incoming +traffic as Outgoing and vice versa. This can be achieved +by adding the '\-' sign in front of the \*(L"Target\*(R" +description. It flips the incoming and outgoing traffic rates. +.Sp +Example: +.Sp +.Vb 1 +\& Target[ezci]: \-1:public@ezci\-ether.domain +.Ve +.IP "Explicit OIDs" 4 +.IX Item "Explicit OIDs" +You can also explicitly define which \s-1OID\s0 to query by using the +following syntax 'OID_1&OID_2:community@router' +The following example will retrieve error counts for input and output +on interface 1. \s-1MRTG\s0 needs to graph two variables, +so you need to specify two \s-1OID\s0's such as temperature and humidity +or error input and error output. +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter +.Ve +.IP "\s-1MIB\s0 Variables" 4 +.IX Item "MIB Variables" +\&\s-1MRTG\s0 knows a number of symbolic \s-1SNMP\s0 variable names. +See the file mibhelp.txt for a list of known names. +One example are the ifInErrors and ifOutErrors. +This means you can specify the above as: +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: ifInErrors.1&ifOutErrors.1:public@myrouter +.Ve +.IP "SnmpWalk" 4 +.IX Item "SnmpWalk" +It may be that you want to monitor an snmp object that is only reachable by +\&'walking'. You can get mrtg to walk by prepending the \s-1OID\s0 with the string +\&\fBWaLK\fR or if you want a particular entry from the table returned by the walk +you can use \fBWaLK\fR\fIx\fR where \fIx\fR is a number starting from 0 (!). +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: WaLKstrangeOid.1&WaLKstrangeOid.2:public@myrouter +\& +\& Target[myrouter]: WaLK3strangeOid.1&WaLK4strangeOid.2:public@myrouter +.Ve +.IP "SnmpGetNext" 4 +.IX Item "SnmpGetNext" +A special case of an snmp object that is only reachable by 'walking' occurs +when a single snmpgetnext will return the correct value, but snmpwalk fails. +This may occur with snmp V2 or V3, as the snmpgetbulk method is used in these +versions. You can get mrtg to use getnext instead of getbulk by prepending the +\&\s-1OID\s0 with the string \fBGeTNEXT\fR. +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: GeTNEXTstrangeOid&GeTNEXTstrangeOid:public@myrouter +.Ve +.IP "Counted \s-1SNMP\s0 Walk" 4 +.IX Item "Counted SNMP Walk" +In other situations, an snmpwalk is needed to count rows, but the actual data +is uninteresting. For example, counting the number of mac-addresses in a \s-1CAM \s0 +table, or the number of simultaneous dialup sessions. You can get \s-1MRTG\s0 to count +the number of instances by prepending the \s-1OID\s0 with the string \fBCnTWaLK\fR. The +following will retrieve the number of simultaneous \s-1VOIP\s0 calls on some routers: +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3&CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3:public@myrouter +.Ve +.IP "Interface by \s-1IP\s0" 4 +.IX Item "Interface by IP" +Sometimes \s-1SNMP\s0 interface index can change, like when new interfaces are +added or removed. This can cause all Target entries in your config file +to become offset, causing \s-1MRTG\s0 to graphs wrong instances etc. +\&\s-1MRTG\s0 supports \s-1IP\s0 address instead of ifindex in target definition. Then +\&\s-1MRTG\s0 will query snmp device and try to map \s-1IP\s0 address to the current ifindex. +You can use \s-1IP\s0 addresses in every type of target definition by adding +\&\s-1IP\s0 address of the numbered interface after \s-1OID\s0 and separation char '/'. +.Sp +Make sure that the given \s-1IP\s0 address is used on +your same target router, especially when graphing two different OIDs +and/or interface split by '&' delimiter. +.Sp +You can tell cfgmaker to generate such references with the option +\&\fB\-\-ifref=ip\fR. +.Sp +Example: +.Sp +.Vb 3 +\& Target[myrouter]: /1.2.3.4:public@wellfleet\-fddi.domain +\& Target[ezci]: \-/1.2.3.4:public@ezci\-ether.domain +\& Target[myrouter]: ifInErrors/1.2.3.4&ifOutErrors/1.2.3.4:public@myrouter +.Ve +.IP "Interface by Description" 4 +.IX Item "Interface by Description" +If you can not use \s-1IP\s0 addresses you might want to use +the interface names. This works similar to the \s-1IP\s0 address aproach +except that the prefix to use is a \e instead of a / +.Sp +You can tell cfgmaker to generate such references with the option +\&\fB\-\-ifref=descr\fR. +.Sp +Example: +.Sp +.Vb 3 +\& Target[myrouter]: \eMy\-Interface2:public@wellfleet\-fddi.domain +\& Target[ezci]: \-\eMy\-Interface2:public@ezci\-ether.domain +\& Target[myrouter]: ifInErrors\eMy\-If2&ifOutErrors\eMy\-If3:public@myrouter +.Ve +.Sp +If your description contains a \*(L"&\*(R", a \*(L":\*(R", a \*(L"@\*(R" or a \*(L" \*(R" you can include +them but you must escape with a backlash: +.Sp +.Vb 1 +\& Target[myrouter]: \efun\e:\e ney\e&ddd:public@hello.router +.Ve +.IP "Interface by Name" 4 +.IX Item "Interface by Name" +This is the only sensible way to reference the interfaces of your switches. +.Sp +You can tell cfgmaker to generate such references with the option +\&\fB\-\-ifref=name\fR. +.Sp +Example: +.Sp +.Vb 3 +\& Target[myrouter]: #2/11:public@wellfleet\-fddi.domain +\& Target[ezci]: \-#2/11:public@ezci\-ether.domain +\& Target[myrouter]: ifInErrors#3/7&ifOutErrors#3/7:public@myrouter +.Ve +.Sp +If your description contains a \*(L"&\*(R", a \*(L":\*(R", a \*(L"@\*(R" or a \*(L" \*(R" you can include +them but you must escape with a backlash: +.Sp +.Vb 1 +\& Target[myrouter]: #\e:\e fun:public@hello.router +.Ve +.Sp +Note that the # sign will be interpreted as a comment character if +it is the first non white-space character on the line. +.IP "Interface by Ethernet Address" 4 +.IX Item "Interface by Ethernet Address" +When the \s-1SNMP\s0 interface index changes, you can key that interface by its +\&'Physical Address', sometimes called a 'hard address', which is the \s-1SNMP\s0 +variable 'ifPhysAddress'. Internally, \s-1MRTG\s0 matches the Physical Address from +the *.cfg file to its current index, and then uses that index for the rest of +the session. +.Sp +You can use the Physical Address in every type of target definition by adding +the Physical Address after the \s-1OID\s0 and the separation char '!' (analogous to the \s-1IP\s0 +address option). The Physical address is specified as '\-' delimited +octets, such as \*(L"0a\-0\-f1\-5\-23\-18\*(R" (omit the double quotes). Note that some +routers use the same Hardware Ethernet Address for all of their Interfaces which +prevents unique interface identification. Mrtg will notice such problems and alert you. +.Sp +You can tell cfgmaker to generate configuration files with hardware ethernet address references +by using the option \fB\-\-ifref=eth\fR. +.Sp +Example: +.Sp +.Vb 6 +\& Target[myrouter]: !0a\-0b\-0c\-0d:public@wellfleet\-fddi.domain +\& Target[ezci]: \-!0\-f\-bb\-05\-71\-22:public@ezci\-ether.domain +\& Target[myrouter]: 1.3.6.1.2.1.2.2.1.14!0a\-00\-10\-23\-44\-51& *BREAK* +\& 1.3.6.1.2.1.2.2.1.14!0a\-00\-10\-23\-44\-51:public@myrouter +\& Target[myrouter]: ifInErrors!0a\-00\-10\-23\-44\-51& *BREAK* +\& ifOutErrors!0a\-00\-10\-23\-44\-51:public@myrouter +.Ve +.Sp +Join the lines at *BREAK* ... +.IP "Interface by Type" 4 +.IX Item "Interface by Type" +It seems that there are devices that try to defy all monitoring efforts: the interesting interfaces have +neither ifName nor a constant ifDescr not to mention a persistent ifIndex. The only way to get a constant +mapping is by looking at the interface type, because the interface you are interested in is unique in the +device you are looking at ... +.Sp +You can tell cfgmaker to generate such references with the option +\&\fB\-\-ifref=type\fR. +.Sp +Example: +.Sp +.Vb 3 +\& Target[myrouter]: %13:public@wellfleet\-fddi.domain +\& Target[ezci]: \-%13:public@ezci\-ether.domain +\& Target[myrouter]: ifInErrors%13&ifOutErrors%14:public@myrouter +.Ve +.IP "Extended positioning of ifIndex" 4 +.IX Item "Extended positioning of ifIndex" +There are OIDs that contain the interface index at some inner position within +the \s-1OID.\s0 To use the above mentioned Interface by IP/Description/Name/Type methods +in the target definition the keyword 'IndexPOS' can be used to indicate the +position of ifIndex. If 'IndexPOS' is not used the ifIndex will be appended at the +end of the \s-1OID.\s0 +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: OID.IndexPOS.1/1.2.3.4&OID.IndexPOS.1/1.2.3.4:public@myrouter +.Ve +.Sp +Replace \s-1OID\s0 by your numeric \s-1OID.\s0 +.IP "Extended Host Name Syntax" 4 +.IX Item "Extended Host Name Syntax" +In all places where ``community@router'' is accepted, you can add +additional parameters for the \s-1SNMP\s0 communication using +colon-separated suffixes. You can also append a pipe symbol ( | ) and +the name of a numeric conversion subroutine as described under the global +keyword \*(L"ConversionCode\*(R" above. The full syntax is as follows: +.Sp +.Vb 1 +\& community@router[:[port][:[timeout][:[retries][:[backoff][:[version]]]]][|name] +.Ve +.Sp +where the meaning of each parameter is as follows: +.RS 4 +.IP "port" 4 +.IX Item "port" +the \s-1UDP\s0 port under which to contact the \s-1SNMP\s0 agent (default: 161) +.Sp +The complete syntax of the port parameter is +.Sp +.Vb 1 +\& remote_port[!local_address[!local_port]] +.Ve +.Sp +Some machines have additional security features that only allow \s-1SNMP\s0 queries +to come from certain \s-1IP\s0 addresses. If the host doing the query has multiple +interface, it may be necessary to specify the interface the query should +come from. +.Sp +The port parameter allows the specification of the port of the machine being +queried. In addition, the \s-1IP\s0 address (or hostname) and port of the machine +doing the query may be specified. +.Sp +Examples: +.Sp +.Vb 5 +\& somehost +\& somehost:161 +\& somehost:161!192.168.2.4!4000 use 192.168.2.4 and port 4000 as source +\& somehost:!192.168.2.4 use 192.168.2.4 as source +\& somehost:!!4000 use port 4000 as source +.Ve +.IP "timeout" 4 +.IX Item "timeout" +initial timeout for \s-1SNMP\s0 queries, in seconds (default: 2.0) +.IP "retries" 4 +.IX Item "retries" +number of times a timed-out request will be retried (default: 5) +.IP "backoff" 4 +.IX Item "backoff" +factor by which the timeout is multiplied on every retry (default: 1.0). +.IP "version" 4 +.IX Item "version" +for \s-1SNMP\s0 version. If you have a fast router you might want to put +a '2' here. For authenticated or encrypted \s-1SNMP,\s0 you can try to put a +\&'3' here. This will make mrtg try to poll the 64 bit counters and thus +prevent excessive counter wrapping. Not all routers support this though. +\&\s-1SNMP\s0 v3 requires additional setup, see SnmpOptions[] for full details. +.Sp +Example: +.Sp +.Vb 1 +\& 3:public@router1:::::2 +.Ve +.IP "name" 4 +.IX Item "name" +the name of the subroutine that \s-1MRTG\s0 will call to convert the input and output +values to integers. See the complete example under the global keyword +\&\*(L"ConversionCode\*(R" above. +.Sp +Example: +.Sp +.Vb 1 +\& 1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.2:public@mydevice:161::::2|Length2Int +.Ve +.Sp +This would retrieve values from the \s-1OID 1.3.6.1.4.1.999.1\s0 for input and .2 +for output on mydevice using \s-1UDP\s0 port 161 and \s-1SNMP\s0 version 2, and would +execute the user-defined numeric conversion subroutine Length2Int to convert +those values to integers. +.RE +.RS 4 +.Sp +A value that equals the default value can be omitted. Trailing colons +can be omitted, too. The pipe symbol followed by the name parameter, if +present, must come at the end. There must be no spaces around the colons or +pipe symbol. +.Sp +Example: +.Sp +.Vb 1 +\& Target[ezci]: 1:public@ezci\-ether.domain:9161::4 +.Ve +.Sp +This would refer to the input/output octet counters for the interface +with \fIifIndex 1\fR on \fIezci\-ether.domain\fR, as known +by the \s-1SNMP\s0 agent listening on \s-1UDP\s0 port 9161. The standard initial +timeout (2.0 seconds) is used, but the number of retries is set to +four. The backoff value is the default. +.RE +.IP "Numeric IPv6 addresses" 4 +.IX Item "Numeric IPv6 addresses" +If IPv6 is enabled you may also specify a target using its IPv6 address. To +avoid ambiguity with the port number, numeric IPv6 addresses must be placed +in square brackets. +.Sp +Example: +.Sp +.Vb 1 +\& Target[IPv6test]: 2:public@[2001:760:4::]:6161::4 +.Ve +.IP "External Monitoring Scripts" 4 +.IX Item "External Monitoring Scripts" +If you want to monitor something which does not provide +data via snmp you can use some external program to do +the data gathering. +.Sp +The external command must return 4 lines of output: +.RS 4 +.IP "Line 1" 4 +.IX Item "Line 1" +current state of the first variable, normally 'incoming bytes count' +.IP "Line 2" 4 +.IX Item "Line 2" +current state of the second variable, normally 'outgoing bytes count' +.IP "Line 3" 4 +.IX Item "Line 3" +string (in any human readable format), telling the uptime of the target. +.IP "Line 4" 4 +.IX Item "Line 4" +string, telling the name of the target. +.RE +.RS 4 +.Sp +Depending on the type of data your script returns you +might want to use the 'gauge' or 'absolute' arguments +for the \fIOptions\fR keyword. +.Sp +Example: +.Sp +.Vb 1 +\& Target[myrouter]: \`/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0\` +.Ve +.Sp +Note the use of the backticks (`), not apostrophes (') +around the command. +.Sp +If you want to use a backtick in the command name this can be done +but you must escape it with a backslash ... +.Sp +If your script does not have any data to return but does not want mrtg to +complain about invalid data, it can return '\s-1UNKNOWN\s0' instead of a number. +Note though that only rrdtool is realy equipped to handle unknown data well. +.RE +.IP "Multi Target Syntax" 4 +.IX Item "Multi Target Syntax" +You can also combine several target definitions in a mathematical expression. +Any syntactically correct expression that the Perl interpreter can evaluate +to will work. An expression could be used, for example, to aggregate both B +channels in an \s-1ISDN\s0 connection or to calculate the percentage hard disk +utilization of a server from the absolute used space and total capacity. +.Sp +Examples: +.Sp +.Vb 1 +\& Target[myrouter]: 2:public@wellfleetA + 1:public@wellfleetA +\& +\& Target[myrouter]: .1.3.6.1.4.1.999.1&.1.3.6.1.4.1.999.2:public@mydevice / +\& .1.3.6.1.4.1.999.3&.1.3.6.1.4.1.999.4:public@mydevice * 100 +.Ve +.Sp +Note that whitespace must surround each target definition in the expression. +Target definitions themselves must not contain whitespace, except in +interface descriptions and interface names, where each whitespace character +is escaped by a backslash. +.Sp +\&\s-1MRTG\s0 automatically rounds the result of the expression to an integer unless +RRDTool logging is in use and the gauge option is in effect for the target. +Internally \s-1MRTG\s0 uses Perl's Math::BigFloat package to calculate the result +of the expression with 40 digits of precision. Even in extreme cases, where, +for example, you take the difference of two 64\-bit integers, the result of +the expression should be accurate. +.IP "\s-1SNMP\s0 Request Optimization" 4 +.IX Item "SNMP Request Optimization" +\&\s-1MRTG\s0 is designed to economize on its \s-1SNMP\s0 requests. Where a target +definition appears more than once in the configuration file, \s-1MRTG\s0 requests +the data from the device only once per round of data collection and uses +the collected data for each instance of a particular target. Recognition of +two target definitions as being identical is based on a simple string match +rather than any kind of deeper semantic analysis. +.Sp +Example: +.Sp +.Vb 4 +\& Target[Targ1]: 1:public@CiscoA +\& Target[Targ2]: 2:public@CiscoA +\& Target[Targ3]: 1:public@CiscoA + 2:public@CiscoA +\& Target[Targ4]: 1:public@CISCOA +.Ve +.Sp +This results in a total of three \s-1SNMP\s0 requests. Data for 1:public@CiscoA +and 2:public@CiscoA are requested only once each, and used for Targ1, Targ2, +and Targ3. Targ4 causes another \s-1SNMP\s0 request for 1:public@CISCOA, which is not +recognized as being identical to 1:public@CiscoA. +.SS "MaxBytes" +.IX Subsection "MaxBytes" +The maximum value either of the two variables monitored +are allowed to reach. For monitoring router traffic +this is normally the bytes per second this +interface port can carry. +.PP +If a number higher than \fIMaxBytes\fR is returned, it is ignored. +Also read the section on \fIAbsMax\fR for further info. +The \fIMaxBytes\fR value is also used in calculating the Y range +for unscaled graphs (see the section on \fIUnscaled\fR). +.PP +Since most links are rated in bits per second, you need to divide their +maximum bandwidth (in bits) by eight (8) in order to get bytes per second. +This is very important to make your unscaled graphs display realistic +information. T1 = 193000, 56K = 7000, 10 \s-1MB\s0 Ethernet = 1250000, 100 \s-1MB\s0 +Ethernet = 12500000. The \fIMaxBytes\fR value will be used by mrtg to decide +whether it got a valid response from the router. +.PP +If you need two different MaxBytes values for the two monitored +variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes. +.PP +Example: +.PP +.Vb 1 +\& MaxBytes[myrouter]: 1250000 +.Ve +.SS "Title" +.IX Subsection "Title" +Title for the \s-1HTML\s0 page which gets generated for the graph. +.PP +Example: +.PP +.Vb 1 +\& Title[myrouter]: Traffic Analysis for Our Nice Company +.Ve +.SH "OPTIONAL PER TARGET KEYWORDS" +.IX Header "OPTIONAL PER TARGET KEYWORDS" +.SS "PageTop" +.IX Subsection "PageTop" +Things to add to the top of the generated \s-1HTML\s0 page. Note +that you can have several lines of text as long as the +first column is empty. +.PP +Note that the continuation lines will all end up on the same +line in the html page. If you want linebreaks in the generated +html use the '\en' sequence. +.PP +Example: +.PP +.Vb 4 +\& PageTop[myrouter]: <H1>Traffic Analysis for ETZ C95.1</H1> +\& Our Campus Backbone runs over an FDDI line\en +\& with a maximum transfer rate of 12.5 megabytes per +\& Second. +.Ve +.SS "RouterUptime" +.IX Subsection "RouterUptime" +In cases where you calculate the used bandwidth from +several interfaces you normally don't get the router uptime +and router name displayed on the web page. +.PP +If these interfaces are on the same router and the uptime and +name should be displayed you have to specify +its community and address again with the \fIRouterUptime\fR keyword. +.PP +If you want to use a special \s-1OID\s0 for querying the router uptime, +use prepend the oid. +.PP +Example: +.PP +.Vb 2 +\& Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250 +\& RouterUptime[kacisco.comp.edu]: public@194.64.66.250 +\& +\& RouterUptime[kacisco.comp.edu]: hrSystemUptime.0:public@194.64.66.250 +.Ve +.SS "RouterName" +.IX Subsection "RouterName" +If the default name of the router is incorrect/uninformative, +you can use RouterName to specify a different \s-1OID\s0 on either the +same or a different host. +.PP +A practical example: sysName on BayTech \s-1DS72\s0 units always display +\&\*(L"ds72\*(R", no matter what you set the Unit \s-1ID\s0 to be. Instead, the +Unit \s-1ID\s0 is stored at 1.3.6.1.4.1.4779.1.1.3.0, so we can have +\&\s-1MRTG\s0 display this instead of sysName. +.PP +Example: +.PP +.Vb 1 +\& RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0 +.Ve +.PP +A different \s-1OID\s0 on a different host can also be specified: +.PP +.Vb 1 +\& RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0:public@194.64.66.251 +.Ve +.SS "MaxBytes1" +.IX Subsection "MaxBytes1" +Same as MaxBytes, for variable 1. +.SS "MaxBytes2" +.IX Subsection "MaxBytes2" +Same as MaxBytes, for variable 2. +.SS "IPv4Only" +.IX Subsection "IPv4Only" +Many IPv6 routers do not currently support \s-1SNMP\s0 over IPv6 and must +be monitored using IPv4. The IPv4Only option forces mrtg to use IPv4 +when communicating with the target, even if IPv6 is enabled. This is +useful if the target is a hostname with both IPv4 and IPv6 addresses; +without the IPv4Only keyword, monitoring such a router will not work +if IPv6 is enabled. +.PP +If set to no (the default), mrtg will use IPv6 unless the target has +no IPv6 addresses, in which case it will use IPv4. If set to yes, mrtg +will only use IPv4. +.PP +Note that if this option is set to yes and the target does not have an +IPv4 address, communication with the target will fail. +.PP +This option has no effect if IPv6 is not enabled. +.PP +Example: +.PP +.Vb 2 +\& Target[v4onlyrouter_1]: 1:public@v4onlyrouter +\& IPv4Only[v4onlyrouter_1]: Yes +.Ve +.SS "SnmpOptions (V3)" +.IX Subsection "SnmpOptions (V3)" +SNMPv3 requires a fairly rich set of options. This per-target keyword +allows access to the User Security Model of SNMPv3. Options are listed +in the same syntax as a perl hash. +.PP +\fISecurity Modes\fR +.IX Subsection "Security Modes" +.PP +SNMPv3 has three security modes, defined on the device being polled. +For example, on Cisco routers the security mode is defined by the +snmp-server group global configuration command. +.IP "NoAuthNoPriv" 4 +.IX Item "NoAuthNoPriv" +Neither Authentication nor Privacy is defined. Only the Username +option is specified for this mode. +.Sp +Example: +.Sp +.Vb 1 +\& SnmpOptions[myrouter]: username=>\*(Aquser1\*(Aq +.Ve +.IP "AuthNoPriv" 4 +.IX Item "AuthNoPriv" +Uses a Username and a password. The password can be hashed using the +snmpkey application, or passed in plain text along with the ContextEngineID +.Sp +Example: +.Sp +.Vb 2 +\& SnmpOptions[myrouter]: username=>\*(Aquser1\*(Aq,authpassword=>\*(Aqexample\*(Aq, +\& contextengineid=>\*(Aq80000001110000004000000\*(Aq +.Ve +.IP "Priv" 4 +.IX Item "Priv" +Both Authentication and Privacy is defined. The default privacy protocol +is des. +.Sp +Example: + SnmpOptions[myrouter]: authkey=>'0x1e93ab5a396e2af234c8920e61cfe2028072c0e2', + authprotocol=>'sha',privprotocol=>'des',username=>'user1', + privkey=>'0x498d74940c5872ed387201d74b9b25e2' +.PP +\fIsnmp options\fR +.IX Subsection "snmp options" +.PP +The following option keywords are recognized: +.IP "username" 4 +.IX Item "username" +The user associated with the User Security Model +.IP "contextname" 4 +.IX Item "contextname" +An \s-1SNMP\s0 agent can define multiple contexts. This keyword allows them to +be polled. +.IP "contextengineid" 4 +.IX Item "contextengineid" +A unique 24\-byte string identifying the snmp-agent. +.IP "authpassword" 4 +.IX Item "authpassword" +The plaintext password for a user in either AuthNoPriv or Priv mode. +.IP "authkey" 4 +.IX Item "authkey" +A md5 or sha hash of the plain-text password, along with the engineid. +Use the snmpkey commandline program to generate this hash, or use +Net::SNMP::Security::USM in a script. +.IP "authprotocol {sha|md5}" 4 +.IX Item "authprotocol {sha|md5}" +The hashing algorithm defined on the \s-1SNMP\s0 client. Defaults to md5. +.IP "privpassword" 4 +.IX Item "privpassword" +A plaintext pre-shared key for encrypting snmp packets in Priv mode. +.IP "privkey" 4 +.IX Item "privkey" +A hash of the plain-text pre-shared key, along with the engineid. +Use the snmpkey commandline program to generate this hash, or use +Net::SNMP::Security::USM in a script. +.IP "privprotocol {des|3desede|aescfb128|aescfb192|aescfb256}" 4 +.IX Item "privprotocol {des|3desede|aescfb128|aescfb192|aescfb256}" +Specifies the encryption method defined on the snmp agent. The default +is des. +.SS "PageFoot" +.IX Subsection "PageFoot" +Things to add to the bottom of the generated \s-1HTML\s0 page. Note +that you can have several lines of text as long as the +first column is empty. +.PP +Note that the continuation lines will all end up on the same +line in the html page. If you want linebreaks in the generated +html use the '\en' sequence. +.PP +The material will be added just before the </BODY> tag: +.PP +Example: +.PP +.Vb 2 +\& PageFoot[myrouter]: Contact <A HREF="mailto:peter@x.yz">Peter</A> +\& if you have questions regarding this page +.Ve +.SS "AddHead" +.IX Subsection "AddHead" +Use this tag like the \fIPageTop\fR header, but its contents +will be added between </TITLE> and </HEAD>. +.PP +Example: +.PP +.Vb 1 +\& AddHead[myrouter]: <link rev="made" href="mailto:mrtg@blabla.edu"> +.Ve +.SS "BodyTag" +.IX Subsection "BodyTag" +BodyTag lets you supply your very own <body ...> tag for the +generated webpages. +.PP +Example: +.PP +.Vb 2 +\& BodyTag[myrouter]: <BODY LEFTMARGIN="1" TOPMARGIN="1" +\& BACKGROUND="/stats/images/bg.neo2.gif"> +.Ve +.SS "AbsMax" +.IX Subsection "AbsMax" +If you are monitoring a link which can handle more traffic than the +\&\fIMaxBytes\fR value. Eg, a line which uses compression or some frame relay +link, you can use the \fIAbsMax\fR keyword to give the absolute maximum value +ever to be reached. We need to know this in order to sort out unrealistic +values returned by the routers. If you do not set \fIAbsMax\fR, rateup will +ignore values higher than \fIMaxBytes\fR. +.PP +Example: +.PP +.Vb 1 +\& AbsMax[myrouter]: 2500000 +.Ve +.SS "Unscaled" +.IX Subsection "Unscaled" +By default each graph is scaled vertically to make the actual data visible +even when it is much lower than \fIMaxBytes\fR. With the \fIUnscaled\fR variable +you can suppress this. It's argument is a string, containing one letter for +each graph you don't want to be scaled: d=day w=week m=month y=year. There +is also a special case to unset the variable completely: n=none. This could +be useful in the event you need to override a global configuration. In the +example scaling for the yearly and the monthly graph are suppressed. +.PP +Example: +.PP +.Vb 1 +\& Unscaled[myrouter]: ym +.Ve +.SS "WithPeak" +.IX Subsection "WithPeak" +By default the graphs only contain the average +values of the monitored variables \- normally the +transfer rates for incoming and outgoing traffic. +The following option instructs mrtg to display the peak +5 minute values in the [w]eekly, [m]onthly and +[y]early graph. In the example we define the monthly +and the yearly graph to contain peak as well as average +values. +.PP +Examples: +.PP +.Vb 1 +\& WithPeak[myrouter]: ym +.Ve +.SS "Suppress" +.IX Subsection "Suppress" +By default mrtg produces 4 graphs. With this option +you can suppress the generation of selected graphs. +The option value syntax is analogous to the above two options. +In this example we suppress the yearly graph +as it is quite empty in the beginning. +.PP +Example: +.PP +.Vb 1 +\& Suppress[myrouter]: y +.Ve +.SS "Extension" +.IX Subsection "Extension" +By default, mrtg creates .html files. Use this option to tell mrtg to +use a different extension. For example you could set the extension to +php3, then you will be able to enclose \s-1PHP\s0 tags into the output (useful +for getting a router name out of a database). +.PP +Example: +.PP +.Vb 1 +\& Extension[myrouter]: phtml +.Ve +.SS "Directory" +.IX Subsection "Directory" +By default, mrtg puts all the files that it generates for each +target (the GIFs, the \s-1HTML\s0 page, the log file, etc.) in \fIWorkDir\fR. +.PP +If the \fIDirectory\fR option is specified, the files are instead put +into a directory under \fIWorkDir\fR or Log\-, Image\- and HtmlDir). +(For example the \fIDirectory\fR +option below would cause all the files for a target myrouter +to be put into directory /usr/tardis/pub/www/stats/mrtg/myrouter/ .) +.PP +The directory must already exist; mrtg will not create it. +.PP +Example: +.PP +.Vb 2 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +\& Directory[myrouter]: myrouter +.Ve +.PP +\&\s-1NOTE:\s0 the Directory option must always be 'relative' or bad things will happen. +.SS "Clonedirectory" +.IX Subsection "Clonedirectory" +If the \fIDirectory\fR option is specified, the \fIClonedirectory\fR option will copy +all the contents of \fIDirectory\fR to the \fIClonedirectory\fR. +.PP +Example: +.PP +.Vb 3 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +\& Directory[myrouter]: myrouter +\& Clonedirectory[myrouter]: myclonedirectory +.Ve +.PP +Optionally the target name can be changed in the cloning process. +.PP +Example: +.PP +.Vb 3 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +\& Directory[myrouter]: myrouter +\& Clonedirectory[myrouter]: myclonedirectory mynewtarget +.Ve +.PP +\&\s-1NOTE1:\s0 The clone directory must already exist; mrtg will not create it. +.PP +\&\s-1NOTE2:\s0 The Clonedirectory option must also always be 'relative' or bad things will happen. +.PP +\&\s-1NOTE3:\s0 This requires the File::Copy module +.SS "XSize and YSize" +.IX Subsection "XSize and YSize" +By default mrtgs graphs are 100 by 400 pixels wide (plus +some more for the labels. In the example we get almost +square graphs ... +.PP +Note: XSize must be between 20 and 600; YSize must be larger than 20 +.PP +Example: +.PP +.Vb 2 +\& XSize[myrouter]: 300 +\& YSize[myrouter]: 300 +.Ve +.SS "XZoom and YZoom" +.IX Subsection "XZoom and YZoom" +If you want your graphs to have larger pixels, you can +\&\*(L"Zoom\*(R" them. +.PP +Example: +.PP +.Vb 2 +\& XZoom[myrouter]: 2.0 +\& YZoom[myrouter]: 2.0 +.Ve +.SS "XScale and YScale" +.IX Subsection "XScale and YScale" +If you want your graphs to be actually scaled use \fIXScale\fR +and \fIYScale\fR. (Beware: while this works, the results look ugly +(to be frank) so if someone wants to fix this: patches are welcome. +.PP +Example: +.PP +.Vb 2 +\& XScale[myrouter]: 1.5 +\& YScale[myrouter]: 1.5 +.Ve +.SS "YTics and YTicsFactor" +.IX Subsection "YTics and YTicsFactor" +If you want to show more than 4 lines per graph, use YTics. +If you want to scale the value used for the YLegend of these +tics, use YTicsFactor. +The default value for YTics is 4 and the default value for +YTicsFactor is 1.0 . +.PP +Example: +.PP +Suppose you get values ranging from 0 to 700. +You want to plot 7 lines and want to show +0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200, +300, 400, 500, 600, 700. You should write then: +.PP +.Vb 2 +\& YTics[myrouter]: 7 +\& YTicsFactor[myrouter]: 0.01 +.Ve +.SS "Factor" +.IX Subsection "Factor" +If you want to multiply all numbers shown below the graph with a constant factor, use +this directive to define it .. +.PP +Example: +.PP +.Vb 1 +\& Factor[as400]: 4096 +.Ve +.SS "Step" +.IX Subsection "Step" +Change the default step from 5 * 60 seconds to +something else (I have not tested this much ...) +.PP +Example: +.PP +.Vb 1 +\& Step[myrouter]: 60 +.Ve +.SS "PNGTitle" +.IX Subsection "PNGTitle" +When using rateup for graph generation, this will print the given title in the +graph it generates. +.PP +Example: +.PP +.Vb 1 +\& PNGTitle[myrouter]: WAN Link UK\-US +.Ve +.SS "Options" +.IX Subsection "Options" +The \fIOptions\fR Keyword allows you to set some boolean +switches: +.IP "growright" 4 +.IX Item "growright" +The graph grows to the left by default. +This option flips the direction of growth +causing the current time to be at the right edge +of the graph and the history values to the left of it. +.IP "bits" 4 +.IX Item "bits" +All the monitored variable values are multiplied by 8 +(i.e. shown in bits instead of bytes) ... looks much more impressive :\-) +It also affects the 'factory default' labeling and units +for the given target. +.IP "perminute" 4 +.IX Item "perminute" +All the monitored variable values are multiplied by 60 +(i.e. shown in units per minute instead of units per second) in case +of small values more accurate graphs are displayed. +It also affects the 'factory default' labeling and units +for the given target. +.IP "perhour" 4 +.IX Item "perhour" +All the monitored variable values are multiplied by 3600 +(i.e. shown in units per hour instead of units per second) in case +of small values more accurate graphs are displayed. +It also affects the 'factory default' labeling and units +for the given target. +.IP "noinfo" 4 +.IX Item "noinfo" +Suppress the information about uptime and +device name in the generated webpage. +.IP "nopercent" 4 +.IX Item "nopercent" +Don't print usage percentages. +.IP "transparent" 4 +.IX Item "transparent" +Make the background of the generated gifs transparent. +.IP "integer" 4 +.IX Item "integer" +Print summary lines below graph as integers without commas. +.IP "dorelpercent" 4 +.IX Item "dorelpercent" +The relative percentage of IN-traffic to OUT-traffic is calculated +and displayed in the graph as an additional line. +Note: Only a fixed scale is available (from 0 to 100%). Therefore +if IN-traffic is greater than OUT-traffic then 100% is displayed. +If you suspect that your IN-traffic is not always less than or equal +to your OUT-traffic you are urged to not use this options. +Note: If you use this option in combination with the \fIColours\fR +options, a fifth colour-name colour-value pair is required there. +.IP "avgpeak" 4 +.IX Item "avgpeak" +There are some ISPs who use the average Peak values to bill their customers. +Using this option \s-1MRTG\s0 displays these values for each graph. The value is +built by averaging the max 5 minute traffic average for each 'step' shown in +the graph. For the Weekly graph this means that it builds the average of all +2 hour intervals 5 minute peak values. (Confused? Thought so!) +.IP "gauge" 4 +.IX Item "gauge" +Treat the values gathered from target as 'current status' measurements +and not as ever incrementing counters. +This would be useful to monitor things like disk space, +processor load, temperature, and the like ... +.Sp +In the absence of 'gauge' or 'absolute' options, +\&\s-1MRTG\s0 treats variables as a counters and calculates +the difference between the current and the previous value +and divides that by the elapsed time between +the last two readings to get the value to be plotted. +.IP "absolute" 4 +.IX Item "absolute" +This is for counter type data sources which reset their value when they are +read. This means that rateup does not have to build the difference between +the current and the last value read from the data source. The value obtained is +still divided by the elapsed time between the current and the last reading, which makes +it different from the 'gauge' option. Useful for external data gatherers. +.IP "derive" 4 +.IX Item "derive" +If you are using rrdtool as logger/grapher you can use a third type of data +source. Derive is like counter, except that it is not required to go \s-1UP\s0 all +the time. It is useful for situations where the change of some value should be +graphed. +.IP "unknaszero" 4 +.IX Item "unknaszero" +Log unknown data as zero instead of the default behaviour of repeating the +last value seen. Be careful with this, often a flat line in the graph is +much more obvious than a line at 0. +.IP "withzeroes" 4 +.IX Item "withzeroes" +Normally we ignore all values which are zero when calculating the average +transfer rate on a line. If this is not desirable use this option. +.IP "noborder" 4 +.IX Item "noborder" +If you are using rateup to log data, \s-1MRTG\s0 will create the graph images. +Normally these images have a shaded border around them. If you do not want the +border to be drawn, enable this option. This option has no effect if you are +not using rateup. +.IP "noarrow" 4 +.IX Item "noarrow" +As with the option above, this effects rateup graph generation only. Normally +rateup will generate graphs with a small arrow showing the direction of the +data. If you do not want this arrow to be drawn, enable this option. This +option has no effect if you are not using rateup. +.IP "noi" 4 +.IX Item "noi" +When using rateup for graph generation, you can use this option to stop rateup +drawing a graph for the 'I' or first variable. This also removes entries for +this variable in the \s-1HTML\s0 page \s-1MRTG\s0 generates, and will remove the peaks for +this variable if they are enabled. This allows you to hide this data, or can +be very useful if you are only graphing one line of data rather than two. +This option is not destructive \- any data received for the the variable +continued to be logged, it just isn't shown. +.IP "noo" 4 +.IX Item "noo" +Same as above, except relating to the 'O' or second variable. +.IP "nobanner" 4 +.IX Item "nobanner" +When using rateup for graph generation, this option disables \s-1MRTG\s0 adding the +\&\s-1MRTG\s0 banner to the \s-1HTML\s0 pages it generates. +.IP "nolegend" 4 +.IX Item "nolegend" +When using rateup for graph generation, this option will stop \s-1MRTG\s0 from creating +a legend at the bottom of the \s-1HTML\s0 pages it generates. +.IP "printrouter" 4 +.IX Item "printrouter" +When using rateup for graph generation, this option will print the router +name in the graph it generates. This option is overridden by the value of +PNGTitle if one is given +.IP "pngdate" 4 +.IX Item "pngdate" +When using rateup for graph generation, this option will print a +timestamp in the graph it generates, including a timezone if one is specified +by the 'Timezone' parameter. This is aequivalent to setting TimeStrPost[x]: \s-1RU\s0 +.IP "logscale" 4 +.IX Item "logscale" +The \fBlogscale\fR option causes rateup to display the data with the Y axis +scaled logarithmically. Doing so allows the normal traffic to occupy +the majority of the vertical range, while still showing any spikes at +their full height. +.Sp +\&\fBlogscale\fR displays all the available data and will always produce +well-behaved graphs. People often consider a logarithmically scaled graph +counterintuitive, however, and thus hard to interpret. +.IP "expscale" 4 +.IX Item "expscale" +The \fBexpscale\fR option causes rateup to display the data with the Y axis +scaled exponentially. Doing so emphasizes small changes at the top of +the scale; this can be useful when graphing values that fluctuate by +a small amount near the top of the scale, such as line voltage. +.Sp +\&\fBexpscale\fR is essentially the inverse of \fBlogscale\fR. +.IP "secondmean" 4 +.IX Item "secondmean" +The \fBsecondmean\fR option sets the maximum value on the graph to the mean +of the data greater than the mean of all data. This produces a graph +that focuses more on the typical data, while clipping large peaks. +.Sp +Using \fBsecondmean\fR will give a more intutive linearly +scaled graph, but can result in a uselessly high or low scale in some +rare situations (specifically, when the data includes a large portion +of values far from the actual mean) +.Sp +If a target includes both \fBlogscale\fR and \fBsecondmean\fR in the options, the +\&\fBsecondmean\fR takes precedence. +.PP +Example: +.PP +.Vb 1 +\& Options[myrouter]: growright, bits +.Ve +.SS "kilo" +.IX Subsection "kilo" +Use this option to change the multiplier value for building +prefixes. Defaultvalue is 1000. This tag is for the special +case that 1kB = 1024B, 1MB = 1024kB and so far. +.PP +Example: +.PP +.Vb 1 +\& kilo[myrouter]: 1024 +.Ve +.SS "kMG" +.IX Subsection "kMG" +Change the default multiplier prefixes (,k,M,G,T,P). In the tag +\&\fIShortLegend\fR define only the basic units. +Format: Comma separated list of prefixed. Two consecutive commas +or a comma at start or end of the line gives no prefix on this item. +If you do not want prefixes, just put two consecutive commas. +If you want to skip a magnitude select '\-' as value. +.PP +Example: velocity in nm/s (nanometers per second) displayed in nm/h. +.PP +.Vb 3 +\& ShortLegend[myrouter]: m/h +\& kMG[myrouter]: n,u,m,,k,M,G,T,P +\& options[myrouter]: perhour +.Ve +.SS "Colours" +.IX Subsection "Colours" +The \fIColours\fR tag allows you to override the default colour +scheme. Note: All 4 of the required colours must be +specified here. The colour name ('Colourx' below) is the +legend name displayed, while the \s-1RGB\s0 value is the real +colour used for the display, both on the graph and in the +html doc. +.PP +Format is: Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB +.PP +Important: +If you use the \fIdorelpercent\fR options tag a fifth colour name +colour value pair is required: +Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB,Col5#RRGGBB +.IP "Colour1" 4 +.IX Item "Colour1" +First variable (normally Input) on default graph. +.IP "Colour2" 4 +.IX Item "Colour2" +Second variable (normally Output) on default graph. +.IP "Colour3" 4 +.IX Item "Colour3" +Max first variable (input). +.IP "Colour4" 4 +.IX Item "Colour4" +Max second variable (output). +.IP "\s-1RRGGBB\s0" 4 +.IX Item "RRGGBB" +2 digit hex values for Red, Green and Blue. +.PP +Example: +.PP +.Vb 1 +\& Colours[myrouter]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff +.Ve +.SS "Background" +.IX Subsection "Background" +With the \fIBackground\fR tag you can configure the background +colour of the generated \s-1HTML\s0 page. +.PP +Example: +.PP +.Vb 1 +\& Background[myrouter]: #a0a0a0a +.Ve +.SS "YLegend, ShortLegend, Legend[1234]" +.IX Subsection "YLegend, ShortLegend, Legend[1234]" +The following keywords allow you to override the text +displayed for the various legends of the graph and in the +\&\s-1HTML\s0 document: +.IP "YLegend" 4 +.IX Item "YLegend" +The Y\-axis label of the graph. Note that a text which is too long +to fit in the graph will be silently ignored. +.IP "ShortLegend" 4 +.IX Item "ShortLegend" +The units string (default 'b/s') used for Max, Average and Current +.IP "Legend[1234IO]" 4 +.IX Item "Legend[1234IO]" +The strings for the colour legend. +.PP +Example: +.PP +.Vb 8 +\& YLegend[myrouter]: Bits per Second +\& ShortLegend[myrouter]: b/s +\& Legend1[myrouter]: Incoming Traffic in Bits per Second +\& Legend2[myrouter]: Outgoing Traffic in Bits per Second +\& Legend3[myrouter]: Maximal 5 Minute Incoming Traffic +\& Legend4[myrouter]: Maximal 5 Minute Outgoing Traffic +\& LegendI[myrouter]: In: +\& LegendO[myrouter]: Out: +.Ve +.PP +Note, if \fILegendI\fR or \fILegendO\fR are set to an empty string with +.PP +.Vb 1 +\& LegendO[myrouter]: +.Ve +.PP +The corresponding line below the graph will not be printed at all. +.SS "Timezone" +.IX Subsection "Timezone" +If you live in an international world, you might want to +generate the graphs in different timezones. This is set in the +\&\s-1TZ\s0 variable. Under certain operating systems like Solaris, +this will provoke the localtime call to give the time in +the selected timezone. +.PP +Example: +.PP +.Vb 1 +\& Timezone[myrouter]: Japan +.Ve +.PP +The Timezone is the standard timezone of your system, ie Japan, Hongkong, +\&\s-1GMT, GMT+1\s0 etc etc. +.SS "Weekformat" +.IX Subsection "Weekformat" +By default, mrtg (actually rateup) uses the \fIstrftime\fR\|(3) '%V' option to +format week numbers in the monthly graphs. The exact semantics of this +format option vary between systems. If you find that the week numbers are +wrong, and your system's \fIstrftime\fR\|(3) routine supports it, you can try +another format option. The \s-1POSIX \s0'%V' option correspond to the widely used +\&\s-1ISO 8601\s0 week numbering standard. The week format character should be +specified as a single letter; either W, V, or U. +.PP +The \s-1UNIX\s0 version of rateup uses the libc implementation of strftime. +On Windows, the native strftime implementation does not know about +\&\f(CW%V\fR. So there we use a different implementation of strftime that does +support \f(CW%V\fR. +.PP +Example: +.PP +.Vb 1 +\& Weekformat[myrouter]: W +.Ve +.SS "RRDRowCount" +.IX Subsection "RRDRowCount" +This affects the creation of new rrd files. By default rrds are created to +hold about 1 day's worth of high resolution data. (plus 1 week of 30 minute +data, 2 months of 2 hour data and 2 years of 1 day data). With this Keyword +you can change the number of base interval entries configured for new rrds +as they get created. Note that you must take the interval time into account. +.PP +Example: +.PP +.Vb 1 +\& RRDRowCount[myrouter]: 1600 +.Ve +.SS "RRDRowCount30m" +.IX Subsection "RRDRowCount30m" +As per RRDRowCount, but for the \s-1RRA\s0's \-typically\- used for 30 minute data. +Even so, you must still take the base interval into account. Leaving out +this keyword will force the old default of 800 rows. +.PP +Example: +.PP +.Vb 1 +\& RRDRowCount30m[myrouter]: 800 +.Ve +.SS "RRDRowCount2h" +.IX Subsection "RRDRowCount2h" +As per RRDRowCount, but for the \s-1RRA\s0's \-typically\- used for 2 hour data. +Even so, you must still take the base interval into account. Leaving out +this keyword will force the old default of 800 rows. +.PP +Example: +.PP +.Vb 1 +\& RRDRowCount2h[myrouter]: 400 +.Ve +.SS "RRDRowCount1d" +.IX Subsection "RRDRowCount1d" +As per RRDRowCount, but for the \s-1RRA\s0's \-typically\- used for 1 day data. +Even so, you must still take the base interval into account. Leaving out +this keyword will force the old default of 800 rows. +.PP +Example: +.PP +.Vb 1 +\& RRDRowCount1d[myrouter]: 200 +.Ve +.SS "RRDHWRRAs" +.IX Subsection "RRDHWRRAs" +Normally the RRDs created by \s-1MRTG\s0 will just contain the information gathered +directly from the respective target. With this option you can tap into +rrdtools advanced aberrant behaviour detection module based on Holt-Winters +forecasting. The RRDHWRRAs property specifies the Holt-Winters RRAs as +described in the rrdcreate manual page. +.PP +Note, this setting will only affect newly created RRDs (targets). +.PP +Example: +.PP +.Vb 1 +\& RRDHWRRAs[myrouter]: RRA:HWPREDICT:1440:0.1:0.0035:288 +.Ve +.SS "TimeStrPos" +.IX Subsection "TimeStrPos" +This defines placement of the timestamp string on the image. Possible +values are \s-1RU, LU, RL, LL \s0(which stand, respectively, for RightUpper, +LeftUpper, RightLower and LeftLower corner) and \s-1NO \s0(for no timestamp). +By default, no timestamp is placed on the image. +.PP +Example: +.PP +.Vb 1 +\& TimeStrPos[myrouter]: RU +.Ve +.SS "TimeStrFmt" +.IX Subsection "TimeStrFmt" +Using this keyword you may specify format of the timestamp to be placed +on the image (if enabled by the TimeStrPos keyword). Specified string +will be used by the \fIstrftime()\fR function \- see \fIstrftime\fR\|(3) documentation +for conversion specifiers available on your system. +Default format: \f(CW%Y\fR\-%m\-%d \f(CW%H:\fR%M +.PP +Example: +.PP +.Vb 1 +\& TimeStrFmt[myrouter]: %H:%M:%S +.Ve +.SH "THRESHOLD CHECKING" +.IX Header "THRESHOLD CHECKING" +Through its threshold checking functionality mrtg is able to detect +threshold problems for the various targets and can call external +scripts to handle those problems (e.g. send email or a page to an administrator). +.PP +Threshold checking is configured through the following parameters: +.SS "ThreshDir (\s-1GLOBAL\s0)" +.IX Subsection "ThreshDir (GLOBAL)" +By defining ThreshDir to point to a writable directory, \s-1MRTG\s0 will only alert +you when a threshold boundary has been crossed. +.PP +Example: +.PP +.Vb 1 +\& ThreshDir: /var/mrtg/thresh +.Ve +.SS "ThreshHyst (\s-1GLOBAL\s0)" +.IX Subsection "ThreshHyst (GLOBAL)" +If a threshold is broken, and you have a threshdir defined, then mrtg will +send mail once the threshold becomes 'unborken' to avoid situations where +broken and unbroken messages get sent in close succession, we only send an +unbroken message once the curent value is 0.1 (10%) away from the threshold. +using the ThreshHyst config variable you can customize this value. +.PP +Example for 5%: +.PP +.Vb 1 +\& ThreshHyst: 0.05 +.Ve +.SS "ThreshMailServer (\s-1GLOBAL\s0)" +.IX Subsection "ThreshMailServer (GLOBAL)" +Adderss of an \s-1SMTP\s0 server which is going to accept mail about Thresholds being broken and unbroken. +.SS "ThreshMailSender (\s-1GLOBAL\s0)" +.IX Subsection "ThreshMailSender (GLOBAL)" +What is the sender address of the threshold mail. +.PP +Example: +.PP +.Vb 1 +\& ThreshMailSender: mrtg@example.com +.Ve +.SS "ThreshMailAddress (\s-1PER TARGET\s0)" +.IX Subsection "ThreshMailAddress (PER TARGET)" +Email address for Threshold related Mails. This will only work if a mailserver has been configured. +.PP +Example: +.PP +.Vb 2 +\& ThreshMailAddress[_]: admin@example.com +\& ThreshMailAddress[router]: +.Ve +.PP +This would bring threshold releaed mail to all but the target called 'router'. +.SS "ThreshMinI (\s-1PER TARGET\s0)" +.IX Subsection "ThreshMinI (PER TARGET)" +This is the minimum acceptable value for the Input (first) parameter. If +the parameter falls below this value, the program specified in ThreshProgI +will be run and a mail will be sent to the ThreshMailAddress if specified. +If the value ends in '%' then the threshold is defined relative to MaxBytes. +.SS "ThreshMaxI (\s-1PER TARGET\s0)" +.IX Subsection "ThreshMaxI (PER TARGET)" +Works the same as TheshMinI but it acts when the value is higher than ThreshMaxI. +.SS "ThreshDesc (\s-1PER TARGET\s0)" +.IX Subsection "ThreshDesc (PER TARGET)" +Its value will be assigned to the environment variable \s-1THRESH_DESC\s0 before +any of the programs mentioned below are called. The programs can use the value +of this variable to produce more user-friendly output. +.SS "ThreshProgI (\s-1PER TARGET\s0)" +.IX Subsection "ThreshProgI (PER TARGET)" +This defines a program to be run if ThreshMinI or ThreshMaxI is broken. +\&\s-1MRTG\s0 passes 3 arguments: the \f(CW$router\fR variable, the threshold value +broken, and the current parameter value. +.SS "ThreshProgOKI (\s-1PER TARGET\s0)" +.IX Subsection "ThreshProgOKI (PER TARGET)" +This defines a program to be run if the parameter is currently \s-1OK \s0(based on +ThreshMinI and ThreshMaxI), but wasn't \s-1OK\s0 on the previous running \*(-- based +on the files found in ThreshDir. \s-1MRTG\s0 passes 3 arguments: the \f(CW$router\fR +variable the unbroken threshold value, and the current parameter value. +.SS "ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO" +.IX Subsection "ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO" +These work the same as their *I counterparts, except on the Output (second) +parameter. +.SS "SetEnv" +.IX Subsection "SetEnv" +When calling threshold scripts from within your cfg file you might want to +pass some data on to the script. This can be done with the SetEnv +configuration option which takes a series of environment variable +assignments. Note that the quotes are mandatory. This does not +work for external scripts. It is not +possible to set environment variables per target. +.PP +Example: +.PP +.Vb 2 +\& SetEnv[myrouter]: EMAIL="contact_email@someplace.net" +\& HOST="www.some_server.net" +.Ve +.SS "\s-1HW\s0 Failure Bassed Threshold Checking" +.IX Subsection "HW Failure Bassed Threshold Checking" +When using rrd based logging with \s-1HW\s0 RRAs defined. You can use the +confidence bounds violations stored in the \s-1FAILURES RRA\s0 for threshold based +alerts. +.PP +There the all target specific threshold variables have a Hold-Winters counterpart: +.PP +.Vb 3 +\& ThreshMailAddress \-> HWThreshMailAddress +\& ThreshMinI \-> HWThreshMinI +\& ... +.Ve +.PP +The global variables for threshold checking are shared except for the +.PP +.Vb 1 +\& ThreshHyst \-> HWThreshHyst +.Ve +.PP +And HWThreshDesc sets the \s-1HWTHRESH_DESC\s0 variable. +.SH "PER TARGET DEFAULT VALUES" +.IX Header "PER TARGET DEFAULT VALUES" +.SS "Pre\- and Postfix" +.IX Subsection "Pre- and Postfix" +To save yourself some typing you can define a target +called '^'. The text of every Keyword you define for this +target will be \s-1PREPENDED\s0 to the corresponding Keyword of +all the targets defined below this line. The same goes for +a Target called '$' but its text will be \s-1APPENDED.\s0 +.PP +Note that a space is inserted between the prepended text +and the Keyword value, as well as between the Keyword value +and the appended text. This works well for text-valued Keywords, +but is not very useful for other Keywords. See the \*(L"default\*(R" +target description below. +.PP +The example will make mrtg use a common header and a +common contact person in all the pages generated from +targets defined later in this file. +.PP +Example: +.PP +.Vb 2 +\& PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR> +\& PageTop[$]: Contact Peter Norton if you have any questions<HR> +.Ve +.PP +To remove the prepend/append value, specify an empty value, e.g.: +.PP +.Vb 2 +\& PageTop[^]: +\& PageTop[$]: +.Ve +.SS "NoSpaceChar" +.IX Subsection "NoSpaceChar" +With \s-1PREPEND\s0 and \s-1APPEND \s0(see below) there is normally a space inserted +between the local value and the \s-1PRE\-\s0 or \s-1APPEND\s0 value. Sometimes this is not +desirable. You can use the global option \fINoSpaceChar\fR to +define a character which can be mentioned at the end of a $ or ^ definition +in order to supress the space. +.PP +Example: +.PP +.Vb 6 +\& NoSpaceChar: ~ +\& Target[^]: 1.3.6.1.4.1.482.50.2.4.20.0&1.3.6.1.4.1.482.50.2.4.21.0:get@~ +\& Target[a]: a.tolna.net +\& Target[b]: b.tolna.net +\& Target[c]: c.tolna.net +\& Target[d]: d.tolna.net +.Ve +.SS "Default Values" +.IX Subsection "Default Values" +The target name '_' specifies a default value for that +Keyword. In the absence of explicit Keyword value, the prepended +and the appended keyword value, the default value will be used. +.PP +Example: +.PP +.Vb 5 +\& YSize[_]: 150 +\& Options[_]: growright,bits,nopercent +\& WithPeak[_]: ymw +\& Suppress[_]: y +\& MaxBytes[_]: 1250000 +.Ve +.PP +To remove the default value and return to the 'factory default', +specify an empty value, e.g.: +.PP +.Vb 1 +\& YLegend[_]: +.Ve +.PP +There can be several instances of setting the default/prepend/append +values in the configuration file. The later setting replaces the +previous one for the rest of the configuration file. +The default/prepend/append values used for a given +keyword/target pair are the ones that were in effect +at the point in the configuration file where the target +was mentioned for the first time. +.PP +Example: +.PP +.Vb 4 +\& MaxBytes[_]: 1250000 +\& Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu +\& MaxBytes[_]: 8000 +\& Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2 +.Ve +.PP +The default \fIMaxBytes\fR for the target myrouter.someplace.edu.2 +in the above example will be 1250000, which was in effect +where the target name myrouter.someplace.edu.2 first appeared +in the config file. +.SH "COMMAND LINE OPTIONS" +.IX Header "COMMAND LINE OPTIONS" +.IP "\fB\-\-user\fR \fIusername\fR and \fB\-\-group\fR \fIgroupname\fR" 4 +.IX Item "--user username and --group groupname" +Run as the given user and/or group. (Unix Only) +.IP "\fB\-\-lock\-file\fR \fIfilename\fR" 4 +.IX Item "--lock-file filename" +Use an alternate lock-file (the default is to use the configuration-file +appended with \f(CW\*(C`_l\*(C'\fR). +.IP "\fB\-\-confcache\-file\fR \fIfilename\fR" 4 +.IX Item "--confcache-file filename" +Use an alternate confcache-file (the default is to use the +configuration-file appended with \f(CW\*(C`.ok\*(C'\fR) +.IP "\fB\-\-logging\fR \fIfilename\fR|\fBeventlog\fR" 4 +.IX Item "--logging filename|eventlog" +If this is set to writable filename, all output from mrtg (warnings, debug +messages, errors) will go to \fIfilename\fR. If you are running on Win32 you +can specify \fBeventlog\fR instead of a filename which will send all error to +the windows event log. +.Sp +\&\fB\s-1NOTE:\s0\fR Note, there is no Message \s-1DLL\s0 for mrtg included with mrtg. This has +the side effect that the windows event logger will display a nice message +with every entry in the event log, complaing about the fact that mrtg has no +message dll. If you go to the mrtg contrib download area (on the website) +you will find the mrtg\-message\-dll.zip which does contain such a thing. +.IP "\fB\-\-daemon\fR" 4 +.IX Item "--daemon" +Put \s-1MRTG\s0 into the background, running as a daemon. This works the same way as +the config file option, but the switch is required for proper \s-1FHS\s0 operation +(because /var/run is writable only by root) +.IP "\fB\-\-fhs\fR" 4 +.IX Item "--fhs" +Configure all mrtg paths to conform to the \s-1FHS\s0 specification; +http://www.pathname.com/fhs/ +.IP "\fB\-\-check\fR" 4 +.IX Item "--check" +Only check the cfg file for errors. Do not do anything. +.IP "\fB\-\-pid\-file=s\fR" 4 +.IX Item "--pid-file=s" +Define the name and path of the pid file for mrtg running as a daemon +.IP "\fB\-\-debug=s\fR" 4 +.IX Item "--debug=s" +Enable debug options. The argument of the debug option is a comma separated +list of debug values: +.Sp +.Vb 11 +\& cfg \- watch the config file reading +\& dir \- directory mangeling +\& base \- basic program flow +\& tarp \- target parser +\& snpo \- snmp polling +\& coca \- confcache operations +\& fork \- forking view +\& time \- some timing info +\& log \- logging of data via rateup or rrdtool +\& eval \- print eval strings before evaluting them +\& prof \- add hires timing info the rrd calls +.Ve +.Sp +Example: +.Sp +.Vb 1 +\& \-\-debug="cfg,snpo" +.Ve +.SH "EXIT CODES" +.IX Header "EXIT CODES" +An exit code of 0 indicates that all targets were successful. Generally +speaking, most codes greater than 0 indicate that there was an unrecoverable +problem. One exception to this is code 91, which indicates that at least +one of the targets was successful. A partial listing of the codes follows: +.PP +.Vb 1 +\& 0: All targets sucessful +\& +\& 2: Config error (can\*(Aqt read, fatal error in config, etc) +\& 17: Another MRTG process is processing config +\& +\& 91: At least one target sucessful +\& 92: No targets were sucessful +.Ve +.SH "EXAMPLES" +.IX Header "EXAMPLES" +.SS "Minimal mrtg.cfg" +.IX Subsection "Minimal mrtg.cfg" +.Vb 5 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +\& Target[r1]: 2:public@myrouter.somplace.edu +\& MaxBytes[r1]: 8000 +\& Title[r1]: Traffic Analysis ISDN +\& PageTop[r1]: <H1>Stats for our ISDN Line</H1> +.Ve +.SS "Cfg for several Routers." +.IX Subsection "Cfg for several Routers." +.Vb 6 +\& WorkDir: /usr/tardis/pub/www/stats/mrtg +\& Title[^]: Traffic Analysis for +\& PageTop[^]: <H1>Stats for +\& PageTop[$]: Contact The Chief if you notice anybody<HR> +\& MaxBytes[_]: 8000 +\& Options[_]: growright +\& +\& Title[isdn]: our ISDN Line +\& PageTop[isdn]: our ISDN Line</H1> +\& Target[isdn]: 2:public@router.somplace.edu +\& +\& Title[backb]: our Campus Backbone +\& PageTop[backb]: our Campus Backbone</H1> +\& Target[backb]: 1:public@router.somplace.edu +\& MaxBytes[backb]: 1250000 +\& +\& # the following line removes the default prepend value +\& # defined above +\& +\& Title[^]: +\& +\& Title[isdn2]: Traffic for the Backup ISDN Line +\& PageTop[isdn2]: our ISDN Line</H1> +\& Target[isdn2]: 3:public@router.somplace.edu +.Ve +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> and many contributors diff --git a/src/doc/mrtg-reference.pod b/doc/mrtg-reference.pod index f1a444d..f1a444d 100644 --- a/src/doc/mrtg-reference.pod +++ b/doc/mrtg-reference.pod diff --git a/doc/mrtg-reference.txt b/doc/mrtg-reference.txt new file mode 100644 index 0000000..fd8b378 --- /dev/null +++ b/doc/mrtg-reference.txt @@ -0,0 +1,2051 @@ +MRTG-REFERENCE(1) mrtg MRTG-REFERENCE(1) + + + +NNAAMMEE + mrtg-reference - MRTG 2.17.7 configuration reference + +OOVVEERRVVIIEEWW + The runtime behaviour of MRTG is governed by a configuration file. + Run-of-the-mill configuration files can be generated with ccffggmmaakkeerr. + (Check cfgmaker). But for more elaborate configurations some hand- + tuning is required. + + This document describes all the configuration options understood by the + mrtg software. + +SSYYNNTTAAXX + MRTG configuration file syntax follows some simple rules: + + +o Keywords must start at the beginning of a line. + + +o Lines which follow a keyword line which start with a blank are + appended to the keyword line + + +o Empty Lines are ignored + + +o Lines starting with a # sign are comments. + + +o You can add other files into the configuration file using + + IInncclluuddee:: _f_i_l_e + + Example: + + Include: base-options.inc + + If included files are specified with relative paths, both the + current working directory and the directory containing the main + config file will be searched for the files. The current working + directory will be searched first. + + If the included filename contains an asterisk, then this is taken + as a wildcard for zero or more characters, and all matching files + are included. Thus, you can use this statement to include all + files in a specified subdirectory. + + Example: + + Include: servers/*.cfg + + In this case, you should be very careful that your wildcard pattern + does not find a match relative to the current working directory if + you mean it to be relative to the main config file directory, since + the working directory is checked for a match first (as with a + normal Include directive). Therefore, use of something like '*/*' + is discouraged. + +GGLLOOBBAALL KKEEYYWWOORRDDSS + WWoorrkkDDiirr + WorkDir specifies where the logfiles and the webpages should be + created. + + Example: + + WorkDir: /usr/tardis/pub/www/stats/mrtg + +OOPPTTIIOONNAALL GGLLOOBBAALL KKEEYYWWOORRDDSS + HHttmmllDDiirr + HtmlDir specifies the directory where the html (or shtml, but we'll get + on to those later) lives. + + NOTE: Workdir overrides the settings for htmldir, imagedir and logdir. + + Example: + + Htmldir: /www/mrtg/ + + IImmaaggeeDDiirr + ImageDir specifies the directory where the images live. They should be + under the html directory. + + Example: + + Imagedir: /www/mrtg/images + + LLooggDDiirr + LogDir specifies the directory where the logs are stored. This need + not be under htmldir directive. + + Example: + + Logdir: /www/mrtg/logs + + FFoorrkkss ((UUNNIIXX oonnllyy)) + With system that supports fork (UNIX for example), mrtg can fork itself + into multiple instances while it is acquiring data via snmp. + + For situations with high latency or a great number of devices this will + speed things up considerably. It will not make things faster, though, + if you query a single switch sitting next door. + + As far as I know NT can not fork so this option is not available on NT. + + Example: + + Forks: 4 + + EEnnaabblleeIIPPvv66 + When set to yes, IPv6 support is enabled if the required libraries are + present (see the mrtg-ipv6 manpage). When IPv6 is enabled, mrtg can + talk to routers using SNMP over IPv6 and targets may be specified by + their numeric IPv6 addresses as well as by hostname or IPv4 address. + + If IPv6 is enabled and the target is a hostname, mrtg will try to + resolve the hostname to an IPv6 address and, if this fails, to an IPv4 + address. Note that mrtg will only use IPv4 if you specify an IPv4 + address or a hostname with no corresponding IPv6 address; it will not + fall back to IPv4 if it simply fails to communicate with the target + using IPv6. This is by design. + + Note that many routers do not currently support SNMP over IPv6. Use the + _I_P_v_4_O_n_l_y per target option for these routers. + + IPv6 is disabled by default. + + Example: + + EnableIPv6: Yes + + EEnnaabblleeSSnnmmppVV33 + When set to yes, uses the Net::SNMP module instead of the SNMP_SESSION + module for generating snmp queries. This allows the use of SNMPv3 if + other snmpv3 parameters are set. + + SNMPv3 is disabled by default. + + Example: + + EnableSnmpV3: yes + + RReeffrreesshh + How many seconds apart should the browser (Netscape) be instructed to + reload the page? If this is not defined, the default is 300 seconds (5 + minutes). + + Example: + + Refresh: 600 + + IInntteerrvvaall + How often do you call mrtg? The default is 5 minutes. If you call it + less often, you should specify it here. This does two things: + + +o The generated HTML page contains the right information about the + calling interval ... + + +o A META header in the generated HTML page will instruct caches about + the time-to-live of this page ..... + + In this example, we tell mrtg that we will be calling it every 10 + minutes. If you are calling mrtg every 5 minutes, you can leave this + line commented out. + + Example: + + Interval: 10 + + Note that unless you are using rrdtool you can not set Interval to less + than 5 minutes. If you are using rrdtool you can set interval in the + format + + Interval: MM[:SS] + + Down to 1 second. Note though, setting the Interval for an rrdtool/mrtg + setup will influence the initial creation of the database. If you + change the interval later, all existing databases will remain at the + resolution they were initially created with. Also note that you must + make sure that your mrtg-rrd Web-frontend can deal with this kind of + Interval setting. + + MMaaxxAAggee + MRTG relies heavily on the real time clock of your computer. If the + time is set to a wrong value, especially if it is advanced far into the + future, this will cause mrtg to expire lots of supposedly old data from + the log files. + + To prevent this, you can add a 'reasonability' check by specifying a + maximum age for log files. If a file seems to be older, mrtg will not + touch it but complain instead, giving you a chance to investigate the + cause. + + Example: + + MaxAge: 7200 + + The example above will make mrtg refuse to update log files older than + 2 hours (7200 seconds). + + WWrriitteeEExxppiirreess + With this switch mrtg will generate .meta files for CERN and Apache + servers which contain Expiration tags for the html and gif files. The + *.meta files will be created in the same directory as the other files, + so you will have to set "MetaDir ." and "MetaFiles on" in your + apache.conf or .htaccess file for this to work + + NOTE: If you are running Apache-1.2 or later, you can use the + mod_expire to achieve the same effect ... see the file htaccess.txt + + Example: + + WriteExpires: Yes + + NNooMMiibb22 + Normally we ask the SNMP device for 'sysUptime' and 'sysName' + properties. Some do not have these. If you want to avoid getting + complaints from mrtg about these missing properties, specify the nomib2 + option. + + An example of agents which do not implement base mib2 attributes are + Computer Associates - Unicenter TNG Agents. CA relies on using the + base OS SNMP agent in addition to its own agents to supplement the + management of a system. + + Example: + + NoMib2: Yes + + SSiinngglleeRReeqquueesstt + Some SNMP implementations can not deal with requests asking for + multiple snmp variables in one go. Set this in your cfg file to force + mrtg to only ask for one variable per request. + + Examples + + SingleRequest: Yes + + SSnnmmppOOppttiioonnss + Apart from the per target timeout options, you can also configure the + behaviour of the snmpget process on a more profound level. SnmpOptions + accepts a hash of options. The following options are currently + supported: + + timeout => $default_timeout, + retries => $default_retries, + backoff => $default_backoff, + default_max_repetitions => $max_repetitions, + use_16bit_request_ids => 1, + lenient_source_port_matching => 0, + lenient_source_address_matching => 1 + + The values behind the options indicate the current default value. Note + that these settings OVERRIDE the per target timeout settings. + + A per-target SnmpOptions[] keyword will override the global settings. + That keyword is primarily for SNMPv3. + + The 16bit request ids are the only way to query the broken SNMP + implementation of SMC Barricade routers. + + Example: + + SnmpOptions: retries => 2, only_ip_address_matching => 0 + + Note that AS/400 snmp seems to be broken in a way which prevents mrtg + from working with it unless + + SnmpOptions: lenient_source_port_matching => 1 + + is set. + + IIccoonnDDiirr + If you want to keep the mrtg icons in someplace other than the working + (or imagedir) directory, use the _I_c_o_n_D_i_r variable for defining the url + of the icons directory. + + Example: + + IconDir: /mrtgicons/ + + LLooaaddMMIIBBss + Load the MIB file(s) specified and make its OIDs available as symbolic + names. For better efficiancy, a cache of MIBs is maintained in the + WorkDir. + + Example: + + LoadMIBs: /dept/net/mibs/netapp.mib,/usr/local/lib/ft100m.mib + + LLaanngguuaaggee + Switch output format to the selected Language (Check the _t_r_a_n_s_l_a_t_e + directory to see which languages are supported at the moment. In this + directory you can also find instructions on how to create new + translations). + + Currently the following laguages are supported: + + big5 brazilian bulgarian catalan chinese croatian czech danish dutch + eucjp french galician gb gb2312 german greek hungarian icelandic + indonesia iso2022jp italian korean lithuanian malay norwegian polish + portuguese romanian russian russian1251 serbian slovak slovenian + spanish swedish turkish ukrainian + + Example: + + Language: danish + + LLooggFFoorrmmaatt + Setting LogFormat to 'rrdtool' in your mrtg.cfg file enables rrdtool + mode. In rrdtool mode, mrtg relies on rrrrddttooooll to do its logging. See + mrtg-rrd. + + Example: + + LogFormat: rrdtool + + LLiibbAAdddd + If you are using rrdtool mode and your rrrrddttooooll Perl module (RRDs.pm) is + not installed in a location where perl can find it on its own, you can + use LibAdd to supply an appropriate path. + + Example: + + LibAdd: /usr/local/rrdtool/lib/perl/ + + PPaatthhAAdddd + If the rrrrddttooooll executable can not be found in the normal "PATH", you + can use this keyword to add a suitable directory to your path. + + Example: + + PathAdd: /usr/local/rrdtool/bin/ + + RRRRDDCCaacchheedd + If you are running RRDTool 1.4 or later with rrrrddccaacchheedd, then you can + configure MRTG to take advantage of this for updates, either by using + the RRDCACHED_ADDRESS environment variable, or by setting the RRDCached + keyword in the configuration file. Note that, if both are set, the + configuration file keyword will take precedence. + + Only UNIX domain sockets are fully supported prior to RRDTool v1.5, and + you should note that using RRDCached mode will disable all Threshold + checking normally done by MRTG. Appropriate warning messages will be + printed if necessary. + + Examples: + + RRDCached: unix:/var/tmp/rrdcached.sock + + RRDCached: localhost:42217 + + RRuunnAAssDDaaeemmoonn + The RunAsDaemon keyword enables daemon mode operation. The purpose of + daemon mode is that MRTG is launched once and not repeatedly (as it is + with cron). This behavior saves computing resourses as loading and + parsing of configuration files happens only once on startup, and if the + configuration file is modified. + + Using daemon mode MRTG itself is responible for timing the measurement + intervals. Therfore its important to set the Interval keyword to an + apropiate value. + + Note that when using daemon mode MRTG should no longer be started from + cron as each new process runs forever. Instead MRTG should be started + from the command prompt or by a system startup script. + + If you want mrtg to run under a particular user and group (it is not + recomended to run MRTG as root) then you can use the ----uusseerr==_u_s_e_r___n_a_m_e + and ----ggrroouupp==_g_r_o_u_p___n_a_m_e options on the mrtg commandline. + + mrtg --user=mrtg_user --group=mrtg_group mrtg.cfg + + Also note that in daemon mode restarting the process is required in + order to activate changes in the config file. + + Under UNIX, the Daemon switch causes mrtg to fork into background after + checking its config file. On Windows NT the MRTG process will detach + from the console, but because the NT/2000 shell waits for its children + you have to use this special start sequence when you launch the + program: + + start /b perl mrtg mrtg.cfg + + You may have to add path information equal to what you add when you run + mrtg from the commandline. + + Example + + RunAsDaemon: Yes + Interval: 5 + + This makes MRTG run as a daemon beginning data collection every 5 + minutes + + If you are daemontools and still want to run mrtg as a daemon you can + additionally specify + + NoDetach: Yes + + this will make mrtg run but without detaching it from the terminal. + + If the modification date on the configuration file changes during + operation, then MRTG will re-read the configuration on the next polling + cycle. Note that sub-files which are included from the main + configuration do not have their modification times monitored, only the + top-level file is so checked. + + CCoonnvveerrssiioonnCCooddee + Some devices may produce non-numeric values that would nevertheless be + useful to graph with MRTG if those values could be converted to + numbers. The ConversionCode keyword specifies the path to a file + containing Perl code to perform such conversions. The code in this file + must consist of one or more Perl subroutines. Each subroutine must + accept a single string argument and return a single numeric value. When + RRDtool is in use, a decimal value may be returned. When the name of + one of these subroutines is specified in a target definition (see + below), MRTG calls it twice for that target, once to convert the the + input value being monitored and a second time to convert the output + value. The subroutine must return an undefined value if the conversion + fails. In case of failure, a warning may be posted to the MRTG log file + using Perl's warn function. MRTG imports the subroutines into a + separate name space (package MRTGConversion), so the user need not + worry about pollution of MRTG's global name space. MRTG automatically + prepends this package declaration to the user-supplied code. + + Example: Suppose a particular OID returns a character string whose + length is proportional to the value to be monitored. To convert this + string to a number that can be graphed by MRTG, create a file + arbitrarily named "MyConversions.pl" containing the following code: + + # Return the length of the string argument + sub Length2Int { + my $value = shift; + return length( $value ); + } + + Then include the following global keyword in the MRTG configuration + file (assuming that the conversion code file is saved in the mrtg/bin + directory along with mrtg itself): + + ConversionCode: MyConversions.pl + + This will cause MRTG to include the definition of the subroutine + Length2Int in its execution environment. Length2Int can then be invoked + on any target by appending "|Length2Int" to the target definition as + follows: + + Target[myrouter]: 1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.1:public@mydevice|Length2Int + + See "Extended Host Name Syntax" below for complete target definition + syntax information. + + SSeennddTTooGGrraapphhiittee + If you want to send a copy of the collected data into a Graphite + database in addition to storing it in the RRDfile, you can provide your + Graphite database name/ip and port number here. + + This requires the Net::Graphite perl module which is available from + CPAN. + + Examples: + + # If your Graphite receiver is running on the same host as the MRTG daemon and using the default port + SendToGraphite: 127.0.0.1,2003 + + # If your Graphite receiver is running on 192.168.100.50 port 5000 + SendToGraphite: 192.168.100.50,5000 + + # If your Graphite receiver is running on graphite.mydomain.com port 2003 + SendToGraphite: graphite.mydomain.com,2003 + + Graphite's namespace has a number of restrictions on what characters + are allowed. The SendToGraphite functionality makes an attempt to + convert the MRTG target name and, if specified, the Legendi and Legendo + values to Graphite namespace friendly values. Specifically, the + following conversion rules apply: + + +o Underscores in the target_name are converted to periods which are + Graphite namespace delimiters. + + +o Comma characters are not allowed so they are removed. + + +o The string "m2g" for MRTG to Graphite is prepended onto the + Graphite namespace variable. + + Example MRTG target to Graphite namespace conversion: + + # Our MRTG target name from mrtg.cfg is as follows + Target[switch_GigabitEthernet0_5]: \GigabitEthernet0/5:public1@switch:::::2 + + After the conversion you will end up with these Graphite namespace + values + + m2g.switch.gigabitethernet0.5.in + m2g.switch.gigabitethernet0.5.out + + Next is a more complicated example because Legendi and Legendo are in + use to denote min and max voltage values that pertain to some APC UPS + SNMP OIDs + + # Target, Legendi, and Legendo are specified in mrtg.cfg as follows + Target[apc_minmaxline]: 1.3.6.1.4.1.318.1.1.1.3.2.3.0&1.3.6.1.4.1.318.1.1.1.3.2.2.0:public@apc: + LegendI[apc_minmaxline]: upsAdvInputMinLineVoltage + LegendO[apc_minmaxline]: upsAdvInputMaxLineVoltage + + After the conversion you will end up with these Graphite namespace + values + + m2g.apc.minmaxline.upsAdvInputMinLineVoltage + m2g.apc.minmaxline.upsAdvInputMaxLineVoltage + + If you don't see the data showing up in Graphite, chances are there are + invalid characters in the namespace. To debug this, use the + DEBUG=qw(log) directive at the top of the MRTG script to find out what + is happening with the MRTG to Graphite namespace conversion. + + DEBUG=qw(log) will generate some output similar to what appears below + + 2016-10-13 06:08:39 -- --log: RRDs::update(/var/www/mrtg/switch/switch_gigabitethernet0_5.rrd, '1476356919:2738746035:2927936327') + 2016-10-13 06:08:39 -- --log: graphite->send(m2g.switch.gigabitethernet0.5.in,2738746035,1476356919) + + 2016-10-13 06:08:39 -- --log: graphite->send(m2g.switch.gigabitethernet0.5.out,2927936327,1476356919) + + 2016-10-13 06:09:25 -- --log: RRDs::update(/var/www/mrtg/apc/apc_minmaxline.rrd, '1476356965:122:123') + 2016-10-13 06:09:25 -- --log: graphite->send(m2g.apc.minmaxline.upsAdvInputMinLineVoltage,122,1476356965) + + 2016-10-13 06:09:25 -- --log: graphite->send(m2g.apc.minmaxline.upsAdvInputMaxLineVoltage,123,1476356965) + + If the MRTG log output looks reasonable, then take a look at Graphite's + carbon-cache logs. + +PPEERR TTAARRGGEETT CCOONNFFIIGGUURRAATTIIOONN + Each monitoring target must be identified by a unique name. This name + must be appended to each parameter belonging to the same target. The + name will also be used for naming the generated webpages, logfiles and + images for this target. + + TTaarrggeett + With the _T_a_r_g_e_t keyword you tell mrtg what it should monitor. The + _T_a_r_g_e_t keyword takes arguments in a wide range of formats: + + Basic + The most basic format is "port:community@router" This will generate + a traffic graph for the interface 'port' of the host 'router' (dns + name or IP address) and it will use the community 'community' (snmp + password) for the snmp query. + + Example: + + Target[myrouter]: 2:public@wellfleet-fddi.domain + + If your community contains a "@" or a " " these characters must be + escaped with a "\". + + Target[bla]: 2:stu\ pi\@d@router + + SNMPv2c + If you have a fast router you might want to try to poll the ifHC* + counters. This feature gets activated by switching to SNMPv2c. + Unfortunately not all devices support SNMPv2c yet. If it works, + this will prevent your counters from wraping within the 5 minute + polling interval, since we now use 64 bit instead of the normal 32 + bit. + + Example: + + Target[myrouter]: 2:public@router1:::::2 + + SNMPv3 + As an alternative to SNMPv2c, SNMPv3 provides access to the ifHC* + counters, along with encryption. Not all devices support SNMPv3, + and you will also need the perl Net::SNMP library in order to use + it. It is recommended that cfgmaker be used to generate + configurations involving SNMPv3, as it will check if the Net::SNMP + library is loadable, and will switch to SNMPv2c if v3 is + unavailable. + + SNMP v3 requires additional authentication parameters, passed using + the SnmpOptions[] per-target keyword. + + Example: + Target[myrouter]: 2:router1:::::3 + SnmpOptions[myrouter]: username=>'user1' + + noHC + Not all routers that support SNMPv2 or SNMPv3 provide the ifHC* + counters on every interface. The noHC[] per-target keyword signals + that the low-speed counters ifInOctets and ifOutOctets should be + queried instead. cfgmaker will automatically insert this tag if + SNMPv2 or SNMPv3 is specified but the ifHC* counters are + unavailable. + + Example: + Target[myrouter]: #Bri0:router1:::::3 + SnmpOptions[myrouter]: username=>'user1' + noHC[myrouter]: yes + + Reversing + Sometimes you are sitting on the wrong side of the link, and you + would like to have mrtg report Incoming traffic as Outgoing and + vice versa. This can be achieved by adding the '-' sign in front of + the "Target" description. It flips the incoming and outgoing + traffic rates. + + Example: + + Target[ezci]: -1:public@ezci-ether.domain + + Explicit OIDs + You can also explicitly define which OID to query by using the + following syntax 'OID_1&OID_2:community@router' The following + example will retrieve error counts for input and output on + interface 1. MRTG needs to graph two variables, so you need to + specify two OID's such as temperature and humidity or error input + and error output. + + Example: + + Target[myrouter]: 1.3.6.1.2.1.2.2.1.14.1&1.3.6.1.2.1.2.2.1.20.1:public@myrouter + + MIB Variables + MRTG knows a number of symbolic SNMP variable names. See the file + mibhelp.txt for a list of known names. One example are the + ifInErrors and ifOutErrors. This means you can specify the above + as: + + Example: + + Target[myrouter]: ifInErrors.1&ifOutErrors.1:public@myrouter + + SnmpWalk + It may be that you want to monitor an snmp object that is only + reachable by 'walking'. You can get mrtg to walk by prepending the + OID with the string WWaaLLKK or if you want a particular entry from the + table returned by the walk you can use WWaaLLKK_x where _x is a number + starting from 0 (!). + + Example: + + Target[myrouter]: WaLKstrangeOid.1&WaLKstrangeOid.2:public@myrouter + + Target[myrouter]: WaLK3strangeOid.1&WaLK4strangeOid.2:public@myrouter + + SnmpGetNext + A special case of an snmp object that is only reachable by + 'walking' occurs when a single snmpgetnext will return the correct + value, but snmpwalk fails. This may occur with snmp V2 or V3, as + the snmpgetbulk method is used in these versions. You can get mrtg + to use getnext instead of getbulk by prepending the OID with the + string GGeeTTNNEEXXTT. + + Example: + + Target[myrouter]: GeTNEXTstrangeOid&GeTNEXTstrangeOid:public@myrouter + + Counted SNMP Walk + In other situations, an snmpwalk is needed to count rows, but the + actual data is uninteresting. For example, counting the number of + mac-addresses in a CAM table, or the number of simultaneous dialup + sessions. You can get MRTG to count the number of instances by + prepending the OID with the string CCnnTTWWaaLLKK. The following will + retrieve the number of simultaneous VOIP calls on some routers: + + Example: + + Target[myrouter]: CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3&CnTWaLK1.3.6.1.4.1.9.10.55.1.1.1.1.3:public@myrouter + + Interface by IP + Sometimes SNMP interface index can change, like when new interfaces + are added or removed. This can cause all Target entries in your + config file to become offset, causing MRTG to graphs wrong + instances etc. MRTG supports IP address instead of ifindex in + target definition. Then MRTG will query snmp device and try to map + IP address to the current ifindex. You can use IP addresses in + every type of target definition by adding IP address of the + numbered interface after OID and separation char '/'. + + Make sure that the given IP address is used on your same target + router, especially when graphing two different OIDs and/or + interface split by '&' delimiter. + + You can tell cfgmaker to generate such references with the option + ----iiffrreeff==iipp. + + Example: + + Target[myrouter]: /1.2.3.4:public@wellfleet-fddi.domain + Target[ezci]: -/1.2.3.4:public@ezci-ether.domain + Target[myrouter]: ifInErrors/1.2.3.4&ifOutErrors/1.2.3.4:public@myrouter + + Interface by Description + If you can not use IP addresses you might want to use the interface + names. This works similar to the IP address aproach except that the + prefix to use is a \ instead of a / + + You can tell cfgmaker to generate such references with the option + ----iiffrreeff==ddeessccrr. + + Example: + + Target[myrouter]: \My-Interface2:public@wellfleet-fddi.domain + Target[ezci]: -\My-Interface2:public@ezci-ether.domain + Target[myrouter]: ifInErrors\My-If2&ifOutErrors\My-If3:public@myrouter + + If your description contains a "&", a ":", a "@" or a " " you can + include them but you must escape with a backlash: + + Target[myrouter]: \fun\:\ ney\&ddd:public@hello.router + + Interface by Name + This is the only sensible way to reference the interfaces of your + switches. + + You can tell cfgmaker to generate such references with the option + ----iiffrreeff==nnaammee. + + Example: + + Target[myrouter]: #2/11:public@wellfleet-fddi.domain + Target[ezci]: -#2/11:public@ezci-ether.domain + Target[myrouter]: ifInErrors#3/7&ifOutErrors#3/7:public@myrouter + + If your description contains a "&", a ":", a "@" or a " " you can + include them but you must escape with a backlash: + + Target[myrouter]: #\:\ fun:public@hello.router + + Note that the # sign will be interpreted as a comment character if + it is the first non white-space character on the line. + + Interface by Ethernet Address + When the SNMP interface index changes, you can key that interface + by its 'Physical Address', sometimes called a 'hard address', which + is the SNMP variable 'ifPhysAddress'. Internally, MRTG matches the + Physical Address from the *.cfg file to its current index, and then + uses that index for the rest of the session. + + You can use the Physical Address in every type of target definition + by adding the Physical Address after the OID and the separation + char '!' (analogous to the IP address option). The Physical + address is specified as '-' delimited octets, such as + "0a-0-f1-5-23-18" (omit the double quotes). Note that some routers + use the same Hardware Ethernet Address for all of their Interfaces + which prevents unique interface identification. Mrtg will notice + such problems and alert you. + + You can tell cfgmaker to generate configuration files with hardware + ethernet address references by using the option ----iiffrreeff==eetthh. + + Example: + + Target[myrouter]: !0a-0b-0c-0d:public@wellfleet-fddi.domain + Target[ezci]: -!0-f-bb-05-71-22:public@ezci-ether.domain + Target[myrouter]: 1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51& *BREAK* + 1.3.6.1.2.1.2.2.1.14!0a-00-10-23-44-51:public@myrouter + Target[myrouter]: ifInErrors!0a-00-10-23-44-51& *BREAK* + ifOutErrors!0a-00-10-23-44-51:public@myrouter + + Join the lines at *BREAK* ... + + Interface by Type + It seems that there are devices that try to defy all monitoring + efforts: the interesting interfaces have neither ifName nor a + constant ifDescr not to mention a persistent ifIndex. The only way + to get a constant mapping is by looking at the interface type, + because the interface you are interested in is unique in the device + you are looking at ... + + You can tell cfgmaker to generate such references with the option + ----iiffrreeff==ttyyppee. + + Example: + + Target[myrouter]: %13:public@wellfleet-fddi.domain + Target[ezci]: -%13:public@ezci-ether.domain + Target[myrouter]: ifInErrors%13&ifOutErrors%14:public@myrouter + + Extended positioning of ifIndex + There are OIDs that contain the interface index at some inner + position within the OID. To use the above mentioned Interface by + IP/Description/Name/Type methods in the target definition the + keyword 'IndexPOS' can be used to indicate the position of ifIndex. + If 'IndexPOS' is not used the ifIndex will be appended at the end + of the OID. + + Example: + + Target[myrouter]: OID.IndexPOS.1/1.2.3.4&OID.IndexPOS.1/1.2.3.4:public@myrouter + + Replace OID by your numeric OID. + + Extended Host Name Syntax + In all places where ``community@router'' is accepted, you can add + additional parameters for the SNMP communication using colon- + separated suffixes. You can also append a pipe symbol ( | ) and the + name of a numeric conversion subroutine as described under the + global keyword "ConversionCode" above. The full syntax is as + follows: + + community@router[:[port][:[timeout][:[retries][:[backoff][:[version]]]]][|name] + + where the meaning of each parameter is as follows: + + port + the UDP port under which to contact the SNMP agent (default: + 161) + + The complete syntax of the port parameter is + + remote_port[!local_address[!local_port]] + + Some machines have additional security features that only allow + SNMP queries to come from certain IP addresses. If the host + doing the query has multiple interface, it may be necessary to + specify the interface the query should come from. + + The port parameter allows the specification of the port of the + machine being queried. In addition, the IP address (or + hostname) and port of the machine doing the query may be + specified. + + Examples: + + somehost + somehost:161 + somehost:161!192.168.2.4!4000 use 192.168.2.4 and port 4000 as source + somehost:!192.168.2.4 use 192.168.2.4 as source + somehost:!!4000 use port 4000 as source + + timeout + initial timeout for SNMP queries, in seconds (default: 2.0) + + retries + number of times a timed-out request will be retried (default: + 5) + + backoff + factor by which the timeout is multiplied on every retry + (default: 1.0). + + version + for SNMP version. If you have a fast router you might want to + put a '2' here. For authenticated or encrypted SNMP, you can + try to put a '3' here. This will make mrtg try to poll the 64 + bit counters and thus prevent excessive counter wrapping. Not + all routers support this though. SNMP v3 requires additional + setup, see SnmpOptions[] for full details. + + Example: + + 3:public@router1:::::2 + + name + the name of the subroutine that MRTG will call to convert the + input and output values to integers. See the complete example + under the global keyword "ConversionCode" above. + + Example: + + 1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.2:public@mydevice:161::::2|Length2Int + + This would retrieve values from the OID 1.3.6.1.4.1.999.1 for + input and .2 for output on mydevice using UDP port 161 and SNMP + version 2, and would execute the user-defined numeric + conversion subroutine Length2Int to convert those values to + integers. + + A value that equals the default value can be omitted. Trailing + colons can be omitted, too. The pipe symbol followed by the name + parameter, if present, must come at the end. There must be no + spaces around the colons or pipe symbol. + + Example: + + Target[ezci]: 1:public@ezci-ether.domain:9161::4 + + This would refer to the input/output octet counters for the + interface with _i_f_I_n_d_e_x _1 on _e_z_c_i_-_e_t_h_e_r_._d_o_m_a_i_n, as known by the SNMP + agent listening on UDP port 9161. The standard initial timeout + (2.0 seconds) is used, but the number of retries is set to four. + The backoff value is the default. + + Numeric IPv6 addresses + If IPv6 is enabled you may also specify a target using its IPv6 + address. To avoid ambiguity with the port number, numeric IPv6 + addresses must be placed in square brackets. + + Example: + + Target[IPv6test]: 2:public@[2001:760:4::]:6161::4 + + External Monitoring Scripts + If you want to monitor something which does not provide data via + snmp you can use some external program to do the data gathering. + + The external command must return 4 lines of output: + + Line 1 + current state of the first variable, normally 'incoming bytes + count' + + Line 2 + current state of the second variable, normally 'outgoing bytes + count' + + Line 3 + string (in any human readable format), telling the uptime of + the target. + + Line 4 + string, telling the name of the target. + + Depending on the type of data your script returns you might want to + use the 'gauge' or 'absolute' arguments for the _O_p_t_i_o_n_s keyword. + + Example: + + Target[myrouter]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0` + + Note the use of the backticks (`), not apostrophes (') around the + command. + + If you want to use a backtick in the command name this can be done + but you must escape it with a backslash ... + + If your script does not have any data to return but does not want + mrtg to complain about invalid data, it can return 'UNKNOWN' + instead of a number. Note though that only rrdtool is realy + equipped to handle unknown data well. + + Multi Target Syntax + You can also combine several target definitions in a mathematical + expression. Any syntactically correct expression that the Perl + interpreter can evaluate to will work. An expression could be used, + for example, to aggregate both B channels in an ISDN connection or + to calculate the percentage hard disk utilization of a server from + the absolute used space and total capacity. + + Examples: + + Target[myrouter]: 2:public@wellfleetA + 1:public@wellfleetA + + Target[myrouter]: .1.3.6.1.4.1.999.1&.1.3.6.1.4.1.999.2:public@mydevice / + .1.3.6.1.4.1.999.3&.1.3.6.1.4.1.999.4:public@mydevice * 100 + + Note that whitespace must surround each target definition in the + expression. Target definitions themselves must not contain + whitespace, except in interface descriptions and interface names, + where each whitespace character is escaped by a backslash. + + MRTG automatically rounds the result of the expression to an + integer unless RRDTool logging is in use and the gauge option is in + effect for the target. Internally MRTG uses Perl's Math::BigFloat + package to calculate the result of the expression with 40 digits of + precision. Even in extreme cases, where, for example, you take the + difference of two 64-bit integers, the result of the expression + should be accurate. + + SNMP Request Optimization + MRTG is designed to economize on its SNMP requests. Where a target + definition appears more than once in the configuration file, MRTG + requests the data from the device only once per round of data + collection and uses the collected data for each instance of a + particular target. Recognition of two target definitions as being + identical is based on a simple string match rather than any kind of + deeper semantic analysis. + + Example: + + Target[Targ1]: 1:public@CiscoA + Target[Targ2]: 2:public@CiscoA + Target[Targ3]: 1:public@CiscoA + 2:public@CiscoA + Target[Targ4]: 1:public@CISCOA + + This results in a total of three SNMP requests. Data for + 1:public@CiscoA and 2:public@CiscoA are requested only once each, + and used for Targ1, Targ2, and Targ3. Targ4 causes another SNMP + request for 1:public@CISCOA, which is not recognized as being + identical to 1:public@CiscoA. + + MMaaxxBByytteess + The maximum value either of the two variables monitored are allowed to + reach. For monitoring router traffic this is normally the bytes per + second this interface port can carry. + + If a number higher than _M_a_x_B_y_t_e_s is returned, it is ignored. Also read + the section on _A_b_s_M_a_x for further info. The _M_a_x_B_y_t_e_s value is also + used in calculating the Y range for unscaled graphs (see the section on + _U_n_s_c_a_l_e_d). + + Since most links are rated in bits per second, you need to divide their + maximum bandwidth (in bits) by eight (8) in order to get bytes per + second. This is very important to make your unscaled graphs display + realistic information. T1 = 193000, 56K = 7000, 10 MB Ethernet = + 1250000, 100 MB Ethernet = 12500000. The _M_a_x_B_y_t_e_s value will be used by + mrtg to decide whether it got a valid response from the router. + + If you need two different MaxBytes values for the two monitored + variables, you can use MaxBytes1 and MaxBytes2 instead of MaxBytes. + + Example: + + MaxBytes[myrouter]: 1250000 + + TTiittllee + Title for the HTML page which gets generated for the graph. + + Example: + + Title[myrouter]: Traffic Analysis for Our Nice Company + +OOPPTTIIOONNAALL PPEERR TTAARRGGEETT KKEEYYWWOORRDDSS + PPaaggeeTToopp + Things to add to the top of the generated HTML page. Note that you can + have several lines of text as long as the first column is empty. + + Note that the continuation lines will all end up on the same line in + the html page. If you want linebreaks in the generated html use the + '\n' sequence. + + Example: + + PageTop[myrouter]: <H1>Traffic Analysis for ETZ C95.1</H1> + Our Campus Backbone runs over an FDDI line\n + with a maximum transfer rate of 12.5 megabytes per + Second. + + RRoouutteerrUUppttiimmee + In cases where you calculate the used bandwidth from several interfaces + you normally don't get the router uptime and router name displayed on + the web page. + + If these interfaces are on the same router and the uptime and name + should be displayed you have to specify its community and address again + with the _R_o_u_t_e_r_U_p_t_i_m_e keyword. + + If you want to use a special OID for querying the router uptime, use + prepend the oid. + + Example: + + Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250 + RouterUptime[kacisco.comp.edu]: public@194.64.66.250 + + RouterUptime[kacisco.comp.edu]: hrSystemUptime.0:public@194.64.66.250 + + RRoouutteerrNNaammee + If the default name of the router is incorrect/uninformative, you can + use RouterName to specify a different OID on either the same or a + different host. + + A practical example: sysName on BayTech DS72 units always display + "ds72", no matter what you set the Unit ID to be. Instead, the Unit ID + is stored at 1.3.6.1.4.1.4779.1.1.3.0, so we can have MRTG display this + instead of sysName. + + Example: + + RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0 + + A different OID on a different host can also be specified: + + RouterName[kacisco.comp.edu]: 1.3.6.1.4.1.4779.1.1.3.0:public@194.64.66.251 + + MMaaxxBByytteess11 + Same as MaxBytes, for variable 1. + + MMaaxxBByytteess22 + Same as MaxBytes, for variable 2. + + IIPPvv44OOnnllyy + Many IPv6 routers do not currently support SNMP over IPv6 and must be + monitored using IPv4. The IPv4Only option forces mrtg to use IPv4 when + communicating with the target, even if IPv6 is enabled. This is useful + if the target is a hostname with both IPv4 and IPv6 addresses; without + the IPv4Only keyword, monitoring such a router will not work if IPv6 is + enabled. + + If set to no (the default), mrtg will use IPv6 unless the target has no + IPv6 addresses, in which case it will use IPv4. If set to yes, mrtg + will only use IPv4. + + Note that if this option is set to yes and the target does not have an + IPv4 address, communication with the target will fail. + + This option has no effect if IPv6 is not enabled. + + Example: + + Target[v4onlyrouter_1]: 1:public@v4onlyrouter + IPv4Only[v4onlyrouter_1]: Yes + + SSnnmmppOOppttiioonnss ((VV33)) + SNMPv3 requires a fairly rich set of options. This per-target keyword + allows access to the User Security Model of SNMPv3. Options are listed + in the same syntax as a perl hash. + + _S_e_c_u_r_i_t_y _M_o_d_e_s + + SNMPv3 has three security modes, defined on the device being polled. + For example, on Cisco routers the security mode is defined by the snmp- + server group global configuration command. + + NoAuthNoPriv + Neither Authentication nor Privacy is defined. Only the Username + option is specified for this mode. + + Example: + + SnmpOptions[myrouter]: username=>'user1' + + AuthNoPriv + Uses a Username and a password. The password can be hashed using + the snmpkey application, or passed in plain text along with the + ContextEngineID + + Example: + + SnmpOptions[myrouter]: username=>'user1',authpassword=>'example', + contextengineid=>'80000001110000004000000' + + Priv + Both Authentication and Privacy is defined. The default privacy + protocol is des. + + Example: + SnmpOptions[myrouter]: + authkey=>'0x1e93ab5a396e2af234c8920e61cfe2028072c0e2', + authprotocol=>'sha',privprotocol=>'des',username=>'user1', + privkey=>'0x498d74940c5872ed387201d74b9b25e2' + + _s_n_m_p _o_p_t_i_o_n_s + + The following option keywords are recognized: + + username + The user associated with the User Security Model + + contextname + An SNMP agent can define multiple contexts. This keyword allows + them to be polled. + + contextengineid + A unique 24-byte string identifying the snmp-agent. + + authpassword + The plaintext password for a user in either AuthNoPriv or Priv + mode. + + authkey + A md5 or sha hash of the plain-text password, along with the + engineid. Use the snmpkey commandline program to generate this + hash, or use Net::SNMP::Security::USM in a script. + + authprotocol {sha|md5} + The hashing algorithm defined on the SNMP client. Defaults to md5. + + privpassword + A plaintext pre-shared key for encrypting snmp packets in Priv + mode. + + privkey + A hash of the plain-text pre-shared key, along with the engineid. + Use the snmpkey commandline program to generate this hash, or use + Net::SNMP::Security::USM in a script. + + privprotocol {des|3desede|aescfb128|aescfb192|aescfb256} + Specifies the encryption method defined on the snmp agent. The + default is des. + + PPaaggeeFFoooott + Things to add to the bottom of the generated HTML page. Note that you + can have several lines of text as long as the first column is empty. + + Note that the continuation lines will all end up on the same line in + the html page. If you want linebreaks in the generated html use the + '\n' sequence. + + The material will be added just before the </BODY> tag: + + Example: + + PageFoot[myrouter]: Contact <A HREF="mailto:peter@x.yz">Peter</A> + if you have questions regarding this page + + AAddddHHeeaadd + Use this tag like the _P_a_g_e_T_o_p header, but its contents will be added + between </TITLE> and </HEAD>. + + Example: + + AddHead[myrouter]: <link rev="made" href="mailto:mrtg@blabla.edu"> + + BBooddyyTTaagg + BodyTag lets you supply your very own <body ...> tag for the generated + webpages. + + Example: + + BodyTag[myrouter]: <BODY LEFTMARGIN="1" TOPMARGIN="1" + BACKGROUND="/stats/images/bg.neo2.gif"> + + AAbbssMMaaxx + If you are monitoring a link which can handle more traffic than the + _M_a_x_B_y_t_e_s value. Eg, a line which uses compression or some frame relay + link, you can use the _A_b_s_M_a_x keyword to give the absolute maximum value + ever to be reached. We need to know this in order to sort out + unrealistic values returned by the routers. If you do not set _A_b_s_M_a_x, + rateup will ignore values higher than _M_a_x_B_y_t_e_s. + + Example: + + AbsMax[myrouter]: 2500000 + + UUnnssccaalleedd + By default each graph is scaled vertically to make the actual data + visible even when it is much lower than _M_a_x_B_y_t_e_s. With the _U_n_s_c_a_l_e_d + variable you can suppress this. It's argument is a string, containing + one letter for each graph you don't want to be scaled: d=day w=week + m=month y=year. There is also a special case to unset the variable + completely: n=none. This could be useful in the event you need to + override a global configuration. In the example scaling for the yearly + and the monthly graph are suppressed. + + Example: + + Unscaled[myrouter]: ym + + WWiitthhPPeeaakk + By default the graphs only contain the average values of the monitored + variables - normally the transfer rates for incoming and outgoing + traffic. The following option instructs mrtg to display the peak 5 + minute values in the [w]eekly, [m]onthly and [y]early graph. In the + example we define the monthly and the yearly graph to contain peak as + well as average values. + + Examples: + + WithPeak[myrouter]: ym + + SSuupppprreessss + By default mrtg produces 4 graphs. With this option you can suppress + the generation of selected graphs. The option value syntax is + analogous to the above two options. In this example we suppress the + yearly graph as it is quite empty in the beginning. + + Example: + + Suppress[myrouter]: y + + EExxtteennssiioonn + By default, mrtg creates .html files. Use this option to tell mrtg to + use a different extension. For example you could set the extension to + php3, then you will be able to enclose PHP tags into the output (useful + for getting a router name out of a database). + + Example: + + Extension[myrouter]: phtml + + DDiirreeccttoorryy + By default, mrtg puts all the files that it generates for each target + (the GIFs, the HTML page, the log file, etc.) in _W_o_r_k_D_i_r. + + If the _D_i_r_e_c_t_o_r_y option is specified, the files are instead put into a + directory under _W_o_r_k_D_i_r or Log-, Image- and HtmlDir). (For example the + _D_i_r_e_c_t_o_r_y option below would cause all the files for a target myrouter + to be put into directory /usr/tardis/pub/www/stats/mrtg/myrouter/ .) + + The directory must already exist; mrtg will not create it. + + Example: + + WorkDir: /usr/tardis/pub/www/stats/mrtg + Directory[myrouter]: myrouter + + NOTE: the Directory option must always be 'relative' or bad things will + happen. + + CClloonneeddiirreeccttoorryy + If the _D_i_r_e_c_t_o_r_y option is specified, the _C_l_o_n_e_d_i_r_e_c_t_o_r_y option will + copy all the contents of _D_i_r_e_c_t_o_r_y to the _C_l_o_n_e_d_i_r_e_c_t_o_r_y. + + Example: + + WorkDir: /usr/tardis/pub/www/stats/mrtg + Directory[myrouter]: myrouter + Clonedirectory[myrouter]: myclonedirectory + + Optionally the target name can be changed in the cloning process. + + Example: + + WorkDir: /usr/tardis/pub/www/stats/mrtg + Directory[myrouter]: myrouter + Clonedirectory[myrouter]: myclonedirectory mynewtarget + + NOTE1: The clone directory must already exist; mrtg will not create it. + + NOTE2: The Clonedirectory option must also always be 'relative' or bad + things will happen. + + NOTE3: This requires the File::Copy module + + XXSSiizzee aanndd YYSSiizzee + By default mrtgs graphs are 100 by 400 pixels wide (plus some more for + the labels. In the example we get almost square graphs ... + + Note: XSize must be between 20 and 600; YSize must be larger than 20 + + Example: + + XSize[myrouter]: 300 + YSize[myrouter]: 300 + + XXZZoooomm aanndd YYZZoooomm + If you want your graphs to have larger pixels, you can "Zoom" them. + + Example: + + XZoom[myrouter]: 2.0 + YZoom[myrouter]: 2.0 + + XXSSccaallee aanndd YYSSccaallee + If you want your graphs to be actually scaled use _X_S_c_a_l_e and _Y_S_c_a_l_e. + (Beware: while this works, the results look ugly (to be frank) so if + someone wants to fix this: patches are welcome. + + Example: + + XScale[myrouter]: 1.5 + YScale[myrouter]: 1.5 + + YYTTiiccss aanndd YYTTiiccssFFaaccttoorr + If you want to show more than 4 lines per graph, use YTics. If you + want to scale the value used for the YLegend of these tics, use + YTicsFactor. The default value for YTics is 4 and the default value + for YTicsFactor is 1.0 . + + Example: + + Suppose you get values ranging from 0 to 700. You want to plot 7 lines + and want to show 0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200, 300, + 400, 500, 600, 700. You should write then: + + YTics[myrouter]: 7 + YTicsFactor[myrouter]: 0.01 + + FFaaccttoorr + If you want to multiply all numbers shown below the graph with a + constant factor, use this directive to define it .. + + Example: + + Factor[as400]: 4096 + + SStteepp + Change the default step from 5 * 60 seconds to something else (I have + not tested this much ...) + + Example: + + Step[myrouter]: 60 + + PPNNGGTTiittllee + When using rateup for graph generation, this will print the given title + in the graph it generates. + + Example: + + PNGTitle[myrouter]: WAN Link UK-US + + OOppttiioonnss + The _O_p_t_i_o_n_s Keyword allows you to set some boolean switches: + + growright + The graph grows to the left by default. This option flips the + direction of growth causing the current time to be at the right + edge of the graph and the history values to the left of it. + + bits + All the monitored variable values are multiplied by 8 (i.e. shown + in bits instead of bytes) ... looks much more impressive :-) It + also affects the 'factory default' labeling and units for the given + target. + + perminute + All the monitored variable values are multiplied by 60 (i.e. shown + in units per minute instead of units per second) in case of small + values more accurate graphs are displayed. It also affects the + 'factory default' labeling and units for the given target. + + perhour + All the monitored variable values are multiplied by 3600 (i.e. + shown in units per hour instead of units per second) in case of + small values more accurate graphs are displayed. It also affects + the 'factory default' labeling and units for the given target. + + noinfo + Suppress the information about uptime and device name in the + generated webpage. + + nopercent + Don't print usage percentages. + + transparent + Make the background of the generated gifs transparent. + + integer + Print summary lines below graph as integers without commas. + + dorelpercent + The relative percentage of IN-traffic to OUT-traffic is calculated + and displayed in the graph as an additional line. Note: Only a + fixed scale is available (from 0 to 100%). Therefore if IN-traffic + is greater than OUT-traffic then 100% is displayed. If you suspect + that your IN-traffic is not always less than or equal to your OUT- + traffic you are urged to not use this options. Note: If you use + this option in combination with the _C_o_l_o_u_r_s options, a fifth + colour-name colour-value pair is required there. + + avgpeak + There are some ISPs who use the average Peak values to bill their + customers. Using this option MRTG displays these values for each + graph. The value is built by averaging the max 5 minute traffic + average for each 'step' shown in the graph. For the Weekly graph + this means that it builds the average of all 2 hour intervals 5 + minute peak values. (Confused? Thought so!) + + gauge + Treat the values gathered from target as 'current status' + measurements and not as ever incrementing counters. This would be + useful to monitor things like disk space, processor load, + temperature, and the like ... + + In the absence of 'gauge' or 'absolute' options, MRTG treats + variables as a counters and calculates the difference between the + current and the previous value and divides that by the elapsed time + between the last two readings to get the value to be plotted. + + absolute + This is for counter type data sources which reset their value when + they are read. This means that rateup does not have to build the + difference between the current and the last value read from the + data source. The value obtained is still divided by the elapsed + time between the current and the last reading, which makes it + different from the 'gauge' option. Useful for external data + gatherers. + + derive + If you are using rrdtool as logger/grapher you can use a third type + of data source. Derive is like counter, except that it is not + required to go UP all the time. It is useful for situations where + the change of some value should be graphed. + + unknaszero + Log unknown data as zero instead of the default behaviour of + repeating the last value seen. Be careful with this, often a flat + line in the graph is much more obvious than a line at 0. + + withzeroes + Normally we ignore all values which are zero when calculating the + average transfer rate on a line. If this is not desirable use this + option. + + noborder + If you are using rateup to log data, MRTG will create the graph + images. Normally these images have a shaded border around them. If + you do not want the border to be drawn, enable this option. This + option has no effect if you are not using rateup. + + noarrow + As with the option above, this effects rateup graph generation + only. Normally rateup will generate graphs with a small arrow + showing the direction of the data. If you do not want this arrow to + be drawn, enable this option. This option has no effect if you are + not using rateup. + + noi When using rateup for graph generation, you can use this option to + stop rateup drawing a graph for the 'I' or first variable. This + also removes entries for this variable in the HTML page MRTG + generates, and will remove the peaks for this variable if they are + enabled. This allows you to hide this data, or can be very useful + if you are only graphing one line of data rather than two. This + option is not destructive - any data received for the the variable + continued to be logged, it just isn't shown. + + noo Same as above, except relating to the 'O' or second variable. + + nobanner + When using rateup for graph generation, this option disables MRTG + adding the MRTG banner to the HTML pages it generates. + + nolegend + When using rateup for graph generation, this option will stop MRTG + from creating a legend at the bottom of the HTML pages it + generates. + + printrouter + When using rateup for graph generation, this option will print the + router name in the graph it generates. This option is overridden + by the value of PNGTitle if one is given + + pngdate + When using rateup for graph generation, this option will print a + timestamp in the graph it generates, including a timezone if one is + specified by the 'Timezone' parameter. This is aequivalent to + setting TimeStrPost[x]: RU + + logscale + The llooggssccaallee option causes rateup to display the data with the Y + axis scaled logarithmically. Doing so allows the normal traffic to + occupy the majority of the vertical range, while still showing any + spikes at their full height. + + llooggssccaallee displays all the available data and will always produce + well-behaved graphs. People often consider a logarithmically + scaled graph counterintuitive, however, and thus hard to interpret. + + expscale + The eexxppssccaallee option causes rateup to display the data with the Y + axis scaled exponentially. Doing so emphasizes small changes at + the top of the scale; this can be useful when graphing values that + fluctuate by a small amount near the top of the scale, such as line + voltage. + + eexxppssccaallee is essentially the inverse of llooggssccaallee. + + secondmean + The sseeccoonnddmmeeaann option sets the maximum value on the graph to the + mean of the data greater than the mean of all data. This produces + a graph that focuses more on the typical data, while clipping large + peaks. + + Using sseeccoonnddmmeeaann will give a more intutive linearly scaled graph, + but can result in a uselessly high or low scale in some rare + situations (specifically, when the data includes a large portion of + values far from the actual mean) + + If a target includes both llooggssccaallee and sseeccoonnddmmeeaann in the options, + the sseeccoonnddmmeeaann takes precedence. + + Example: + + Options[myrouter]: growright, bits + + kkiilloo + Use this option to change the multiplier value for building prefixes. + Defaultvalue is 1000. This tag is for the special case that 1kB = + 1024B, 1MB = 1024kB and so far. + + Example: + + kilo[myrouter]: 1024 + + kkMMGG + Change the default multiplier prefixes (,k,M,G,T,P). In the tag + _S_h_o_r_t_L_e_g_e_n_d define only the basic units. Format: Comma separated list + of prefixed. Two consecutive commas or a comma at start or end of the + line gives no prefix on this item. If you do not want prefixes, just + put two consecutive commas. If you want to skip a magnitude select '-' + as value. + + Example: velocity in nm/s (nanometers per second) displayed in nm/h. + + ShortLegend[myrouter]: m/h + kMG[myrouter]: n,u,m,,k,M,G,T,P + options[myrouter]: perhour + + CCoolloouurrss + The _C_o_l_o_u_r_s tag allows you to override the default colour scheme. + Note: All 4 of the required colours must be specified here. The colour + name ('Colourx' below) is the legend name displayed, while the RGB + value is the real colour used for the display, both on the graph and in + the html doc. + + Format is: Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB + + Important: If you use the _d_o_r_e_l_p_e_r_c_e_n_t options tag a fifth colour name + colour value pair is required: + Col1#RRGGBB,Col2#RRGGBB,Col3#RRGGBB,Col4#RRGGBB,Col5#RRGGBB + + Colour1 + First variable (normally Input) on default graph. + + Colour2 + Second variable (normally Output) on default graph. + + Colour3 + Max first variable (input). + + Colour4 + Max second variable (output). + + RRGGBB + 2 digit hex values for Red, Green and Blue. + + Example: + + Colours[myrouter]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff + + BBaacckkggrroouunndd + With the _B_a_c_k_g_r_o_u_n_d tag you can configure the background colour of the + generated HTML page. + + Example: + + Background[myrouter]: #a0a0a0a + + YYLLeeggeenndd,, SShhoorrttLLeeggeenndd,, LLeeggeenndd[[11223344]] + The following keywords allow you to override the text displayed for the + various legends of the graph and in the HTML document: + + YLegend + The Y-axis label of the graph. Note that a text which is too long + to fit in the graph will be silently ignored. + + ShortLegend + The units string (default 'b/s') used for Max, Average and Current + + Legend[1234IO] + The strings for the colour legend. + + Example: + + YLegend[myrouter]: Bits per Second + ShortLegend[myrouter]: b/s + Legend1[myrouter]: Incoming Traffic in Bits per Second + Legend2[myrouter]: Outgoing Traffic in Bits per Second + Legend3[myrouter]: Maximal 5 Minute Incoming Traffic + Legend4[myrouter]: Maximal 5 Minute Outgoing Traffic + LegendI[myrouter]: In: + LegendO[myrouter]: Out: + + Note, if _L_e_g_e_n_d_I or _L_e_g_e_n_d_O are set to an empty string with + + LegendO[myrouter]: + + The corresponding line below the graph will not be printed at all. + + TTiimmeezzoonnee + If you live in an international world, you might want to generate the + graphs in different timezones. This is set in the TZ variable. Under + certain operating systems like Solaris, this will provoke the localtime + call to give the time in the selected timezone. + + Example: + + Timezone[myrouter]: Japan + + The Timezone is the standard timezone of your system, ie Japan, + Hongkong, GMT, GMT+1 etc etc. + + WWeeeekkffoorrmmaatt + By default, mrtg (actually rateup) uses the _s_t_r_f_t_i_m_e(3) '%V' option to + format week numbers in the monthly graphs. The exact semantics of this + format option vary between systems. If you find that the week numbers + are wrong, and your system's _s_t_r_f_t_i_m_e(3) routine supports it, you can + try another format option. The POSIX '%V' option correspond to the + widely used ISO 8601 week numbering standard. The week format + character should be specified as a single letter; either W, V, or U. + + The UNIX version of rateup uses the libc implementation of strftime. + On Windows, the native strftime implementation does not know about %V. + So there we use a different implementation of strftime that does + support %V. + + Example: + + Weekformat[myrouter]: W + + RRRRDDRRoowwCCoouunntt + This affects the creation of new rrd files. By default rrds are created + to hold about 1 day's worth of high resolution data. (plus 1 week of 30 + minute data, 2 months of 2 hour data and 2 years of 1 day data). With + this Keyword you can change the number of base interval entries + configured for new rrds as they get created. Note that you must take + the interval time into account. + + Example: + + RRDRowCount[myrouter]: 1600 + + RRRRDDRRoowwCCoouunntt3300mm + As per RRDRowCount, but for the RRA's -typically- used for 30 minute + data. Even so, you must still take the base interval into account. + Leaving out this keyword will force the old default of 800 rows. + + Example: + + RRDRowCount30m[myrouter]: 800 + + RRRRDDRRoowwCCoouunntt22hh + As per RRDRowCount, but for the RRA's -typically- used for 2 hour data. + Even so, you must still take the base interval into account. Leaving + out this keyword will force the old default of 800 rows. + + Example: + + RRDRowCount2h[myrouter]: 400 + + RRRRDDRRoowwCCoouunntt11dd + As per RRDRowCount, but for the RRA's -typically- used for 1 day data. + Even so, you must still take the base interval into account. Leaving + out this keyword will force the old default of 800 rows. + + Example: + + RRDRowCount1d[myrouter]: 200 + + RRRRDDHHWWRRRRAAss + Normally the RRDs created by MRTG will just contain the information + gathered directly from the respective target. With this option you can + tap into rrdtools advanced aberrant behaviour detection module based on + Holt-Winters forecasting. The RRDHWRRAs property specifies the Holt- + Winters RRAs as described in the rrdcreate manual page. + + Note, this setting will only affect newly created RRDs (targets). + + Example: + + RRDHWRRAs[myrouter]: RRA:HWPREDICT:1440:0.1:0.0035:288 + + TTiimmeeSSttrrPPooss + This defines placement of the timestamp string on the image. Possible + values are RU, LU, RL, LL (which stand, respectively, for RightUpper, + LeftUpper, RightLower and LeftLower corner) and NO (for no timestamp). + By default, no timestamp is placed on the image. + + Example: + + TimeStrPos[myrouter]: RU + + TTiimmeeSSttrrFFmmtt + Using this keyword you may specify format of the timestamp to be placed + on the image (if enabled by the TimeStrPos keyword). Specified string + will be used by the _s_t_r_f_t_i_m_e_(_) function - see _s_t_r_f_t_i_m_e(3) documentation + for conversion specifiers available on your system. Default format: + %Y-%m-%d %H:%M + + Example: + + TimeStrFmt[myrouter]: %H:%M:%S + +TTHHRREESSHHOOLLDD CCHHEECCKKIINNGG + Through its threshold checking functionality mrtg is able to detect + threshold problems for the various targets and can call external + scripts to handle those problems (e.g. send email or a page to an + administrator). + + Threshold checking is configured through the following parameters: + + TThhrreesshhDDiirr ((GGLLOOBBAALL)) + By defining ThreshDir to point to a writable directory, MRTG will only + alert you when a threshold boundary has been crossed. + + Example: + + ThreshDir: /var/mrtg/thresh + + TThhrreesshhHHyysstt ((GGLLOOBBAALL)) + If a threshold is broken, and you have a threshdir defined, then mrtg + will send mail once the threshold becomes 'unborken' to avoid + situations where broken and unbroken messages get sent in close + succession, we only send an unbroken message once the curent value is + 0.1 (10%) away from the threshold. using the ThreshHyst config + variable you can customize this value. + + Example for 5%: + + ThreshHyst: 0.05 + + TThhrreesshhMMaaiillSSeerrvveerr ((GGLLOOBBAALL)) + Adderss of an SMTP server which is going to accept mail about + Thresholds being broken and unbroken. + + TThhrreesshhMMaaiillSSeennddeerr ((GGLLOOBBAALL)) + What is the sender address of the threshold mail. + + Example: + + ThreshMailSender: mrtg@example.com + + TThhrreesshhMMaaiillAAddddrreessss ((PPEERR TTAARRGGEETT)) + Email address for Threshold related Mails. This will only work if a + mailserver has been configured. + + Example: + + ThreshMailAddress[_]: admin@example.com + ThreshMailAddress[router]: + + This would bring threshold releaed mail to all but the target called + 'router'. + + TThhrreesshhMMiinnII ((PPEERR TTAARRGGEETT)) + This is the minimum acceptable value for the Input (first) parameter. + If the parameter falls below this value, the program specified in + ThreshProgI will be run and a mail will be sent to the + ThreshMailAddress if specified. If the value ends in '%' then the + threshold is defined relative to MaxBytes. + + TThhrreesshhMMaaxxII ((PPEERR TTAARRGGEETT)) + Works the same as TheshMinI but it acts when the value is higher than + ThreshMaxI. + + TThhrreesshhDDeesscc ((PPEERR TTAARRGGEETT)) + Its value will be assigned to the environment variable THRESH_DESC + before any of the programs mentioned below are called. The programs can + use the value of this variable to produce more user-friendly output. + + TThhrreesshhPPrrooggII ((PPEERR TTAARRGGEETT)) + This defines a program to be run if ThreshMinI or ThreshMaxI is broken. + MRTG passes 3 arguments: the $router variable, the threshold value + broken, and the current parameter value. + + TThhrreesshhPPrrooggOOKKII ((PPEERR TTAARRGGEETT)) + This defines a program to be run if the parameter is currently OK + (based on ThreshMinI and ThreshMaxI), but wasn't OK on the previous + running -- based on the files found in ThreshDir. MRTG passes 3 + arguments: the $router variable the unbroken threshold value, and the + current parameter value. + + TThhrreesshhMMiinnOO,, TThhrreesshhMMaaxxOO,, TThhrreesshhPPrrooggOO,, aanndd TThhrreesshhPPrrooggOOKKOO + These work the same as their *I counterparts, except on the Output + (second) parameter. + + SSeettEEnnvv + When calling threshold scripts from within your cfg file you might want + to pass some data on to the script. This can be done with the SetEnv + configuration option which takes a series of environment variable + assignments. Note that the quotes are mandatory. This does not work for + external scripts. It is not possible to set environment variables per + target. + + Example: + + SetEnv[myrouter]: EMAIL="contact_email@someplace.net" + HOST="www.some_server.net" + + HHWW FFaaiilluurree BBaasssseedd TThhrreesshhoolldd CChheecckkiinngg + When using rrd based logging with HW RRAs defined. You can use the + confidence bounds violations stored in the FAILURES RRA for threshold + based alerts. + + There the all target specific threshold variables have a Hold-Winters + counterpart: + + ThreshMailAddress -> HWThreshMailAddress + ThreshMinI -> HWThreshMinI + ... + + The global variables for threshold checking are shared except for the + + ThreshHyst -> HWThreshHyst + + And HWThreshDesc sets the HWTHRESH_DESC variable. + +PPEERR TTAARRGGEETT DDEEFFAAUULLTT VVAALLUUEESS + PPrree-- aanndd PPoossttffiixx + To save yourself some typing you can define a target called '^'. The + text of every Keyword you define for this target will be PREPENDED to + the corresponding Keyword of all the targets defined below this line. + The same goes for a Target called '$' but its text will be APPENDED. + + Note that a space is inserted between the prepended text and the + Keyword value, as well as between the Keyword value and the appended + text. This works well for text-valued Keywords, but is not very useful + for other Keywords. See the "default" target description below. + + The example will make mrtg use a common header and a common contact + person in all the pages generated from targets defined later in this + file. + + Example: + + PageTop[^]: <H1>NoWhere Unis Traffic Stats</H1><HR> + PageTop[$]: Contact Peter Norton if you have any questions<HR> + + To remove the prepend/append value, specify an empty value, e.g.: + + PageTop[^]: + PageTop[$]: + + NNooSSppaacceeCChhaarr + With PREPEND and APPEND (see below) there is normally a space inserted + between the local value and the PRE- or APPEND value. Sometimes this is + not desirable. You can use the global option _N_o_S_p_a_c_e_C_h_a_r to define a + character which can be mentioned at the end of a $ or ^ definition in + order to supress the space. + + Example: + + NoSpaceChar: ~ + Target[^]: 1.3.6.1.4.1.482.50.2.4.20.0&1.3.6.1.4.1.482.50.2.4.21.0:get@~ + Target[a]: a.tolna.net + Target[b]: b.tolna.net + Target[c]: c.tolna.net + Target[d]: d.tolna.net + + DDeeffaauulltt VVaalluueess + The target name '_' specifies a default value for that Keyword. In the + absence of explicit Keyword value, the prepended and the appended + keyword value, the default value will be used. + + Example: + + YSize[_]: 150 + Options[_]: growright,bits,nopercent + WithPeak[_]: ymw + Suppress[_]: y + MaxBytes[_]: 1250000 + + To remove the default value and return to the 'factory default', + specify an empty value, e.g.: + + YLegend[_]: + + There can be several instances of setting the default/prepend/append + values in the configuration file. The later setting replaces the + previous one for the rest of the configuration file. The + default/prepend/append values used for a given keyword/target pair are + the ones that were in effect at the point in the configuration file + where the target was mentioned for the first time. + + Example: + + MaxBytes[_]: 1250000 + Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu + MaxBytes[_]: 8000 + Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2 + + The default _M_a_x_B_y_t_e_s for the target myrouter.someplace.edu.2 in the + above example will be 1250000, which was in effect where the target + name myrouter.someplace.edu.2 first appeared in the config file. + +CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS + ----uusseerr _u_s_e_r_n_a_m_e and ----ggrroouupp _g_r_o_u_p_n_a_m_e + Run as the given user and/or group. (Unix Only) + + ----lloocckk--ffiillee _f_i_l_e_n_a_m_e + Use an alternate lock-file (the default is to use the + configuration-file appended with "_l"). + + ----ccoonnffccaacchhee--ffiillee _f_i_l_e_n_a_m_e + Use an alternate confcache-file (the default is to use the + configuration-file appended with ".ok") + + ----llooggggiinngg _f_i_l_e_n_a_m_e|eevveennttlloogg + If this is set to writable filename, all output from mrtg + (warnings, debug messages, errors) will go to _f_i_l_e_n_a_m_e. If you are + running on Win32 you can specify eevveennttlloogg instead of a filename + which will send all error to the windows event log. + + NNOOTTEE:: Note, there is no Message DLL for mrtg included with mrtg. + This has the side effect that the windows event logger will display + a nice message with every entry in the event log, complaing about + the fact that mrtg has no message dll. If you go to the mrtg + contrib download area (on the website) you will find the + mrtg-message-dll.zip which does contain such a thing. + + ----ddaaeemmoonn + Put MRTG into the background, running as a daemon. This works the + same way as the config file option, but the switch is required for + proper FHS operation (because /var/run is writable only by root) + + ----ffhhss + Configure all mrtg paths to conform to the FHS specification; + http://www.pathname.com/fhs/ + + ----cchheecckk + Only check the cfg file for errors. Do not do anything. + + ----ppiidd--ffiillee==ss + Define the name and path of the pid file for mrtg running as a + daemon + + ----ddeebbuugg==ss + Enable debug options. The argument of the debug option is a comma + separated list of debug values: + + cfg - watch the config file reading + dir - directory mangeling + base - basic program flow + tarp - target parser + snpo - snmp polling + coca - confcache operations + fork - forking view + time - some timing info + log - logging of data via rateup or rrdtool + eval - print eval strings before evaluting them + prof - add hires timing info the rrd calls + + Example: + + --debug="cfg,snpo" + +EEXXIITT CCOODDEESS + An exit code of 0 indicates that all targets were successful. + Generally speaking, most codes greater than 0 indicate that there was + an unrecoverable problem. One exception to this is code 91, which + indicates that at least one of the targets was successful. A partial + listing of the codes follows: + + 0: All targets sucessful + + 2: Config error (can't read, fatal error in config, etc) + 17: Another MRTG process is processing config + + 91: At least one target sucessful + 92: No targets were sucessful + +EEXXAAMMPPLLEESS + MMiinniimmaall mmrrttgg..ccffgg + WorkDir: /usr/tardis/pub/www/stats/mrtg + Target[r1]: 2:public@myrouter.somplace.edu + MaxBytes[r1]: 8000 + Title[r1]: Traffic Analysis ISDN + PageTop[r1]: <H1>Stats for our ISDN Line</H1> + + CCffgg ffoorr sseevveerraall RRoouutteerrss.. + WorkDir: /usr/tardis/pub/www/stats/mrtg + Title[^]: Traffic Analysis for + PageTop[^]: <H1>Stats for + PageTop[$]: Contact The Chief if you notice anybody<HR> + MaxBytes[_]: 8000 + Options[_]: growright + + Title[isdn]: our ISDN Line + PageTop[isdn]: our ISDN Line</H1> + Target[isdn]: 2:public@router.somplace.edu + + Title[backb]: our Campus Backbone + PageTop[backb]: our Campus Backbone</H1> + Target[backb]: 1:public@router.somplace.edu + MaxBytes[backb]: 1250000 + + # the following line removes the default prepend value + # defined above + + Title[^]: + + Title[isdn2]: Traffic for the Backup ISDN Line + PageTop[isdn2]: our ISDN Line</H1> + Target[isdn2]: 3:public@router.somplace.edu + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> and many contributors + + + +2.17.7 2018-07-13 MRTG-REFERENCE(1) diff --git a/doc/mrtg-rrd.1 b/doc/mrtg-rrd.1 new file mode 100644 index 0000000..35a5acf --- /dev/null +++ b/doc/mrtg-rrd.1 @@ -0,0 +1,250 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-RRD 1" +.TH MRTG-RRD 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-rrd \- How to use RRDtool with MRTG +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +After using \s-1MRTG\s0 for some time you may find some limitations, mostly in the +areas of performance and graphing flexibility. These are exactly the areas +addressed by RRDtool. To learn more about RRDtool check out its website on +.PP +.Vb 1 +\& http://oss.oetiker.ch/rrdtool +.Ve +.SH "RRDTOOL INTEGRATION" +.IX Header "RRDTOOL INTEGRATION" +When using mrtg with RRDtool you are replacing \fIrateup\fR with the +RRDtool perl module \fIRRDs.pm\fR. To enable RRDtool support in mrtg +you have to add the line +.PP +.Vb 1 +\& LogFormat: rrdtool +.Ve +.PP +to your mrtg config file. +.PP +\&\s-1MRTG\s0 needs access to both the RRDtool perl module \fBRRDs.pm\fR and to the +\&\fBrrdtool\fR executable. +.PP +If these two items are not installed in locations where perl can find them +on its own, then you can use the following two parameters to supply the +appropriate directories. +.PP +For the location of the \fBrrdtool\fR executable you put +.PP +.Vb 1 +\& PathAdd: /usr/local/rrdtool/bin/ +.Ve +.PP +or +.PP +.Vb 1 +\& PathAdd: c:\errdtool\ebin +.Ve +.PP +For the location of the perl module it would be: +.PP +.Vb 1 +\& LibAdd: /usr/local/rrdtool/lib/perl/ +.Ve +.PP +or +.PP +.Vb 1 +\& LibAdd: c:\errdtool\ebin\elib\eperl +.Ve +.PP +When you have made this modification to the configuration file, several +things will happen when you run mrtg again with the new config file: +.IP "1." 4 +mrtg will take all your old \f(CW\*(C`.log\*(C'\fR files and \fBconvert\fR them to \f(CW\*(C`.rrd\*(C'\fR +format. (The \f(CW\*(C`.log\*(C'\fR files don't get touched in the process, so if things +don't work out they are still there.) +.IP "2." 4 +mrtg will use \fBrrdtool\fR to update its databases. These will have a new format +called \fIrrd\fR which is totally different than the native \fIlog\fR format of +the classic mrtg. +.IP "3." 4 +mrtg will \fBnot\fR create any webpages of graphs anymore. +It will only query the routers for traffic information and update its \fIrrd\fR +databases. +.PP +The advantage of whole thing is that the mrtg will become \fBmuch\fR +faster. Expect the runtime to drop to 20% of the previous value. (I would like +to get some feedback on this from folks with large installations.) +.PP +Mind you, though, while the logging process of RRDtool is \fBvery\fR fast, you +are also gaining some time by neither creating graphs nor updating webpages. +The idea behind this is that it is more efficient to create +graphs and webpages on demand by using a cgi script. +.PP +At the moment there is no \fBofficial\fR script to do this, but two +contributers have created such scripts: +.IP "One4All aka 14all.cgi" 4 +.IX Item "One4All aka 14all.cgi" +This was the first program to take over the webpage creation and graphing task. +It has been developed by Rainer Bawidamann +rainer.bawidamann@web.de. You can find a copy +on Rainers website: http://my14all.sourceforge.net/ +The program comes with its own documentation +.IP "\fBrouters2.cgi\fR" 4 +.IX Item "routers2.cgi" +This is another \s-1CGI\s0 frontend for mrtg running with rrdtool. The main difference between this and 14all is +that the web pages it creates are much more stylish than the ones from mrtg, plus they support User +Defined summary graphs and different levels of Authentication and Authorisation. This has been written by +Steve Shipway (steve@steveshipway.org). You obtain a copy, and find a forum and demonstration system at +http://www.steveshipway.org/software/ +The program comes with its own installation instructions and install script. +.IP "\fBmrtg-rrd\fR" 4 +.IX Item "mrtg-rrd" +The mrtg-rrd script is a CGI/FastCGI application by Jan \*(L"Yenya\*(R" Kasprzak for +displaying \s-1MRTG\s0 graphs from data in the RRDtool format. It is an intended +replacement for the 14all.cgi script. It can make your monitoring system +faster because \s-1MRTG\s0 does not have to generate all the \s-1PNG\s0 files with graphs +every 5 minutes or so. Instead of this the graphs are generated on-demand +when the user wants to see them. http://www.fi.muni.cz/~kas/mrtg\-rrd/ +.SH "FUTURE" +.IX Header "FUTURE" +Just as a side note: \s-1MRTG\-3\s0 will be based entirely on rrdtool technology. +But don't wait for it ... get going \fBnow\fR! +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-rrd.pod b/doc/mrtg-rrd.pod index cbddaf9..cbddaf9 100644 --- a/src/doc/mrtg-rrd.pod +++ b/doc/mrtg-rrd.pod diff --git a/doc/mrtg-rrd.txt b/doc/mrtg-rrd.txt new file mode 100644 index 0000000..693151d --- /dev/null +++ b/doc/mrtg-rrd.txt @@ -0,0 +1,111 @@ +MRTG-RRD(1) mrtg MRTG-RRD(1) + + + +NNAAMMEE + mrtg-rrd - How to use RRDtool with MRTG + +SSYYNNOOPPSSIISS + After using MRTG for some time you may find some limitations, mostly in + the areas of performance and graphing flexibility. These are exactly + the areas addressed by RRDtool. To learn more about RRDtool check out + its website on + + http://oss.oetiker.ch/rrdtool + +RRRRDDTTOOOOLL IINNTTEEGGRRAATTIIOONN + When using mrtg with RRDtool you are replacing _r_a_t_e_u_p with the RRDtool + perl module _R_R_D_s_._p_m. To enable RRDtool support in mrtg you have to add + the line + + LogFormat: rrdtool + + to your mrtg config file. + + MRTG needs access to both the RRDtool perl module RRRRDDss..ppmm and to the + rrrrddttooooll executable. + + If these two items are not installed in locations where perl can find + them on its own, then you can use the following two parameters to + supply the appropriate directories. + + For the location of the rrrrddttooooll executable you put + + PathAdd: /usr/local/rrdtool/bin/ + + or + + PathAdd: c:\rrdtool\bin + + For the location of the perl module it would be: + + LibAdd: /usr/local/rrdtool/lib/perl/ + + or + + LibAdd: c:\rrdtool\bin\lib\perl + + When you have made this modification to the configuration file, several + things will happen when you run mrtg again with the new config file: + + 1. mrtg will take all your old ".log" files and ccoonnvveerrtt them to ".rrd" + format. (The ".log" files don't get touched in the process, so if + things don't work out they are still there.) + + 2. mrtg will use rrrrddttooooll to update its databases. These will have a + new format called _r_r_d which is totally different than the native + _l_o_g format of the classic mrtg. + + 3. mrtg will nnoott create any webpages of graphs anymore. It will only + query the routers for traffic information and update its _r_r_d + databases. + + The advantage of whole thing is that the mrtg will become mmuucchh faster. + Expect the runtime to drop to 20% of the previous value. (I would like + to get some feedback on this from folks with large installations.) + + Mind you, though, while the logging process of RRDtool is vveerryy fast, + you are also gaining some time by neither creating graphs nor updating + webpages. The idea behind this is that it is more efficient to create + graphs and webpages on demand by using a cgi script. + + At the moment there is no ooffffiicciiaall script to do this, but two + contributers have created such scripts: + + One4All aka 14all.cgi + This was the first program to take over the webpage creation and + graphing task. It has been developed by Rainer Bawidamann + rainer.bawidamann@web.de. You can find a copy on Rainers website: + http://my14all.sourceforge.net/ The program comes with its own + documentation + + rroouutteerrss22..ccggii + This is another CGI frontend for mrtg running with rrdtool. The + main difference between this and 14all is that the web pages it + creates are much more stylish than the ones from mrtg, plus they + support User Defined summary graphs and different levels of + Authentication and Authorisation. This has been written by Steve + Shipway (steve@steveshipway.org). You obtain a copy, and find a + forum and demonstration system at + http://www.steveshipway.org/software/ The program comes with its + own installation instructions and install script. + + mmrrttgg--rrrrdd + The mrtg-rrd script is a CGI/FastCGI application by Jan "Yenya" + Kasprzak for displaying MRTG graphs from data in the RRDtool + format. It is an intended replacement for the 14all.cgi script. It + can make your monitoring system faster because MRTG does not have + to generate all the PNG files with graphs every 5 minutes or so. + Instead of this the graphs are generated on-demand when the user + wants to see them. http://www.fi.muni.cz/~kas/mrtg-rrd/ + +FFUUTTUURREE + Just as a side note: MRTG-3 will be based entirely on rrdtool + technology. But don't wait for it ... get going nnooww! + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-RRD(1) diff --git a/doc/mrtg-squid.1 b/doc/mrtg-squid.1 new file mode 100644 index 0000000..b1fa052 --- /dev/null +++ b/doc/mrtg-squid.1 @@ -0,0 +1,250 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-SQUID 1" +.TH MRTG-SQUID 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +mrtg-squid \- using mrtg to monitor Squid +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +Squid 2.3 knows \s-1SNMP\s0 and you can therefore use mrtg to +monitor it quite easily. +.PP +I have made some modifications to mrtg which simplify this. +My work is based on earlier modification made by: +matija.grabnar@arnes.si and kostas@nlanr.net. +.SH "MODIFICATIONS" +.IX Header "MODIFICATIONS" +I added new code for displaying correct units to the +previous patches \*(L"perminute\*(R" and \*(L"perhour\*(R" (\*(L"option\*(R" tokens), +which allows other measurement in addition to \*(L"persecond\*(R". +.PP +Then I created a new option token \*(L"dorelpercent\*(R" which +allows the calculation of the percentage of IN-stream / OUT-stream on +the fly and then displays it on a fixed scale from 0% to 100%. For my +requirements, this does good work. Maybe someone wants a floating +scale. It should not be a problem to implement it, too (but +give me an option to keep my fixed scale). If IN-stream is always +less than OUT-stream both lines (OUT-stream and relative percent) +are always displayed on top of IN-stream bulk. Otherwise this +option makes no sense. With this option you can display hitrates, +errorrates (for router monitoring: rel. droprates) easily now. +.PP +If you use this options please consider that you need a 5th +colourname/value pair in your Colours statements! +.PP +Due to some discussion on this list, I have implemented two +tokens too: +.PP +\&\*(L"kilo\*(R" and \*(L"kMG\*(R" +.PP +\&\*(L"kilo\*(R" should contain the value of k (1000 or 1024), where 1000 is the +default. +.PP +\&\*(L"kMG\*(R" is a comma separated list of multiplier prefixes, used +instead of "\*(L", \*(R"k\*(L", \*(R"M\*(L", \*(R"G\*(L", \*(R"T" on the \s-1MRTG\s0 display. Leave the +place free, if you want no prefix. +.PP +Also an incomplete list of OIDs for the new \s-1SQUID\s0 release is +added. +.PP +You may need to turn on snmp_port in squid.conf to as it is disabled by default. +.PP +I hope you enjoy it. +.SH "CONFIG EXAMPLE" +.IX Header "CONFIG EXAMPLE" +First load the squid mib +.PP +.Vb 1 +\& LoadMIBs: /usr/share/squid/mib.txt +.Ve +.PP +You can measure responsetimes in ms and display it with \s-1MRTG\s0 +correctly with: +.PP +.Vb 2 +\& kMG[measure\-ms]: m,,k,M,G,T +\& short[measure\-ms]: s +.Ve +.PP +You can display now MB/s as 1024*1024 B/s with: +.PP +.Vb 1 +\& kilo[volume]: 1024 +.Ve +.PP +Assuming you're not running squid's \s-1SNMP\s0 on the default snmp port, you need +to include a port number in your target line: +.PP +.Vb 1 +\& Target[proxy\-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@localhost:3401 +.Ve +.PP +A sample config for squid: +.PP +.Vb 11 +\& Target[proxy\-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@proxy +\& Title[proxy\-hit]: HTTP Hits +\& PageTop[proxy\-hit]: <H2>proxy Cache Statistics: HTTP Hits / Requests</H2> +\& Suppress[proxy\-hit]: y +\& LegendI[proxy\-hit]: HTTP hits +\& LegendO[proxy\-hit]: HTTP requests +\& Legend1[proxy\-hit]: HTTP hits +\& Legend2[proxy\-hit]: HTTP requests +\& YLegend[proxy\-hit]: perminute +\& ShortLegend[proxy\-hit]: req/min +\& Options[proxy\-hit]: nopercent, perminute, dorelpercent +\& +\& Target[proxy\-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@proxy +\& Title[proxy\-srvkbinout]: Cache Server Traffic In / Out +\& PageTop[proxy\-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out) </H2> +\& Suppress[proxy\-srvkbinout]: y +\& LegendI[proxy\-srvkbinout]: Traffic In +\& LegendO[proxy\-srvkbinout]: Traffic Out +\& Legend1[proxy\-srvkbinout]: Traffic In +\& Legend2[proxy\-srvkbinout]: Traffic Out +\& YLegend[proxy\-srvkbinout]: per minute +\& ShortLegend[proxy\-srvkbinout]: b/min +\& kMG[proxy\-srvkbinout]: k,M,G,T +\& kilo[proxy\-srvkbinout]: 1024 +\& Options[proxy\-srvkbinout]: nopercent, perminute +.Ve +.SH "AUTHOR" +.IX Header "AUTHOR" +Andreas Papst <andreas.papst@univie.ac.at> +Dirk-LXder Kreie <deelkar@gmx.de> +Chris Chiappa <chris+debian@chiappa.net> diff --git a/src/doc/mrtg-squid.pod b/doc/mrtg-squid.pod index 1989822..1989822 100644 --- a/src/doc/mrtg-squid.pod +++ b/doc/mrtg-squid.pod diff --git a/doc/mrtg-squid.txt b/doc/mrtg-squid.txt new file mode 100644 index 0000000..567fa63 --- /dev/null +++ b/doc/mrtg-squid.txt @@ -0,0 +1,106 @@ +MRTG-SQUID(1) mrtg MRTG-SQUID(1) + + + +mrtg-squid - using mrtg to monitor Squid + +DDEESSCCRRIIPPTTIIOONN + Squid 2.3 knows SNMP and you can therefore use mrtg to monitor it quite + easily. + + I have made some modifications to mrtg which simplify this. My work is + based on earlier modification made by: matija.grabnar@arnes.si and + kostas@nlanr.net. + +MMOODDIIFFIICCAATTIIOONNSS + I added new code for displaying correct units to the previous patches + "perminute" and "perhour" ("option" tokens), which allows other + measurement in addition to "persecond". + + Then I created a new option token "dorelpercent" which allows the + calculation of the percentage of IN-stream / OUT-stream on the fly and + then displays it on a fixed scale from 0% to 100%. For my requirements, + this does good work. Maybe someone wants a floating scale. It should + not be a problem to implement it, too (but give me an option to keep my + fixed scale). If IN-stream is always less than OUT-stream both lines + (OUT-stream and relative percent) are always displayed on top of IN- + stream bulk. Otherwise this option makes no sense. With this option you + can display hitrates, errorrates (for router monitoring: rel. + droprates) easily now. + + If you use this options please consider that you need a 5th + colourname/value pair in your Colours statements! + + Due to some discussion on this list, I have implemented two tokens too: + + "kilo" and "kMG" + + "kilo" should contain the value of k (1000 or 1024), where 1000 is the + default. + + "kMG" is a comma separated list of multiplier prefixes, used instead of + "", "k", "M", "G", "T" on the MRTG display. Leave the place free, if + you want no prefix. + + Also an incomplete list of OIDs for the new SQUID release is added. + + You may need to turn on snmp_port in squid.conf to as it is disabled by + default. + + I hope you enjoy it. + +CCOONNFFIIGG EEXXAAMMPPLLEE + First load the squid mib + + LoadMIBs: /usr/share/squid/mib.txt + + You can measure responsetimes in ms and display it with MRTG correctly + with: + + kMG[measure-ms]: m,,k,M,G,T + short[measure-ms]: s + + You can display now MB/s as 1024*1024 B/s with: + + kilo[volume]: 1024 + + Assuming you're not running squid's SNMP on the default snmp port, you + need to include a port number in your target line: + + Target[proxy-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@localhost:3401 + + A sample config for squid: + + Target[proxy-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@proxy + Title[proxy-hit]: HTTP Hits + PageTop[proxy-hit]: <H2>proxy Cache Statistics: HTTP Hits / Requests</H2> + Suppress[proxy-hit]: y + LegendI[proxy-hit]: HTTP hits + LegendO[proxy-hit]: HTTP requests + Legend1[proxy-hit]: HTTP hits + Legend2[proxy-hit]: HTTP requests + YLegend[proxy-hit]: perminute + ShortLegend[proxy-hit]: req/min + Options[proxy-hit]: nopercent, perminute, dorelpercent + + Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@proxy + Title[proxy-srvkbinout]: Cache Server Traffic In / Out + PageTop[proxy-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out) </H2> + Suppress[proxy-srvkbinout]: y + LegendI[proxy-srvkbinout]: Traffic In + LegendO[proxy-srvkbinout]: Traffic Out + Legend1[proxy-srvkbinout]: Traffic In + Legend2[proxy-srvkbinout]: Traffic Out + YLegend[proxy-srvkbinout]: per minute + ShortLegend[proxy-srvkbinout]: b/min + kMG[proxy-srvkbinout]: k,M,G,T + kilo[proxy-srvkbinout]: 1024 + Options[proxy-srvkbinout]: nopercent, perminute + +AAUUTTHHOORR + Andreas Papst <andreas.papst@univie.ac.at> Dirk-LXder Kreie + <deelkar@gmx.de> Chris Chiappa <chris+debian@chiappa.net> + + + +2.17.7 2018-07-13 MRTG-SQUID(1) diff --git a/src/doc/mrtg-ti.png b/doc/mrtg-ti.png Binary files differindex 0031314..0031314 100644 --- a/src/doc/mrtg-ti.png +++ b/doc/mrtg-ti.png diff --git a/doc/mrtg-unix-guide.1 b/doc/mrtg-unix-guide.1 new file mode 100644 index 0000000..b08e997 --- /dev/null +++ b/doc/mrtg-unix-guide.1 @@ -0,0 +1,452 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-UNIX-GUIDE 1" +.TH MRTG-UNIX-GUIDE 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-unix\-guide \- The MRTG 2.17.7 Linux/Unix Installation Guide +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\s-1MRTG\s0 comes to you in Source Code. This means that you have to compile +parts of it before you can use it on a Unix machine. These instructions +help you to do so. +.SH "PREPARATION" +.IX Header "PREPARATION" +In order to compile and use mrtg you need a C compiler and a copy of perl +installed on your machine. In most cases this will already be available. +In case it is not, here are some starting points. Below I'll give you +a detailed run through the whole compilation process. +.IP "\s-1GCC\s0" 4 +.IX Item "GCC" +The \s-1GNU C\s0 compiler comes preinstalled on most of the free Unicies out +there. For commercial derivatives you may have to download and compile +it first. If you have no compiler at all there is a chicken and egg +problem, but there are also precompiled versions of gcc available for +most operating systems. +.Sp +.Vb 1 +\& http://gcc.gnu.org/ +.Ve +.IP "Perl" 4 +.IX Item "Perl" +Large parts of the \s-1MRTG\s0 system are written in the Perl scripting language. +Make sure there is a recent copy of perl on your machine (try perl \-v). At +least version 5.005 is required for mrtg to work well. If you use \s-1SNMPV3\s0 and +other new features you should use at least 5.8. +.Sp +You can get the latest perl from +.Sp +.Vb 1 +\& http://www.perl.com/ +.Ve +.PP +\&\s-1MRTG\s0 generates traffic graphs in the \s-1PNG\s0 format. To be able to do this it +needs several 3rd party libraries. When compiling these libraries I urge you +to make sure you compile them as \fBstatic\fR libraries. There is just much +less trouble ahead if you are doing it like this. See the Instructions in +the next section for inspiration. Note that many free unices have all +the required libraries already in place so there is no need to install +another copy. To check it is best to skip all the library instructions below +and go straight into the mrtg compile. +.PP +If the first attempt fails and you do not get a working version of mrtg, +try compiling new copies of all libraries as explained below. Do this +\&\fB\s-1BEFORE\s0\fR you send email to me about problems compiling mrtg. +.IP "gd" 4 +.IX Item "gd" +This is a basic graph drawing library created by Thomas Boutell. +Note that all releases after Version 1.3 only create +\&\s-1PNG\s0 images. This is because a) Thomas got into trouble because the \s-1GIF\s0 +format which it used to produce uses a compression technology patented +by Unisys. b) \s-1PNG\s0 is more efficient and patent free. \s-1MRTG\s0 can work +with old and new version of the \s-1GD\s0 library. You can get a recent copy +of \s-1GD\s0 from: +.Sp +.Vb 1 +\& http://www.boutell.com/gd/ +.Ve +.IP "libpng" 4 +.IX Item "libpng" +Is required by gd in order to produce \s-1PNG\s0 graphics files. Get it from: +.Sp +.Vb 1 +\& http://www.libpng.org/pub/png/libpng.html +.Ve +.IP "zlib" 4 +.IX Item "zlib" +Is needed by libpng to compress the graphics files you create. +Get a copy from +.Sp +.Vb 1 +\& http://www.gzip.org/zlib +.Ve +.PP +And last but not least you also need mrtg itself. In case you have not +yet downloaded it, you can find a copy on my website: +.PP +.Vb 1 +\& http://oss.oetiker.ch/mrtg/pub +.Ve +.SH "LIBRARY COMPILATION" +.IX Header "LIBRARY COMPILATION" +In this section I will give you step by step instructions on how to compile +the various libraries required for the compilation of mrtg. Note that these +libraries may already be installed if you have a \fI*BSD\fR or \fILinux\fR system +so you can skip recompiling them. The \fBwget\fR program used below is a +simple web downloader. You can also enter the address into your \fBnetscape\fR +if you don't have \fBwget\fR available. +.PP +First let's create a directory for the compilation. Note that this may +already exist on your system. No problem, just use it. +.PP +.Vb 2 +\& mkdir \-p /usr/local/src +\& cd /usr/local/src +.Ve +.PP +If you do not have zlib installed: +.PP +.Vb 8 +\& wget http://www.zlib.net/zlib\-1.2.3.tar.gz +\& gunzip \-c zlib\-*.tar.gz | tar xf \- +\& rm zlib\-*.tar.gz +\& mv zlib\-* zlib +\& cd zlib +\& ./configure +\& make +\& cd .. +.Ve +.PP +If you don't have libpng installed +.PP +.Vb 8 +\& wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng\-1.2.40.tar.gz +\& gunzip \-c libpng\-1.2.34.tar.gz | tar xf \- +\& mv libpng\-* libpng +\& cd libpng +\& env CFLAGS="\-O3 \-fPIC" ./configure \-\-prefix=$INSTALL_DIR +\& make +\& rm *.so.* *.so +\& cd .. +.Ve +.PP +And now you can compile gd +.PP +For versions up to 1.8.4, try: +.PP +.Vb 5 +\& wget http://www.boutell.com/gd/http/gd\-1.8.4.tar.gz +\& gunzip \-c gd\-*.tar.gz |tar xf \- +\& rm gd\-*.tar.gz +\& mv gd\-* gd +\& cd gd +.Ve +.PP +The \e characters at the end of the following lines mean that all the +following material should actually be written on a single line. +.PP +.Vb 6 +\& perl \-i~ \-p \-e s/gd_jpeg.o//g Makefile +\& make INCLUDEDIRS="\-I. \-I../zlib \-I../libpng" \e +\& LIBDIRS="\-L../zlib \-L. \-L../libpng" \e +\& LIBS="\-lgd \-lpng \-lz \-lm" \e +\& CFLAGS="\-O \-DHAVE_LIBPNG" +\& cd .. +.Ve +.PP +For versions starting around 2.0.11, try: +.PP +.Vb 8 +\& wget http://www.boutell.com/gd/http/gd\-2.0.33.tar.gz +\& gunzip \-c gd\-2.0.33.tar.gz |tar xf \- +\& mv gd\-2.0.33 gd +\& cd gd +\& env CPPFLAGS="\-I../zlib \-I../libpng" LDFLAGS="\-L../zlib \-L../libpng" \e +\& ./configure \-\-disable\-shared \-\-without\-freetype \-\-without\-jpeg +\& make +\& cp .libs/* . +.Ve +.SH "MRTG COMPILATION" +.IX Header "MRTG COMPILATION" +Ok, now everything is ready for the mrtg compilation. +.PP +.Vb 3 +\& cd /usr/local/src +\& gunzip \-c mrtg\-2.17.7.tar.gz | tar xvf \- +\& cd mrtg\-2.17.7 +.Ve +.PP +If all the libraries have been preinstalled on your system you can +configure mrtg by doing a simple: +.PP +.Vb 1 +\& ./configure \-\-prefix=/usr/local/mrtg\-2 +.Ve +.PP +Otherwise you may have to give some hints on where to find the +various libraries required to compile mrtg: +.PP +.Vb 4 +\& ./configure \-\-prefix=/usr/local/mrtg\-2 \e +\& \-\-with\-gd=/usr/local/src/gd \e +\& \-\-with\-z=/usr/local/src/zlib \e +\& \-\-with\-png=/usr/local/src/libpng +.Ve +.PP +If you have RRDtool available you might want to tell mrtg about it +so that you can opt to use rrdtool with mrtg. Check mrtg-rrd. +.PP +Configure will make sure your environment is fit for building mrtg. +If it finds a problem, it will tell you so and it will also tell +you what to do about it. If everything is \s-1OK,\s0 you will end up with +a custom Makefile for your system. Now type: +.PP +.Vb 1 +\& make +.Ve +.PP +This builds the rateup binary and edits all the perl pathnames in +the scripts. You can now install mrtg by typing +.PP +.Vb 1 +\& make install (requires gnu install) +.Ve +.PP +All the software required by \s-1MRTG\s0 is now installed under +the \fI/usr/local/mrtg\-2\fR subdirectory. +.PP +You can now safely delete the libraries we compiled above. Then +again, you might want to keep them around so that you have them +available when compiling the next version of mrtg. +.SH "CONFIGURATION" +.IX Header "CONFIGURATION" +The next step is to configure mrtg for monitoring a network +device. This is done by creating an \fImrtg.cfg\fR file which defines +what you want to monitor. Luckily, you don't have to dive straight in +and start writing your own configuration file all by +yourself. Together with mrtg you also got a copy of \fBcfgmaker\fR. This +is a script you can point at a router of your choice; it will +create a mrtg configuration file for you. You can find the script in +the \fIbin\fR subdirectory. +.PP +.Vb 4 +\& cfgmaker \-\-global \*(AqWorkDir: /home/httpd/mrtg\*(Aq \e +\& \-\-global \*(AqOptions[_]: bits,growright\*(Aq \e +\& \-\-output /home/mrtg/cfg/mrtg.cfg \e +\& community@router.abc.xyz +.Ve +.PP +This example above will create an mrtg config file in +\&\fI/home/mrtg/cfg\fR assuming this is a directory visible on your +webserver. You can read all about cfgmaker in cfgmaker. One area you might +want to look at is the possibility of using \fB\-\-ifref=ip\fR to prevent +interface renumbering troubles from catching you. +.PP +If you want to start rolling your own mrtg configuration files, make sure +you read mrtg-reference to learn all about the possible configuration options. +.SH "RUNNING MRTG" +.IX Header "RUNNING MRTG" +Once you have created a configuration file, try the following: +.PP +.Vb 1 +\& /usr/local/mrtg\-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg +.Ve +.PP +This will query your router and also create your first mrtg trafic +graphs and webpages. When you run mrtg for the first time there will +be a lot of complaints about missing log files. Don't worry, this is +normal for the first 2 times you start mrtg. If it keeps complaining +after this time you might want to look into the problem. +.PP +Starting mrtg by hand is not ideal in the long run. So when you are +satisfied with the results you can automate the process of running mrtg in +regular intervals (this means every 5 minutes by default). +.PP +You can either add mrtg to your crontab with a line like this: +.PP +.Vb 3 +\& 0,5,10,15,20,25,30,35,40,45,50,55 * * * * \e +\& <mrtg\-bin>/mrtg <path to mrtg\-cfg>/mrtg.cfg \e +\& \-\-logging /var/log/mrtg.log +.Ve +.PP +or if you live in Linux Land the line may look like this if you are +using \f(CW\*(C`crontab \-e\*(C'\fR +.PP +.Vb 2 +\& */5 * * * * <mrtg\-bin>/mrtg <path to mrtg\-cfg>/mrtg.cfg \e +\& \-\-logging /var/log/mrtg.log +.Ve +.PP +or like this if you use \fI/etc/crontab\fR +.PP +.Vb 2 +\& */5 * * * * mrtg\-user <mrtg\-bin>/mrtg <path to mrtg\-cfg>/mrtg.cfg \e +\& \-\-logging /var/log/mrtg.log +.Ve +.PP +You can also run mrtg as a daemon process by adding the line +.PP +.Vb 1 +\& RunAsDaemon: Yes +.Ve +.PP +to your mrtg configuration file and then creating a startup script in +your system startup sequence. Unfortunately, adding startup scripts +differs widely amongst different unix systems. The modern ones normally +have a directory called \fI/etc/init.d\fR or \fI/etc/rc.d/init.d\fR where you +put scripts which starts the process you want to run when the system +boots. Further you must create a symbolic link in \fI/etc/rc3.d\fR or +\&\fI/etc/rc.d/rc?.d\fR called \fIS65mrtg\fR (this is just a sample name +\&... it is just important that it starts with S followed by a two digit +number). If you are not sure about this, make sure you consult the +documentation of your system to make sure you get this right. +.PP +A \fBminimal\fR script to put into \fIinit.d\fR might look like this: +.PP +.Vb 3 +\& #! /bin/sh +\& cd /usr/local/mrtg\-2.17.7/bin && ./mrtg \-\-user=mrtg\-user \e +\& /home/httpd/mrtg/mrtg.cfg \-\-logging /var/log/mrtg.log +.Ve +.PP +Note that this will only work with \fBRunAsDaemon: Yes\fR in your +mrtg.cfg file. +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> diff --git a/src/doc/mrtg-unix-guide.pod b/doc/mrtg-unix-guide.pod index 44fc6c0..44fc6c0 100644 --- a/src/doc/mrtg-unix-guide.pod +++ b/doc/mrtg-unix-guide.pod diff --git a/doc/mrtg-unix-guide.txt b/doc/mrtg-unix-guide.txt new file mode 100644 index 0000000..709dfa0 --- /dev/null +++ b/doc/mrtg-unix-guide.txt @@ -0,0 +1,272 @@ +MRTG-UNIX-GUIDE(1) mrtg MRTG-UNIX-GUIDE(1) + + + +NNAAMMEE + mrtg-unix-guide - The MRTG 2.17.7 Linux/Unix Installation Guide + +DDEESSCCRRIIPPTTIIOONN + MRTG comes to you in Source Code. This means that you have to compile + parts of it before you can use it on a Unix machine. These instructions + help you to do so. + +PPRREEPPAARRAATTIIOONN + In order to compile and use mrtg you need a C compiler and a copy of + perl installed on your machine. In most cases this will already be + available. In case it is not, here are some starting points. Below + I'll give you a detailed run through the whole compilation process. + + GCC The GNU C compiler comes preinstalled on most of the free Unicies + out there. For commercial derivatives you may have to download and + compile it first. If you have no compiler at all there is a chicken + and egg problem, but there are also precompiled versions of gcc + available for most operating systems. + + http://gcc.gnu.org/ + + Perl + Large parts of the MRTG system are written in the Perl scripting + language. Make sure there is a recent copy of perl on your machine + (try perl -v). At least version 5.005 is required for mrtg to work + well. If you use SNMPV3 and other new features you should use at + least 5.8. + + You can get the latest perl from + + http://www.perl.com/ + + MRTG generates traffic graphs in the PNG format. To be able to do this + it needs several 3rd party libraries. When compiling these libraries I + urge you to make sure you compile them as ssttaattiicc libraries. There is + just much less trouble ahead if you are doing it like this. See the + Instructions in the next section for inspiration. Note that many free + unices have all the required libraries already in place so there is no + need to install another copy. To check it is best to skip all the + library instructions below and go straight into the mrtg compile. + + If the first attempt fails and you do not get a working version of + mrtg, try compiling new copies of all libraries as explained below. Do + this BBEEFFOORREE you send email to me about problems compiling mrtg. + + gd This is a basic graph drawing library created by Thomas Boutell. + Note that all releases after Version 1.3 only create PNG images. + This is because a) Thomas got into trouble because the GIF format + which it used to produce uses a compression technology patented by + Unisys. b) PNG is more efficient and patent free. MRTG can work + with old and new version of the GD library. You can get a recent + copy of GD from: + + http://www.boutell.com/gd/ + + libpng + Is required by gd in order to produce PNG graphics files. Get it + from: + + http://www.libpng.org/pub/png/libpng.html + + zlib + Is needed by libpng to compress the graphics files you create. Get + a copy from + + http://www.gzip.org/zlib + + And last but not least you also need mrtg itself. In case you have not + yet downloaded it, you can find a copy on my website: + + http://oss.oetiker.ch/mrtg/pub + +LLIIBBRRAARRYY CCOOMMPPIILLAATTIIOONN + In this section I will give you step by step instructions on how to + compile the various libraries required for the compilation of mrtg. + Note that these libraries may already be installed if you have a _*_B_S_D + or _L_i_n_u_x system so you can skip recompiling them. The wwggeett program used + below is a simple web downloader. You can also enter the address into + your nneettssccaappee if you don't have wwggeett available. + + First let's create a directory for the compilation. Note that this may + already exist on your system. No problem, just use it. + + mkdir -p /usr/local/src + cd /usr/local/src + + If you do not have zlib installed: + + wget http://www.zlib.net/zlib-1.2.3.tar.gz + gunzip -c zlib-*.tar.gz | tar xf - + rm zlib-*.tar.gz + mv zlib-* zlib + cd zlib + ./configure + make + cd .. + + If you don't have libpng installed + + wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.40.tar.gz + gunzip -c libpng-1.2.34.tar.gz | tar xf - + mv libpng-* libpng + cd libpng + env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR + make + rm *.so.* *.so + cd .. + + And now you can compile gd + + For versions up to 1.8.4, try: + + wget http://www.boutell.com/gd/http/gd-1.8.4.tar.gz + gunzip -c gd-*.tar.gz |tar xf - + rm gd-*.tar.gz + mv gd-* gd + cd gd + + The \ characters at the end of the following lines mean that all the + following material should actually be written on a single line. + + perl -i~ -p -e s/gd_jpeg.o//g Makefile + make INCLUDEDIRS="-I. -I../zlib -I../libpng" \ + LIBDIRS="-L../zlib -L. -L../libpng" \ + LIBS="-lgd -lpng -lz -lm" \ + CFLAGS="-O -DHAVE_LIBPNG" + cd .. + + For versions starting around 2.0.11, try: + + wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz + gunzip -c gd-2.0.33.tar.gz |tar xf - + mv gd-2.0.33 gd + cd gd + env CPPFLAGS="-I../zlib -I../libpng" LDFLAGS="-L../zlib -L../libpng" \ + ./configure --disable-shared --without-freetype --without-jpeg + make + cp .libs/* . + +MMRRTTGG CCOOMMPPIILLAATTIIOONN + Ok, now everything is ready for the mrtg compilation. + + cd /usr/local/src + gunzip -c mrtg-2.17.7.tar.gz | tar xvf - + cd mrtg-2.17.7 + + If all the libraries have been preinstalled on your system you can + configure mrtg by doing a simple: + + ./configure --prefix=/usr/local/mrtg-2 + + Otherwise you may have to give some hints on where to find the various + libraries required to compile mrtg: + + ./configure --prefix=/usr/local/mrtg-2 \ + --with-gd=/usr/local/src/gd \ + --with-z=/usr/local/src/zlib \ + --with-png=/usr/local/src/libpng + + If you have RRDtool available you might want to tell mrtg about it so + that you can opt to use rrdtool with mrtg. Check mrtg-rrd. + + Configure will make sure your environment is fit for building mrtg. If + it finds a problem, it will tell you so and it will also tell you what + to do about it. If everything is OK, you will end up with a custom + Makefile for your system. Now type: + + make + + This builds the rateup binary and edits all the perl pathnames in the + scripts. You can now install mrtg by typing + + make install (requires gnu install) + + All the software required by MRTG is now installed under the + _/_u_s_r_/_l_o_c_a_l_/_m_r_t_g_-_2 subdirectory. + + You can now safely delete the libraries we compiled above. Then again, + you might want to keep them around so that you have them available when + compiling the next version of mrtg. + +CCOONNFFIIGGUURRAATTIIOONN + The next step is to configure mrtg for monitoring a network device. + This is done by creating an _m_r_t_g_._c_f_g file which defines what you want + to monitor. Luckily, you don't have to dive straight in and start + writing your own configuration file all by yourself. Together with mrtg + you also got a copy of ccffggmmaakkeerr. This is a script you can point at a + router of your choice; it will create a mrtg configuration file for + you. You can find the script in the _b_i_n subdirectory. + + cfgmaker --global 'WorkDir: /home/httpd/mrtg' \ + --global 'Options[_]: bits,growright' \ + --output /home/mrtg/cfg/mrtg.cfg \ + community@router.abc.xyz + + This example above will create an mrtg config file in _/_h_o_m_e_/_m_r_t_g_/_c_f_g + assuming this is a directory visible on your webserver. You can read + all about cfgmaker in cfgmaker. One area you might want to look at is + the possibility of using ----iiffrreeff==iipp to prevent interface renumbering + troubles from catching you. + + If you want to start rolling your own mrtg configuration files, make + sure you read mrtg-reference to learn all about the possible + configuration options. + +RRUUNNNNIINNGG MMRRTTGG + Once you have created a configuration file, try the following: + + /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg + + This will query your router and also create your first mrtg trafic + graphs and webpages. When you run mrtg for the first time there will be + a lot of complaints about missing log files. Don't worry, this is + normal for the first 2 times you start mrtg. If it keeps complaining + after this time you might want to look into the problem. + + Starting mrtg by hand is not ideal in the long run. So when you are + satisfied with the results you can automate the process of running mrtg + in regular intervals (this means every 5 minutes by default). + + You can either add mrtg to your crontab with a line like this: + + 0,5,10,15,20,25,30,35,40,45,50,55 * * * * \ + <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg \ + --logging /var/log/mrtg.log + + or if you live in Linux Land the line may look like this if you are + using "crontab -e" + + */5 * * * * <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg \ + --logging /var/log/mrtg.log + + or like this if you use _/_e_t_c_/_c_r_o_n_t_a_b + + */5 * * * * mrtg-user <mrtg-bin>/mrtg <path to mrtg-cfg>/mrtg.cfg \ + --logging /var/log/mrtg.log + + You can also run mrtg as a daemon process by adding the line + + RunAsDaemon: Yes + + to your mrtg configuration file and then creating a startup script in + your system startup sequence. Unfortunately, adding startup scripts + differs widely amongst different unix systems. The modern ones normally + have a directory called _/_e_t_c_/_i_n_i_t_._d or _/_e_t_c_/_r_c_._d_/_i_n_i_t_._d where you put + scripts which starts the process you want to run when the system boots. + Further you must create a symbolic link in _/_e_t_c_/_r_c_3_._d or + _/_e_t_c_/_r_c_._d_/_r_c_?_._d called _S_6_5_m_r_t_g (this is just a sample name ... it is + just important that it starts with S followed by a two digit number). + If you are not sure about this, make sure you consult the documentation + of your system to make sure you get this right. + + A mmiinniimmaall script to put into _i_n_i_t_._d might look like this: + + #! /bin/sh + cd /usr/local/mrtg-2.17.7/bin && ./mrtg --user=mrtg-user \ + /home/httpd/mrtg/mrtg.cfg --logging /var/log/mrtg.log + + Note that this will only work with RRuunnAAssDDaaeemmoonn:: YYeess in your mrtg.cfg + file. + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> + + + +2.17.7 2018-07-13 MRTG-UNIX-GUIDE(1) diff --git a/doc/mrtg-webserver.1 b/doc/mrtg-webserver.1 new file mode 100644 index 0000000..532c895 --- /dev/null +++ b/doc/mrtg-webserver.1 @@ -0,0 +1,206 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG-WEBSERVER 1" +.TH MRTG-WEBSERVER 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg\-webserver \- hints for web server configuration +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +If you want people to actually see the results +of your network monitoring efforts you will need +a webserver. +.PP +This document lists some configuration hints for +webservers. Contributions welcome. +.SH "APACHE" +.IX Header "APACHE" +.SS "Configuring mod_expire" +.IX Subsection "Configuring mod_expire" +A big issue with mrtg monitoring data is the expiry time. +All these nice graphs you can create are only valid for a short time. +If you do not take special action some webbrowsers will not notice this +and you may end up with people seeing old data because of caching issues. +.PP +The apache module mod_expire allows you to setup special +expiry properties for individual file. +.PP +Here is an example for how this may look for an mrtg web directory. +The configuration directives can be stored into a \fI.htaccess\fR file. +.PP +.Vb 11 +\& ############################################################ +\& # Example .htaccess for use with apache\-1.2 and mod_expire. +\& # (mod_expire come with apache\-1.2 but you have to explicitly +\& # activate it when compiling the httpd ...) +\& ############################################################# +\& # +\& <Files "*\-day.png"> +\& ExpiresActive On # enable expirations +\& # five minutes +\& ExpiresDefault M300 +\& </Files> +\& +\& <Files "*\-week.png"> +\& ExpiresActive On +\& ExpiresDefault M1800 +\& </Files> +\& +\& <Files "*\-month.png"> +\& ExpiresActive On +\& ExpiresDefault M7200 +\& </Files> +\& +\& <Files "*\-year.png"> +\& ExpiresActive On +\& ExpiresDefault M86400 +\& </Files> +\& +\& <Files "*.html"> +\& ExpiresActive On +\& ExpiresDefault M300 +\& </Files> +\& +\& # index.html is not automatically generated +\& <Files "index.html"> +\& ExpiresActive Off +\& </Files> +.Ve +.SH "AUTHOR" +.IX Header "AUTHOR" +Unknown diff --git a/src/doc/mrtg-webserver.pod b/doc/mrtg-webserver.pod index 5c4a547..5c4a547 100644 --- a/src/doc/mrtg-webserver.pod +++ b/doc/mrtg-webserver.pod diff --git a/doc/mrtg-webserver.txt b/doc/mrtg-webserver.txt new file mode 100644 index 0000000..10a6761 --- /dev/null +++ b/doc/mrtg-webserver.txt @@ -0,0 +1,70 @@ +MRTG-WEBSERVER(1) mrtg MRTG-WEBSERVER(1) + + + +NNAAMMEE + mrtg-webserver - hints for web server configuration + +SSYYNNOOPPSSIISS + If you want people to actually see the results of your network + monitoring efforts you will need a webserver. + + This document lists some configuration hints for webservers. + Contributions welcome. + +AAPPAACCHHEE + CCoonnffiigguurriinngg mmoodd__eexxppiirree + A big issue with mrtg monitoring data is the expiry time. All these + nice graphs you can create are only valid for a short time. If you do + not take special action some webbrowsers will not notice this and you + may end up with people seeing old data because of caching issues. + + The apache module mod_expire allows you to setup special expiry + properties for individual file. + + Here is an example for how this may look for an mrtg web directory. + The configuration directives can be stored into a _._h_t_a_c_c_e_s_s file. + + ############################################################ + # Example .htaccess for use with apache-1.2 and mod_expire. + # (mod_expire come with apache-1.2 but you have to explicitly + # activate it when compiling the httpd ...) + ############################################################# + # + <Files "*-day.png"> + ExpiresActive On # enable expirations + # five minutes + ExpiresDefault M300 + </Files> + + <Files "*-week.png"> + ExpiresActive On + ExpiresDefault M1800 + </Files> + + <Files "*-month.png"> + ExpiresActive On + ExpiresDefault M7200 + </Files> + + <Files "*-year.png"> + ExpiresActive On + ExpiresDefault M86400 + </Files> + + <Files "*.html"> + ExpiresActive On + ExpiresDefault M300 + </Files> + + # index.html is not automatically generated + <Files "index.html"> + ExpiresActive Off + </Files> + +AAUUTTHHOORR + Unknown + + + +2.17.7 2018-07-13 MRTG-WEBSERVER(1) diff --git a/doc/mrtg.1 b/doc/mrtg.1 new file mode 100644 index 0000000..bdc7f1c --- /dev/null +++ b/doc/mrtg.1 @@ -0,0 +1,322 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTG 1" +.TH MRTG 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +mrtg \- What is MRTG ? +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The Multi Router Traffic Grapher (\s-1MRTG\s0) is a tool to monitor +the traffic load on network links. \s-1MRTG\s0 generates \s-1HTML\s0 pages +containing \s-1PNG\s0 images which provide a \s-1LIVE\s0 visual representation of +this traffic. +.PP +Go to http://oss.oetiker.ch/mrtg for all the details about mrtg. +.SH "HIGHLIGHTS" +.IX Header "HIGHLIGHTS" +.IP "Portable" 4 +.IX Item "Portable" +\&\s-1MRTG\s0 works on most \s-1UNIX\s0 platforms and Windows \s-1NT.\s0 +.IP "Perl" 4 +.IX Item "Perl" +\&\s-1MRTG\s0 is written in Perl and comes with full source. +.IP "Portable \s-1SNMP\s0" 4 +.IX Item "Portable SNMP" +\&\s-1MRTG\s0 Uses a highly portable \s-1SNMP\s0 implementation written entirely in +Perl (thanks to Simon Leinen). There is no need to install any +external \s-1SNMP\s0 package. +.IP "SNMPv2c support" 4 +.IX Item "SNMPv2c support" +\&\s-1MRTG\s0 can read the new SNMPv2c 64bit counters. No more counter wrapping. +.IP "Reliable Interface Identification" 4 +.IX Item "Reliable Interface Identification" +Router interfaces can be identified by \s-1IP\s0 address, description and +ethernet address in addition to the normal interface number. +.IP "Constant size Logfiles" 4 +.IX Item "Constant size Logfiles" +\&\s-1MRTG\s0's logfiles do \s-1NOT\s0 grow thanks to the use of a unique data +consolidation algorithm. +.IP "Automatic Configuration" 4 +.IX Item "Automatic Configuration" +\&\s-1MRTG\s0 comes with a set of configuration tools which make configuration and +setup very simple. +.IP "Performance" 4 +.IX Item "Performance" +Time critical routines are written in C (thanks to the initiative +of Dave Rand my Co-Author). +.IP "\s-1GIF\s0 free Graphics" 4 +.IX Item "GIF free Graphics" +Graphics are generated directly in \s-1PNG\s0 format using the +\&\s-1GD\s0 library by Thomas Boutell. +.IP "Customizability" 4 +.IX Item "Customizability" +The look of the webpages produced by \s-1MRTG\s0 is highly configurable. +.IP "RRDtool" 4 +.IX Item "RRDtool" +\&\s-1MRTG\s0 has built-in hooks for using RRDtool. If you are strapped for +performance this may help. +.SH "DETAILS" +.IX Header "DETAILS" +\&\s-1MRTG\s0 consists of a Perl script which uses \s-1SNMP\s0 to read the traffic +counters of your routers and a fast C program which logs the traffic +data and creates beautiful graphs representing the traffic on the +monitored network connection. These graphs are embedded into webpages +which can be viewed from any modern Web-browser. +.PP +In addition to a detailed daily view, \s-1MRTG\s0 also creates visual +representations of the traffic seen during the last seven days, the +last five weeks and the last twelve months. This is possible because +\&\s-1MRTG\s0 keeps a log of all the data it has pulled from the router. This +log is automatically consolidated so that it does not grow over time, +but still contains all the relevant data for all the traffic seen over +the last two years. This is all performed in an efficient manner. +Therefore you can monitor 200 or more network links from any halfway +decent \s-1UNIX\s0 box. +.PP +\&\s-1MRTG\s0 is not limited to monitoring traffic, though. It is possible to +monitor any \s-1SNMP\s0 variable you choose. You can even use an +external program to gather the data which should be monitored via +\&\s-1MRTG.\s0 People are using \s-1MRTG,\s0 to monitor things such as System Load, +Login Sessions, Modem availability and more. \s-1MRTG\s0 even allows you to +accumulate two or more data sources into a single graph. +.SH "HISTORY" +.IX Header "HISTORY" +In 1994 I was working at a site where we had one +64kbit line to the outside world. Obviously, everybody was interested +in knowing how the link was performing. So I wrote a quick hack which +created a constantly updated graph on the web that showed the traffic +load on our Internet link. This eventually evolved into a rather +configurable Perl script called \s-1MRTG\-1.0\s0 which I released in spring +1995. After a few updates, I left my job at \s-1DMU\s0 to start work at the +Swiss Federal Institute of Technology. Due to lack of time I had to +put \s-1MRTG\s0 aside. One day in January of 1996, I received email from +Dave Rand asking if I had any ideas why \s-1MRTG\s0 was so slow. Actually, I +did. \s-1MRTG\s0's programming was not very efficient and it was written +entirely in Perl. After a week or so, Dave wrote back to me and said +he had tried what I had suggested for improving \s-1MRTG\s0's speed. Since +the changes did not help much, he had decided to rewrite the +time-critical sections of \s-1MRTG\s0 in C. The code was attached to his +email. His tool increased the speed of \s-1MRTG\s0 by a factor of 40! This +got me out of my '\s-1MRTG\s0 ignorance' and I started to spend my spare time +developing of \s-1MRTG\-2.\s0 +.PP +Soon after \s-1MRTG\-2\s0 development had begun I started to give beta +copies to interested parties. In return I got many feature patches, a +lot of user feedback and bug fixes. The product you are getting now +wouldn't be in this state if it hadn't been for the great contributions +and support I received from of many people. I would like +to take this opportunity to thank them all. (See the files \s-1CHANGES\s0 for a +long list of folk people who helped to make \s-1MRTG\s0 what it is today.) +.SH "Command-line" +.IX Header "Command-line" +Mrtg is also the name of the script you have to run to poll data and +generate the graphs. Most configuration is set through the configuration +file; some command-line options exist all the same. +.IP "\fB\-\-user\fR \fIusername\fR and \fB\-\-group\fR \fIgroupname\fR" 4 +.IX Item "--user username and --group groupname" +Run as the given user and/or group. (Unix Only) +.IP "\fB\-\-lock\-file\fR \fIfilename\fR" 4 +.IX Item "--lock-file filename" +Use an alternate lock-file (the default is to use the configuration-file +appended with \f(CW\*(C`_l\*(C'\fR). +.IP "\fB\-\-confcache\-file\fR \fIfilename\fR" 4 +.IX Item "--confcache-file filename" +Use an alternate confcache-file (the default is to use the configuration-file appended with \f(CW\*(C`.ok\*(C'\fR) +.IP "\fB\-\-logging\fR \fIfilename\fR|\fBeventlog\fR" 4 +.IX Item "--logging filename|eventlog" +If this is set to writable filename, all output from mrtg (warnings, debug messages, errors) +will go to \fIfilename\fR. If you are running on Win32 you can specify \fBeventlog\fR instead of a filename +which will send all error to the windows event log. +.Sp +\&\fB\s-1NOTE:\s0\fRNote, there is no Message \s-1DLL\s0 for mrtg. This has the side effect +that the windows event logger will display a nice message with every entry +in the event log, complaing about the fact that mrtg has no message dll. If +any of the Windows folks want to contribute one, they are welcome. +.IP "\fB\-\-daemon\fR" 4 +.IX Item "--daemon" +Put \s-1MRTG\s0 into the background, running as a daemon. This works the same way as +the config file option, but the switch is required for proper \s-1FHS\s0 operation +(because /var/run is writable only by root) +.IP "\fB\-\-fhs\fR" 4 +.IX Item "--fhs" +Configure all mrtg paths to conform to the \s-1FHS\s0 specification +<http://www.pathname.com/fhs/>. The following default values are assumed: +.Sp +.Vb 4 +\& confcachefile \- /var/cache/mrtg/mrtg.ok +\& pid\-file \- /var/run/mrtg.pid +\& lock\-file \- /var/cache/mrtg/mrtg.lck +\& log\-file \- /var/log/mrtg.log +.Ve +.IP "\fB\-\-check\fR" 4 +.IX Item "--check" +Only check the cfg file for errors. Do not do anything. +.IP "\fB\-\-pid\-file=s\fR" 4 +.IX Item "--pid-file=s" +Define the name and path of the pid file for mrtg running as a daemon +.IP "\fB\-\-log\-only\fR" 4 +.IX Item "--log-only" +Only update the logfile, do not produce graphics or html pages +.IP "\fB\-\-debug=s\fR" 4 +.IX Item "--debug=s" +Enable debug options. The argument of the debug option is a comma separated list of debug values: +.Sp +.Vb 8 +\& cfg \- watch the config file reading +\& dir \- directory mangeling +\& base \- basic program flow +\& tarp \- target parser +\& snpo \- snmp polling +\& fork \- forking view +\& time \- some timing info +\& log \- logging of data via rateup or rrdtool +.Ve +.Sp +Example: +.Sp +.Vb 1 +\& \-\-debug="cfg,snpo" +.Ve +.SH "READ ON" +.IX Header "READ ON" +Learn more about \s-1MRTG\s0 by going to the mrtg home page on: +http://oss.oetiker.ch/mrtg +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias Oetiker <tobi@oetiker.ch> and many contributors diff --git a/src/doc/mrtg.pod b/doc/mrtg.pod index 02b24c5..02b24c5 100644 --- a/src/doc/mrtg.pod +++ b/doc/mrtg.pod diff --git a/doc/mrtg.txt b/doc/mrtg.txt new file mode 100644 index 0000000..0d88e28 --- /dev/null +++ b/doc/mrtg.txt @@ -0,0 +1,188 @@ +MRTG(1) mrtg MRTG(1) + + + +NNAAMMEE + mrtg - What is MRTG ? + +DDEESSCCRRIIPPTTIIOONN + The Multi Router Traffic Grapher (MRTG) is a tool to monitor the + traffic load on network links. MRTG generates HTML pages containing + PNG images which provide a LIVE visual representation of this traffic. + + Go to http://oss.oetiker.ch/mrtg for all the details about mrtg. + +HHIIGGHHLLIIGGHHTTSS + Portable + MRTG works on most UNIX platforms and Windows NT. + + Perl + MRTG is written in Perl and comes with full source. + + Portable SNMP + MRTG Uses a highly portable SNMP implementation written entirely in + Perl (thanks to Simon Leinen). There is no need to install any + external SNMP package. + + SNMPv2c support + MRTG can read the new SNMPv2c 64bit counters. No more counter + wrapping. + + Reliable Interface Identification + Router interfaces can be identified by IP address, description and + ethernet address in addition to the normal interface number. + + Constant size Logfiles + MRTG's logfiles do NOT grow thanks to the use of a unique data + consolidation algorithm. + + Automatic Configuration + MRTG comes with a set of configuration tools which make + configuration and setup very simple. + + Performance + Time critical routines are written in C (thanks to the initiative + of Dave Rand my Co-Author). + + GIF free Graphics + Graphics are generated directly in PNG format using the GD library + by Thomas Boutell. + + Customizability + The look of the webpages produced by MRTG is highly configurable. + + RRDtool + MRTG has built-in hooks for using RRDtool. If you are strapped for + performance this may help. + +DDEETTAAIILLSS + MRTG consists of a Perl script which uses SNMP to read the traffic + counters of your routers and a fast C program which logs the traffic + data and creates beautiful graphs representing the traffic on the + monitored network connection. These graphs are embedded into webpages + which can be viewed from any modern Web-browser. + + In addition to a detailed daily view, MRTG also creates visual + representations of the traffic seen during the last seven days, the + last five weeks and the last twelve months. This is possible because + MRTG keeps a log of all the data it has pulled from the router. This + log is automatically consolidated so that it does not grow over time, + but still contains all the relevant data for all the traffic seen over + the last two years. This is all performed in an efficient manner. + Therefore you can monitor 200 or more network links from any halfway + decent UNIX box. + + MRTG is not limited to monitoring traffic, though. It is possible to + monitor any SNMP variable you choose. You can even use an external + program to gather the data which should be monitored via MRTG. People + are using MRTG, to monitor things such as System Load, Login Sessions, + Modem availability and more. MRTG even allows you to accumulate two or + more data sources into a single graph. + +HHIISSTTOORRYY + In 1994 I was working at a site where we had one 64kbit line to the + outside world. Obviously, everybody was interested in knowing how the + link was performing. So I wrote a quick hack which created a constantly + updated graph on the web that showed the traffic load on our Internet + link. This eventually evolved into a rather configurable Perl script + called MRTG-1.0 which I released in spring 1995. After a few updates, I + left my job at DMU to start work at the Swiss Federal Institute of + Technology. Due to lack of time I had to put MRTG aside. One day in + January of 1996, I received email from Dave Rand asking if I had any + ideas why MRTG was so slow. Actually, I did. MRTG's programming was not + very efficient and it was written entirely in Perl. After a week or so, + Dave wrote back to me and said he had tried what I had suggested for + improving MRTG's speed. Since the changes did not help much, he had + decided to rewrite the time-critical sections of MRTG in C. The code + was attached to his email. His tool increased the speed of MRTG by a + factor of 40! This got me out of my 'MRTG ignorance' and I started to + spend my spare time developing of MRTG-2. + + Soon after MRTG-2 development had begun I started to give beta copies + to interested parties. In return I got many feature patches, a lot of + user feedback and bug fixes. The product you are getting now wouldn't + be in this state if it hadn't been for the great contributions and + support I received from of many people. I would like to take this + opportunity to thank them all. (See the files CHANGES for a long list + of folk people who helped to make MRTG what it is today.) + +CCoommmmaanndd--lliinnee + Mrtg is also the name of the script you have to run to poll data and + generate the graphs. Most configuration is set through the + configuration file; some command-line options exist all the same. + + ----uusseerr _u_s_e_r_n_a_m_e and ----ggrroouupp _g_r_o_u_p_n_a_m_e + Run as the given user and/or group. (Unix Only) + + ----lloocckk--ffiillee _f_i_l_e_n_a_m_e + Use an alternate lock-file (the default is to use the + configuration-file appended with "_l"). + + ----ccoonnffccaacchhee--ffiillee _f_i_l_e_n_a_m_e + Use an alternate confcache-file (the default is to use the + configuration-file appended with ".ok") + + ----llooggggiinngg _f_i_l_e_n_a_m_e|eevveennttlloogg + If this is set to writable filename, all output from mrtg + (warnings, debug messages, errors) will go to _f_i_l_e_n_a_m_e. If you are + running on Win32 you can specify eevveennttlloogg instead of a filename + which will send all error to the windows event log. + + NNOOTTEE::Note, there is no Message DLL for mrtg. This has the side + effect that the windows event logger will display a nice message + with every entry in the event log, complaing about the fact that + mrtg has no message dll. If any of the Windows folks want to + contribute one, they are welcome. + + ----ddaaeemmoonn + Put MRTG into the background, running as a daemon. This works the + same way as the config file option, but the switch is required for + proper FHS operation (because /var/run is writable only by root) + + ----ffhhss + Configure all mrtg paths to conform to the FHS specification + <http://www.pathname.com/fhs/>. The following default values are + assumed: + + confcachefile - /var/cache/mrtg/mrtg.ok + pid-file - /var/run/mrtg.pid + lock-file - /var/cache/mrtg/mrtg.lck + log-file - /var/log/mrtg.log + + ----cchheecckk + Only check the cfg file for errors. Do not do anything. + + ----ppiidd--ffiillee==ss + Define the name and path of the pid file for mrtg running as a + daemon + + ----lloogg--oonnllyy + Only update the logfile, do not produce graphics or html pages + + ----ddeebbuugg==ss + Enable debug options. The argument of the debug option is a comma + separated list of debug values: + + cfg - watch the config file reading + dir - directory mangeling + base - basic program flow + tarp - target parser + snpo - snmp polling + fork - forking view + time - some timing info + log - logging of data via rateup or rrdtool + + Example: + + --debug="cfg,snpo" + +RREEAADD OONN + Learn more about MRTG by going to the mrtg home page on: + http://oss.oetiker.ch/mrtg + +AAUUTTHHOORR + Tobias Oetiker <tobi@oetiker.ch> and many contributors + + + +2.17.7 2018-07-13 MRTG(1) diff --git a/doc/mrtglib.1 b/doc/mrtglib.1 new file mode 100644 index 0000000..866d7e9 --- /dev/null +++ b/doc/mrtglib.1 @@ -0,0 +1,386 @@ +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{ +. if \nF \{ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MRTGLIB 1" +.TH MRTGLIB 1 "2018-07-13" "2.17.7" "mrtg" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +MRTG_lib.pm \- Library for MRTG and support scripts +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 5 +\& use MRTG_lib; +\& my ($configfile, @target_names, %globalcfg, %targetcfg); +\& readcfg($configfile, \e@target_names, \e%globalcfg, \e%targetcfg); +\& my (@parsed_targets); +\& cfgcheck(\e@target_names, \e%globalcfg, \e%targetcfg, \e@parsed_targets); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +MRTG_lib is part of \s-1MRTG,\s0 the Multi Router Traffic Grapher. It was separated +from \s-1MRTG\s0 to allow other programs to easily use the same config files. The +main part of MRTG_lib is the config file parser but some other funcions are +there too. +.ie n .IP "$MRTG_lib::OS" 4 +.el .IP "\f(CW$MRTG_lib::OS\fR" 4 +.IX Item "$MRTG_lib::OS" +Type of \s-1OS: WIN, UNIX, VMS\s0 +.ie n .IP "$MRTG_lib::SL" 4 +.el .IP "\f(CW$MRTG_lib::SL\fR" 4 +.IX Item "$MRTG_lib::SL" +\&\fISlash\fR in the current \s-1OS.\s0 +.ie n .IP "$MRTG_lib::PS" 4 +.el .IP "\f(CW$MRTG_lib::PS\fR" 4 +.IX Item "$MRTG_lib::PS" +Path separator in \s-1PATH\s0 variable +.ie n .IP """readcfg""" 4 +.el .IP "\f(CWreadcfg\fR" 4 +.IX Item "readcfg" +\&\f(CW\*(C`readcfg($file, \e@targets, \e%globalcfg, \e%targetcfg [, $prefix, \e%extrules])\*(C'\fR +.Sp +Reads a config file, parses it and fills some arrays and hashes. The +mandatory arguments are: the name of the config file, a ref to an array which +will be filled with a list of the target names, a hashref for the global +configuration, a hashref for the target configuration. +.Sp +The configuration file syntax is: +.Sp +.Vb 4 +\& globaloption: value +\& targetoption[targetname]: value +\& aprefix*extglobal: value +\& aprefix*exttarget[target2]: value +.Ve +.Sp +E.g. +.Sp +.Vb 3 +\& workdir: /var/stat/mrtg +\& target[router1]: 2:public@router1.local.net +\& 14all*columns: 2 +.Ve +.Sp +The global config hash has the structure +.Sp +.Vb 1 +\& $globalcfg{configoption} = \*(Aqvalue\*(Aq +.Ve +.Sp +The target config hash has the structure +.Sp +.Vb 1 +\& $targetcfg{configoption}{targetname} = \*(Aqvalue\*(Aq +.Ve +.Sp +See mrtg-reference for more information about the \s-1MRTG\s0 configuration syntax. +.Sp +\&\f(CW\*(C`readcfg\*(C'\fR can take two additional arguments to extend the config file +syntax. This allows programs to put their configuration into the mrtg config +file. The fifth argument is the prefix of the extension, the sixth argument +is a hash with the checkrules for these extension settings. E.g. if the +prefix is \*(L"14all\*(R" \f(CW\*(C`readcfg\*(C'\fR will check config lines that begin with +\&\*(L"14all*\*(R", i.e. all lines like +.Sp +.Vb 2 +\& 14all*columns: 2 +\& 14all*graphsize[target3]: 500 200 +.Ve +.Sp +against the rules in \f(CW%extrules\fR. The format of this hash is: +.Sp +.Vb 4 +\& $extrules{option} = [sub{$_[0] =~ m/^\ed+$/}, sub{"Error message for $_[0]"}] +\& i.e. +\& $extrules{option}[0] \-> a test expression +\& $extrules{option}[1] \-> error message if test fails +.Ve +.Sp +The first part of the array is a perl expression to test the value of the +option. The test can access this value in the variable \*(L"$arg\*(R". The second +part of the array is an error message to display when the test fails. The +failed value can be integrated by using the variable \*(L"$arg\*(R". +.Sp +Config settings with an different prefix than the one given in the \f(CW\*(C`readcfg\*(C'\fR +call are not checked but inserted into \fI\f(CI%globalcfg\fI\fR and \fI\f(CI%targetcfg\fI\fR. +Prefixed settings keep their prefix in the config hashes: +.Sp +.Vb 1 +\& $targetcfg{\*(Aq14all*graphsize\*(Aq}{\*(Aqtarget3\*(Aq} = \*(Aq500 200\*(Aq +.Ve +.ie n .IP """cfgcheck""" 4 +.el .IP "\f(CWcfgcheck\fR" 4 +.IX Item "cfgcheck" +\&\f(CW\*(C`cfgcheck(\e@target_names, \e%globalcfg, \e%targetcfg, \e@parsed_targets)\*(C'\fR +.Sp +Checks the configuration read by \f(CW\*(C`readcfg\*(C'\fR. Checks the values in the config +for syntactical and/or semantical errors. Sets defaults for some options. +Parses the \*(L"target[...]\*(R" options and filles the array \f(CW@parsed_targets\fR ready +for mrtg functions. +.Sp +The first three arguments are the same as for \f(CW\*(C`readcfg\*(C'\fR. The fourth argument +is an arrayref which will be filled with the parsed target defs. +.Sp +\&\f(CW\*(C`cfgcheck\*(C'\fR converts the values of target settings \fIoptions\fR, e.g. +.Sp +.Vb 1 +\& options[router1]: bits, growright +.Ve +.Sp +to a hash: +.Sp +.Vb 2 +\& $targetcfg{\*(Aqoption\*(Aq}{\*(Aqbits\*(Aq}{\*(Aqrouter1\*(Aq} = 1 +\& $targetcfg{\*(Aqoption\*(Aq}{\*(Aqgrowright\*(Aq}{\*(Aqrouter1\*(Aq} = 1 +.Ve +.Sp +This is not done by \f(CW\*(C`readcfg\*(C'\fR so if you don't use \f(CW\*(C`cfgcheck\*(C'\fR you have to +check the scalar variable \fI\f(CI$targetcfg\fI{'option'}{'router1'}\fR (\s-1MRTG\s0 allows +options to be separated by space or ','). +.ie n .IP """ensureSL""" 4 +.el .IP "\f(CWensureSL\fR" 4 +.IX Item "ensureSL" +\&\f(CW\*(C`ensureSL(\e$pathname)\*(C'\fR +.Sp +Checks that the \fIpathname\fR does not contain double path separators and ends +with a path separator. It uses \f(CW$MRTG_lib::SL\fR as path separator which will be / +or \e depending on the \s-1OS.\s0 +.ie n .IP """log2rrd""" 4 +.el .IP "\f(CWlog2rrd\fR" 4 +.IX Item "log2rrd" +\&\f(CW\*(C`log2rrd ($router,\e%globalcfg,\e%targetcfg)\*(C'\fR +.Sp +Convert log file to rrd format. Needs rrdtool. +.ie n .IP """datestr""" 4 +.el .IP "\f(CWdatestr\fR" 4 +.IX Item "datestr" +\&\f(CW\*(C`datestr(time)\*(C'\fR +.Sp +Returns the time given in the argument as a nicely formated date string. +The argument has to be in \s-1UNIX\s0 time format (seconds since 1970\-1\-1). +.ie n .IP """timestamp""" 4 +.el .IP "\f(CWtimestamp\fR" 4 +.IX Item "timestamp" +\&\f(CW\*(C`timestamp()\*(C'\fR +.Sp +Return a string representing the current time. +.ie n .IP """setup_loghandlers""" 4 +.el .IP "\f(CWsetup_loghandlers\fR" 4 +.IX Item "setup_loghandlers" +\&\f(CW\*(C`setup_loghandlers(filename)\*(C'\fR +.Sp +Install signalhandlers for _\|_DIE_\|_ and _\|_WARN_\|_ making the errors +go the the specified destination. If filename is 'eventlog' +mrtg will log to the windows event logger. +.ie n .IP """expistr""" 4 +.el .IP "\f(CWexpistr\fR" 4 +.IX Item "expistr" +\&\f(CW\*(C`expistr(time)\*(C'\fR +.Sp +Returns the time given in the argument formatted suitable for \s-1HTTP\s0 +Expire-Headers. +.ie n .IP """create_pid""" 4 +.el .IP "\f(CWcreate_pid\fR" 4 +.IX Item "create_pid" +\&\f(CW\*(C`create_pid()\*(C'\fR +.Sp +Creates a pid file for the mrtg daemon +.ie n .IP """demonize_me""" 4 +.el .IP "\f(CWdemonize_me\fR" 4 +.IX Item "demonize_me" +\&\f(CW\*(C`demonize_me()\*(C'\fR +.Sp +Puts the running program into background, detaching it from the terminal. +.ie n .IP """populatecache""" 4 +.el .IP "\f(CWpopulatecache\fR" 4 +.IX Item "populatecache" +\&\f(CW\*(C`populatecache(\e%confcache, $host, $reread, $snmpoptshash)\*(C'\fR +.Sp +Reads the \s-1SNMP\s0 variables \fIifDescr\fR, \fIipAdEntIfIndex\fR, \fIifPhysAddress\fR, \fIifName\fR from +the \fIhost\fR and stores the values in \fI\f(CI%confcache\fI\fR as follows: +.Sp +.Vb 5 +\& $confcache{$host}{\*(AqDescr\*(Aq}{ifDescr}{oid} = (ifDescr or \*(AqDup\*(Aq) +\& $confcache{$host}{\*(AqIP\*(Aq}{ipAdEntIfIndex}{oid} = (ipAdEntIfIndex or \*(AqDup\*(Aq) +\& $confcache{$host}{\*(AqEth\*(Aq}{ifPhysAddress}{oid} = (ifPhysAddress or \*(AqDup\*(Aq) +\& $confcache{$host}{\*(AqName\*(Aq}{ifName}{oid} = (ifName or \*(AqDup\*(Aq) +\& $confcache{$host}{\*(AqType\*(Aq}{ifType}{oid} = (ifType or \*(AqDup\*(Aq) +.Ve +.Sp +The value (at the right side of =) is 'Dup' if a value was retrieved +muliple times, the retrieved value else. +.ie n .IP """readconfcache""" 4 +.el .IP "\f(CWreadconfcache\fR" 4 +.IX Item "readconfcache" +\&\f(CW\*(C`my $confcache = readconfcache($file)\*(C'\fR +.Sp +Preload the confcache from a file. +.ie n .IP """readfromconfcache""" 4 +.el .IP "\f(CWreadfromconfcache\fR" 4 +.IX Item "readfromconfcache" +\&\f(CW\*(C`writeconfcache($confcache,$file)\*(C'\fR +.Sp +Store the current confcache into a file. +.ie n .IP """writeconfcache""" 4 +.el .IP "\f(CWwriteconfcache\fR" 4 +.IX Item "writeconfcache" +\&\f(CW\*(C`writeconfcache($confcache,$file)\*(C'\fR +.Sp +Store the current confcache into a file. +.ie n .IP """storeincache""" 4 +.el .IP "\f(CWstoreincache\fR" 4 +.IX Item "storeincache" +\&\f(CW\*(C`storeincache($confcache,$host,$method,$key,$value)\*(C'\fR +.ie n .IP """readfromcache""" 4 +.el .IP "\f(CWreadfromcache\fR" 4 +.IX Item "readfromcache" +\&\f(CW\*(C`readfromcache($confcache,$host,$method,$key)\*(C'\fR +.ie n .IP """clearfromcache""" 4 +.el .IP "\f(CWclearfromcache\fR" 4 +.IX Item "clearfromcache" +\&\f(CW\*(C`clearfromcache($confcache,$host)\*(C'\fR +.ie n .IP """debug""" 4 +.el .IP "\f(CWdebug\fR" 4 +.IX Item "debug" +\&\f(CW\*(C`debug($type, $message)\*(C'\fR +.Sp +Prints the \fImessage\fR on \s-1STDERR\s0 if debugging is enabled for type \fItype\fR. +A debug type is enabled if \fItype\fR is in array \f(CW@main::DEBUG\fR. +.SH "AUTHORS" +.IX Header "AUTHORS" +Rainer Bawidamann <Rainer.Bawidamann@rz.uni\-ulm.de> +.PP +(This Manpage) diff --git a/src/doc/mrtglib.pod b/doc/mrtglib.pod index 62d664f..62d664f 120000 --- a/src/doc/mrtglib.pod +++ b/doc/mrtglib.pod diff --git a/doc/mrtglib.txt b/doc/mrtglib.txt new file mode 100644 index 0000000..dea2fb4 --- /dev/null +++ b/doc/mrtglib.txt @@ -0,0 +1,222 @@ +MRTGLIB(1) mrtg MRTGLIB(1) + + + +NNAAMMEE + MRTG_lib.pm - Library for MRTG and support scripts + +SSYYNNOOPPSSIISS + use MRTG_lib; + my ($configfile, @target_names, %globalcfg, %targetcfg); + readcfg($configfile, \@target_names, \%globalcfg, \%targetcfg); + my (@parsed_targets); + cfgcheck(\@target_names, \%globalcfg, \%targetcfg, \@parsed_targets); + +DDEESSCCRRIIPPTTIIOONN + MRTG_lib is part of MRTG, the Multi Router Traffic Grapher. It was + separated from MRTG to allow other programs to easily use the same + config files. The main part of MRTG_lib is the config file parser but + some other funcions are there too. + + $MRTG_lib::OS + Type of OS: WIN, UNIX, VMS + + $MRTG_lib::SL + _S_l_a_s_h in the current OS. + + $MRTG_lib::PS + Path separator in PATH variable + + "readcfg" + "readcfg($file, \@targets, \%globalcfg, \%targetcfg [, $prefix, + \%extrules])" + + Reads a config file, parses it and fills some arrays and hashes. + The mandatory arguments are: the name of the config file, a ref to + an array which will be filled with a list of the target names, a + hashref for the global configuration, a hashref for the target + configuration. + + The configuration file syntax is: + + globaloption: value + targetoption[targetname]: value + aprefix*extglobal: value + aprefix*exttarget[target2]: value + + E.g. + + workdir: /var/stat/mrtg + target[router1]: 2:public@router1.local.net + 14all*columns: 2 + + The global config hash has the structure + + $globalcfg{configoption} = 'value' + + The target config hash has the structure + + $targetcfg{configoption}{targetname} = 'value' + + See mrtg-reference for more information about the MRTG + configuration syntax. + + "readcfg" can take two additional arguments to extend the config + file syntax. This allows programs to put their configuration into + the mrtg config file. The fifth argument is the prefix of the + extension, the sixth argument is a hash with the checkrules for + these extension settings. E.g. if the prefix is "14all" "readcfg" + will check config lines that begin with "14all*", i.e. all lines + like + + 14all*columns: 2 + 14all*graphsize[target3]: 500 200 + + against the rules in %extrules. The format of this hash is: + + $extrules{option} = [sub{$_[0] =~ m/^\d+$/}, sub{"Error message for $_[0]"}] + i.e. + $extrules{option}[0] -> a test expression + $extrules{option}[1] -> error message if test fails + + The first part of the array is a perl expression to test the value + of the option. The test can access this value in the variable + "$arg". The second part of the array is an error message to display + when the test fails. The failed value can be integrated by using + the variable "$arg". + + Config settings with an different prefix than the one given in the + "readcfg" call are not checked but inserted into _%_g_l_o_b_a_l_c_f_g and + _%_t_a_r_g_e_t_c_f_g. Prefixed settings keep their prefix in the config + hashes: + + $targetcfg{'14all*graphsize'}{'target3'} = '500 200' + + "cfgcheck" + "cfgcheck(\@target_names, \%globalcfg, \%targetcfg, + \@parsed_targets)" + + Checks the configuration read by "readcfg". Checks the values in + the config for syntactical and/or semantical errors. Sets defaults + for some options. Parses the "target[...]" options and filles the + array @parsed_targets ready for mrtg functions. + + The first three arguments are the same as for "readcfg". The fourth + argument is an arrayref which will be filled with the parsed target + defs. + + "cfgcheck" converts the values of target settings _o_p_t_i_o_n_s, e.g. + + options[router1]: bits, growright + + to a hash: + + $targetcfg{'option'}{'bits'}{'router1'} = 1 + $targetcfg{'option'}{'growright'}{'router1'} = 1 + + This is not done by "readcfg" so if you don't use "cfgcheck" you + have to check the scalar variable _$_t_a_r_g_e_t_c_f_g_{_'_o_p_t_i_o_n_'_}_{_'_r_o_u_t_e_r_1_'_} + (MRTG allows options to be separated by space or ','). + + "ensureSL" + "ensureSL(\$pathname)" + + Checks that the _p_a_t_h_n_a_m_e does not contain double path separators + and ends with a path separator. It uses $MRTG_lib::SL as path + separator which will be / or \ depending on the OS. + + "log2rrd" + "log2rrd ($router,\%globalcfg,\%targetcfg)" + + Convert log file to rrd format. Needs rrdtool. + + "datestr" + "datestr(time)" + + Returns the time given in the argument as a nicely formated date + string. The argument has to be in UNIX time format (seconds since + 1970-1-1). + + "timestamp" + "timestamp()" + + Return a string representing the current time. + + "setup_loghandlers" + "setup_loghandlers(filename)" + + Install signalhandlers for __DIE__ and __WARN__ making the errors + go the the specified destination. If filename is 'eventlog' mrtg + will log to the windows event logger. + + "expistr" + "expistr(time)" + + Returns the time given in the argument formatted suitable for HTTP + Expire-Headers. + + "create_pid" + "create_pid()" + + Creates a pid file for the mrtg daemon + + "demonize_me" + "demonize_me()" + + Puts the running program into background, detaching it from the + terminal. + + "populatecache" + "populatecache(\%confcache, $host, $reread, $snmpoptshash)" + + Reads the SNMP variables _i_f_D_e_s_c_r, _i_p_A_d_E_n_t_I_f_I_n_d_e_x, _i_f_P_h_y_s_A_d_d_r_e_s_s, + _i_f_N_a_m_e from the _h_o_s_t and stores the values in _%_c_o_n_f_c_a_c_h_e as + follows: + + $confcache{$host}{'Descr'}{ifDescr}{oid} = (ifDescr or 'Dup') + $confcache{$host}{'IP'}{ipAdEntIfIndex}{oid} = (ipAdEntIfIndex or 'Dup') + $confcache{$host}{'Eth'}{ifPhysAddress}{oid} = (ifPhysAddress or 'Dup') + $confcache{$host}{'Name'}{ifName}{oid} = (ifName or 'Dup') + $confcache{$host}{'Type'}{ifType}{oid} = (ifType or 'Dup') + + The value (at the right side of =) is 'Dup' if a value was + retrieved muliple times, the retrieved value else. + + "readconfcache" + "my $confcache = readconfcache($file)" + + Preload the confcache from a file. + + "readfromconfcache" + "writeconfcache($confcache,$file)" + + Store the current confcache into a file. + + "writeconfcache" + "writeconfcache($confcache,$file)" + + Store the current confcache into a file. + + "storeincache" + "storeincache($confcache,$host,$method,$key,$value)" + + "readfromcache" + "readfromcache($confcache,$host,$method,$key)" + + "clearfromcache" + "clearfromcache($confcache,$host)" + + "debug" + "debug($type, $message)" + + Prints the _m_e_s_s_a_g_e on STDERR if debugging is enabled for type _t_y_p_e. + A debug type is enabled if _t_y_p_e is in array @main::DEBUG. + +AAUUTTHHOORRSS + Rainer Bawidamann <Rainer.Bawidamann@rz.uni-ulm.de> + + (This Manpage) + + + +2.17.7 2018-07-13 MRTGLIB(1) diff --git a/docs/hello b/docs/hello deleted file mode 100644 index e69de29..0000000 --- a/docs/hello +++ /dev/null diff --git a/src/get_ver.awk b/get_ver.awk index 5225a59..5225a59 100644 --- a/src/get_ver.awk +++ b/get_ver.awk diff --git a/src/images/favicon.ico b/images/favicon.ico Binary files differindex e3b575a..e3b575a 100644 --- a/src/images/favicon.ico +++ b/images/favicon.ico diff --git a/src/images/mrtg-l.gif b/images/mrtg-l.gif Binary files differindex 11eb3d7..11eb3d7 100644 --- a/src/images/mrtg-l.gif +++ b/images/mrtg-l.gif diff --git a/src/images/mrtg-l.png b/images/mrtg-l.png Binary files differindex 0730c9a..0730c9a 100644 --- a/src/images/mrtg-l.png +++ b/images/mrtg-l.png diff --git a/src/images/mrtg-m.gif b/images/mrtg-m.gif Binary files differindex ec4ee9a..ec4ee9a 100644 --- a/src/images/mrtg-m.gif +++ b/images/mrtg-m.gif diff --git a/src/images/mrtg-m.png b/images/mrtg-m.png Binary files differindex 743e495..743e495 100644 --- a/src/images/mrtg-m.png +++ b/images/mrtg-m.png diff --git a/src/images/mrtg-r.gif b/images/mrtg-r.gif Binary files differindex cc19bd6..cc19bd6 100644 --- a/src/images/mrtg-r.gif +++ b/images/mrtg-r.gif diff --git a/src/images/mrtg-r.png b/images/mrtg-r.png Binary files differindex a753c6a..a753c6a 100644 --- a/src/images/mrtg-r.png +++ b/images/mrtg-r.png diff --git a/src/images/mrtg-ti.gif b/images/mrtg-ti.gif Binary files differindex b5fdea1..b5fdea1 100644 --- a/src/images/mrtg-ti.gif +++ b/images/mrtg-ti.gif diff --git a/src/images/mrtg-ti.png b/images/mrtg-ti.png Binary files differindex 0031314..0031314 100644 --- a/src/images/mrtg-ti.png +++ b/images/mrtg-ti.png diff --git a/src/install-sh b/install-sh index e9de238..e9de238 100755 --- a/src/install-sh +++ b/install-sh diff --git a/src/lib/mrtg2/BER.pm b/lib/mrtg2/BER.pm index 739b48d..739b48d 100644 --- a/src/lib/mrtg2/BER.pm +++ b/lib/mrtg2/BER.pm diff --git a/src/lib/mrtg2/MRTG_lib.pm b/lib/mrtg2/MRTG_lib.pm index ff3d7e1..ff3d7e1 100644 --- a/src/lib/mrtg2/MRTG_lib.pm +++ b/lib/mrtg2/MRTG_lib.pm diff --git a/src/lib/mrtg2/Net_SNMP_util.pm b/lib/mrtg2/Net_SNMP_util.pm index b0299fc..b0299fc 100644 --- a/src/lib/mrtg2/Net_SNMP_util.pm +++ b/lib/mrtg2/Net_SNMP_util.pm diff --git a/src/lib/mrtg2/Pod/InputObjects.pm b/lib/mrtg2/Pod/InputObjects.pm index 13a8618..13a8618 100644 --- a/src/lib/mrtg2/Pod/InputObjects.pm +++ b/lib/mrtg2/Pod/InputObjects.pm diff --git a/src/lib/mrtg2/Pod/Parser.pm b/lib/mrtg2/Pod/Parser.pm index c807f3f..c807f3f 100644 --- a/src/lib/mrtg2/Pod/Parser.pm +++ b/lib/mrtg2/Pod/Parser.pm diff --git a/src/lib/mrtg2/Pod/PlainText.pm b/lib/mrtg2/Pod/PlainText.pm index 0dce179..0dce179 100644 --- a/src/lib/mrtg2/Pod/PlainText.pm +++ b/lib/mrtg2/Pod/PlainText.pm diff --git a/src/lib/mrtg2/Pod/Select.pm b/lib/mrtg2/Pod/Select.pm index 4724cb7..4724cb7 100644 --- a/src/lib/mrtg2/Pod/Select.pm +++ b/lib/mrtg2/Pod/Select.pm diff --git a/src/lib/mrtg2/Pod/Usage.pm b/lib/mrtg2/Pod/Usage.pm index f463fb9..f463fb9 100644 --- a/src/lib/mrtg2/Pod/Usage.pm +++ b/lib/mrtg2/Pod/Usage.pm diff --git a/src/lib/mrtg2/SNMP_Session.pm b/lib/mrtg2/SNMP_Session.pm index 84b3af3..84b3af3 100644 --- a/src/lib/mrtg2/SNMP_Session.pm +++ b/lib/mrtg2/SNMP_Session.pm diff --git a/src/lib/mrtg2/SNMP_util.pm b/lib/mrtg2/SNMP_util.pm index 7ce96a6..7ce96a6 100644 --- a/src/lib/mrtg2/SNMP_util.pm +++ b/lib/mrtg2/SNMP_util.pm diff --git a/src/lib/mrtg2/locales_mrtg.pm b/lib/mrtg2/locales_mrtg.pm index 7b2477f..7b2477f 100644 --- a/src/lib/mrtg2/locales_mrtg.pm +++ b/lib/mrtg2/locales_mrtg.pm diff --git a/src/mkinstalldirs b/mkinstalldirs index 5b1f408..5b1f408 100755 --- a/src/mkinstalldirs +++ b/mkinstalldirs diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index e4979ce..0000000 --- a/src/.gitignore +++ /dev/null @@ -1 +0,0 @@ -libs-i386-mingw32msvc
\ No newline at end of file diff --git a/src/INSTALL b/src/INSTALL deleted file mode 100644 index 07e702b..0000000 --- a/src/INSTALL +++ /dev/null @@ -1 +0,0 @@ -read the readme.html ... diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 985c34f..0000000 --- a/src/Makefile +++ /dev/null @@ -1,137 +0,0 @@ -# things that the GNU standards document suggests all makefiles -# should have. -SHELL=/bin/sh -VER=2.17.7 -.SUFFIXES: -.SUFFIXES: .c .o .pl .pm .pod .man .1 .txt - -prefix = /opt/mrtg-2 -exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -mandir = ${prefix}/share/man -datadir = ${prefix}/share - -top_srcdir = . - -# Where is perl 5 on this machine -PERL = /usr/bin/perl -CC = gcc -CFLAGS = -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -Winline -W -DHAVE_CONFIG_H -CPPFLAGS = -LDFLAGS = -GDFORM_EXT = png -SET_LD_RUN_PATH = -LIBS = -lgd -lpng -lz -lm - -INSTALL = /usr/bin/install -c -MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs - -all: bin/rateup subst - -bin/rateup: bin/rateup.o - $(SET_LD_RUN_PATH) $(CC) bin/rateup.o -o bin/rateup $(LDFLAGS) $(LIBS) - - -bin/rateup.o: $(top_srcdir)/src/rateup.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c $(top_srcdir)/src/rateup.c -o bin/rateup.o - -subst: - $(PERL) -0777 -p -i~ -e "s'^#!\s*/\S*perl'#! $(PERL)'" $(top_srcdir)/bin/cfgmaker $(top_srcdir)/bin/indexmaker $(top_srcdir)/bin/mrtg - $(PERL) -0777 -p -i~ -e 's@GRAPHFMT="...";@GRAPHFMT="$(GDFORM_EXT)";@' $(top_srcdir)/bin/mrtg $(top_srcdir)/bin/indexmaker - -clean: - -rm -f bin/rateup - -rm -f config.cache - -rm -f bin/rateup.o - -install: all - $(MKINSTALLDIRS) $(DESTDIR)$(bindir) - for x in $(top_srcdir)/bin/mrtg $(top_srcdir)/bin/cfgmaker $(top_srcdir)/bin/indexmaker $(top_srcdir)/bin/mrtg-traffic-sum; do \ - $(INSTALL) -m 755 $$x $(DESTDIR)$(bindir); done - for x in bin/rateup; do \ - $(INSTALL) -m 755 $$x $(DESTDIR)$(bindir); done - $(MKINSTALLDIRS) $(DESTDIR)$(libdir)/mrtg2/Pod - for x in $(top_srcdir)/lib/mrtg2/*.pm; do \ - $(INSTALL) -m 644 $$x $(DESTDIR)$(libdir)/mrtg2; done - for x in $(top_srcdir)/lib/mrtg2/Pod/*.pm; do \ - $(INSTALL) -m 644 $$x $(DESTDIR)$(libdir)/mrtg2/Pod; done - $(MKINSTALLDIRS) $(DESTDIR)$(datadir)/mrtg2/icons - for x in $(top_srcdir)/images/*.gif $(top_srcdir)/images/*.png; do \ - $(INSTALL) -m 644 $$x $(DESTDIR)$(datadir)/mrtg2/icons; done - $(MKINSTALLDIRS) $(DESTDIR)$(datadir)/doc/mrtg2 - (cd $(top_srcdir); for x in COPYING COPYRIGHT README CHANGES THANKS doc/*; do \ - $(INSTALL) -m 644 $$x $(DESTDIR)$(datadir)/doc/mrtg2; done) - $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 - for x in $(top_srcdir)/doc/*.1; do \ - $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man1; done - -########### Distribution Tools - -### -### Things you might NOT want to play with ... -### - -ARCHIVE = mrtg-$(VER) -DIRNAME = mrtg-$(VER) - -POD = doc/mrtg-faq.pod doc/mrtg-logfile.pod doc/mrtg-nt-guide.pod doc/mrtg-nw-guide.pod \ - doc/mrtg-unix-guide.pod \ - doc/mrtg-forum.pod doc/mrtg-mibhelp.pod doc/mrtg-reference.pod doc/mrtg-webserver.pod \ - doc/mrtg-rrd.pod doc/mrtg-squid.pod doc/mrtg.pod doc/mrtg-contrib.pod \ - doc/cfgmaker.pod doc/indexmaker.pod doc/mrtglib.pod doc/mrtg-ipv6.pod doc/mrtg-traffic-sum.pod - -MAN = $(POD:.pod=.1) -TXT = $(POD:.pod=.txt) - -getpod: - -rm $(MAN) $(TXT) - -for x in cfgmaker indexmaker mrtg-mailer mrtg-traffic-sum; do \ - rm doc/$$x.pod; ln -s ../bin/$$x doc/$$x.pod; done - -rm doc/mrtglib.pod;ln -s ../lib/mrtg2/MRTG_lib.pm doc/mrtglib.pod - -.pod.1: - pod2man --release=$(VER) --center=mrtg $< > $@ - -.1.txt: - /usr/bin/groff -man -Tascii $< > $@ - -man: $(MAN) - -txt: $(TXT) - -versync: - $(PERL) -i -p -e 's|VERSION\s*=\s*"\d+\.\d+\.\d+([a-z0-9]+)?"|VERSION = "$(VER)"|gi; s|mrtg-\d+\.\d+\.\d+([a-z0-9]+)?|mrtg-$(VER)|gi; s|MRTG\s\d+\.\d+\.\d+([a-z0-9]+)?|MRTG $(VER)|gi' bin/mrtg bin/cfgmaker bin/indexmaker lib/mrtg2/*.pm src/*.c `find doc/ -name \*.pod -type f` - cd translate && $(PERL) mergelocale.pl skeleton.pm0 *.pmd && cp locales_mrtg.pm ../lib/mrtg2 - -doc: getpod versync man txt - -rateupexe: - i386-mingw32msvc-gcc -Wall -Wno-format -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -O3 -mwindows -Ilibs-i386-mingw32msvc/zlib -Ilibs-i386-mingw32msvc/libpng -Ilibs-i386-mingw32msvc/gd -c src/strftime.c -o src/strftime.o - i386-mingw32msvc-gcc -Wall -Wno-format -Wpointer-arith -Wcast-align -Wmissing-declarations -Wnested-externs -O3 -mwindows -Ilibs-i386-mingw32msvc/zlib -Ilibs-i386-mingw32msvc/libpng -Ilibs-i386-mingw32msvc/gd -c src/rateup.c -o src/rateup.o -Dstrftime=strftime_ - i386-mingw32msvc-gcc -Llibs-i386-mingw32msvc/zlib -Llibs-i386-mingw32msvc/libpng -Llibs-i386-mingw32msvc/gd src/rateup.o src/strftime.o -o bin/rateup.exe -lgd -lpng -lz - i386-mingw32msvc-strip bin/rateup.exe - -tar: doc rateupexe - autoconf - gchmod -R u=rwX,go=rX . - (cd .. ; ln -s src $(DIRNAME)) - (cd .. ; sed -e "s/^/$(DIRNAME)\//" $(DIRNAME)/MANIFEST | tar -czv --files-from=- -f $(DIRNAME)/$(ARCHIVE).tar.gz --exclude='*~' --exclude="*.rej" --exclude="*.orig" --exclude=".svn") - $(PERL) -0777 -pi -e 's@GRAPHFMT="...";@GRAPHFMT="png";@' bin/mrtg bin/indexmaker - # build rateup for windows ... - (cd .. ; touch $(DIRNAME)/contrib/a~;sed -e "s/^/$(DIRNAME)\//" $(DIRNAME)/MANIFEST | xargs zip -r $(DIRNAME)/$(ARCHIVE).zip; zip $(DIRNAME)/$(ARCHIVE).zip $(DIRNAME)/bin/rateup.exe $(DIRNAME)/bin/rateup.nlm $(DIRNAME)/bin/rateup.nlm; zip -d $(DIRNAME)/$(ARCHIVE).zip '*~' '*.svn*') - -rm ../$(DIRNAME) - -dist: tar - git commit -m 'released version $(VER)' -a - git tag v$(VER) - git push --tags - md5sum $(ARCHIVE).tar.gz >$(ARCHIVE).tar.gz.md5 - gpg -s $(ARCHIVE).tar.gz.md5 - chmod 644 $(ARCHIVE).tar.gz.md5* - scp CHANGES $(ARCHIVE).* oposs@freddie:public_html/mrtg/pub/ - ssh oposs@freddie "cd public_html/mrtg/pub; rm mrtg.tar.gz;ln -s $(ARCHIVE).tar.gz mrtg.tar.gz" - -betadist: tar - mv $(ARCHIVE).* ${HOME}/public_html/webtools/mrtg/pub/beta - cp CHANGES ${HOME}/public_html/webtools/mrtg/pub/beta diff --git a/src/bin/cammer b/src/bin/cammer deleted file mode 100755 index 93f8543..0000000 --- a/src/bin/cammer +++ /dev/null @@ -1,323 +0,0 @@ -#! /usr/bin/perl -# -*- mode: Perl -*- -################################################################## -# Cammer 2.1 -################################################################## -# Created by Tobi Oetiker <tobi@oetiker.ch> -################################################################## -# $Id$ - -require 5.005; -use strict; -my $DEBUG = 0; - -use FindBin; -use lib "${FindBin::Bin}"; -use lib "${FindBin::Bin}/../lib/mrtg2"; - -use SNMP_Session "0.78"; -use BER "0.77"; -use SNMP_util "0.77"; -use Getopt::Long; -use Pod::Usage; -use Socket; - - -my %OID = (vlanIndex => [1,3,6,1,4,1,9,5,1,9,2,1,1], - vmVlan => [1,3,6,1,4,1,9,9,68,1,2,2,1,2], - dot1dTpFdbPort => [1,3,6,1,2,1,17,4,3,1,2], - dot1dTpFdbAddress => [1,3,6,1,2,1,17,4,3,1,1], - dot1dBasePortIfIndex => [1,3,6,1,2,1,17,1,4,1,2], - newMac2PortIfIndex => [1,3,6,1,2,1,17,7,1,2,2,1,2,1], - sysObjectID => [1,3,6,1,2,1,1,2,0], - CiscolocIfDescr => [1,3,6,1,4,1,9,2,2,1,1,28], - ifAlias => [1,3,6,1,2,1,31,1,1,1,18], - ifName => [1,3,6,1,2,1,31,1,1,1,1], - ipNetToMediaPhysAddress => [1,3,6,1,2,1,4,22,1,2], - ); - - -# Add the Cisco model number as displayed by the sysDescr.0 OID: -# $ snmpget -v 1 -c public <IP|hostname> sysDescr.0 -# -# or by using your favorite SNMP MIB browser -my $CiscoCatIOS = "2900|3500|2950|2960|3550|4000 L3"; - -sub main { - my %opt; - options(\%opt); - $DEBUG=1 if $opt{verbose}; - # which vlans do exist on the device - my @vlans; - my $vlani; - my %vlan; - my $sws = SNMPv2c_Session->open ($opt{sw},$opt{swco},161) - || die "Opening SNMP_Session\n"; - - - warn "* Query sysDescr to identify Switch\n"; - my $sysdesc = (snmpget($opt{swco}.'@'.$opt{sw},'sysDescr'))[0]; - my $mode = 'vlan'; - - if ($sysdesc =~ /$CiscoCatIOS/){ - warn "* Query VLAN list with vmVlan (Cisco Style)\n"; - $sws->map_table_4 ( [$OID{'vmVlan'}], - sub { my($x,$value) = pretty(@_); - $vlan{$x} = $value; # catalyst 2900 - print "if: $x, vlan: $value\n" if $DEBUG; - if (not scalar grep {$_ eq $value} @vlans) { - push @vlans, $value; - print "vlan: $value\n" if $DEBUG; - } - } - ,100); - } else { - warn "* Query VLAN list with vlanIndex\n"; - $sws->map_table_4 ([$OID{'vlanIndex'}], - sub { - my($x,$value) = pretty(@_); - push @vlans, $value; - print "vlan: $value\n" if $DEBUG; - } - ,100 ); - } - - if (scalar @vlans == 0){ - warn "* No VLANs were found, switching to normal mode\n"; - $mode = 'normal'; - push @vlans, ''; - } - - # which ifNames - my %name; - warn "* Gather Interface Name Table with ifName\n"; - $sws->map_table_4 ([$OID{'ifName'}], - sub { my($if,$name) = pretty(@_); - print "if: $if, name: $name\n" if $DEBUG; - $name{$if}=$name; - } - ,100); - $sws->close(); - - my %ip; - my %dhcp_host; - - if (open my $arp, "arp -a|"){ - warn "* Calling arp command to gather local arp table\n"; - while (<$arp>){ - chomp; - #gumpu.oetiker.ch (192.168.0.157) at 00:0C:29:11:3F:92 [ether] on lan - /\((\S+?)\)\sat\s(00:\S+)/ or next; - my $ip = $1; - my $mac = lc($2); - push @{$ip{$mac}}, $ip; - print "ip: $ip, mac: $mac\n" if $DEBUG; - } - close $arp; - } - if (open my $dhcp, "</var/lib/dhcp3/dhcpd.leases"){ - my $ip; - my $mac; - my $name; - while (<$dhcp>){ - /lease\s(\S+)\s\{/ and do { - $ip = $1; - $mac = undef; - $name = undef; - next; - }; - /client-hostname\s"(\S+?)";/ and $name = $1; - /hardware\sethernet\s(\S+?);/ and $mac = lc($1); - /^\}/ and do { - push @{$ip{$mac}}, $ip if $ip; - $dhcp_host{$mac} = $name if $name; - } - } - } - - warn "* Calling arp command to gather local arp table\n"; - open my $arp, "arp -a|" or die $!; - while (<$arp>){ - chomp; - #gumpu.oetiker.ch (192.168.0.157) at 00:0C:29:11:3F:92 [ether] on lan - /\((\S+?)\)\sat\s(00:\S+)/ or next; - my $ip = $1; - my $mac = lc($2); - push @{$ip{$mac}}, $ip; - print "ip: $ip, mac: $mac\n" if $DEBUG; - } - - - if ($opt{ro}){ - # get mac to ip from router - warn "* Gather Arp Table from $opt{roco}\@$opt{ro} with ipNetToMediaPhysAddress\n"; - my $ros = SNMPv2c_Session->open ($opt{ro},$opt{roco},161) - || die "Opening SNMP_Session\n"; - - $ros->map_table_4 ([$OID{'ipNetToMediaPhysAddress'}], - sub { - my($ip,$mac) = pretty(@_); - $mac = unpack 'H*', pack 'a*',$mac; - $mac =~ s/../$&:/g; - $mac =~ s/.$//; - $ip =~ s/^.+?\.//; - push @{$ip{$mac}}, $ip; - print "ip: $ip, mac: $mac\n" if $DEBUG; - } - ,100); - $ros->close(); - } - # walk CAM table for each VLAN - my %if; - my %port; - foreach my $vlan (@vlans){ - # catalist 2900 does not use com@vlan hack - $vlan = '@'.$vlan if $vlan; - warn "* Connecting to $opt{swco}$vlan\@$opt{sw}\n"; - my $sws = SNMPv2c_Session->open ($opt{sw},$opt{swco}.$vlan,161) - || die "Opening SNMP_Session\n"; - warn "* Reading mac2port assignement from newMac2PortIfIndex table\n"; - $sws->map_table_4 ([$OID{newMac2PortIfIndex}], - sub { - my($mac,$port) = pretty(@_); - next if $port == 0; - $mac = sprintf "%02x:%02x:%02x:%02x:%02x:%02x", (split /\./, $mac); - print "mac: $mac,port: $port\n" if $DEBUG; - $port{$vlan}{$mac}=$port; - } - ); - warn "* Reading mac2port assignement from dot1dTpFdbPort table\n"; - $sws->map_table_4 ([$OID{dot1dTpFdbPort}], - sub { - my($mac,$port) = pretty(@_); - next if $port == 0; - $mac = sprintf "%02x:%02x:%02x:%02x:%02x:%02x", (split /\./, $mac); - print "mac: $mac,port: $port\n" if $DEBUG; - $port{$vlan}{$mac}=$port; - } - ,100); - warn "* Reading port2if assignement from dot1dBasePortIfIndex table\n"; - $sws->map_table_4 ( [$OID{'dot1dBasePortIfIndex'}], - sub { my($port,$if) = pretty(@_); - next if $port == 0; - print "port: $port, if: $if\n" if $DEBUG; - $if{$vlan}{$port} = $if; - } - ,100); - $sws->close(); - } - my %output; - foreach my $vlan (@vlans){ - foreach my $mac (keys %{$port{$vlan}}){ - my @ip = $ip{$mac} ? @{$ip{$mac}} : (); - my @host; - foreach my $ip (@ip) { - my $host = gethostbyaddr(pack('C4',split(/\./,$ip)),AF_INET); - push @host, ($host or $ip); - } - my $name = $name{$if{$vlan}{$port{$vlan}{$mac}}}; - my $truevlan = $vlan eq 'none' ? $vlan{$if{$vlan}{$port{$vlan}{$mac}}} : $vlan; - my $quest = scalar @ip > 1 ? "(Multi If Host)":""; - push @{$output{$name}}, sprintf "%4s %-17s %-15s %s %s",$truevlan,$mac,$ip[0],$host[0],$dhcp_host{$mac}?"($dhcp_host{$mac})":''; - } - } - foreach my $name (sort { ($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0]} keys %output){ - my $tag = '>'; - foreach my $line (@{$output{$name}}) { - printf "$tag %-4s %s\n", $name , $line; - $tag = ' '; - } - } -} - -main; -exit 0; - - -sub options { - my $opt = shift; - GetOptions( $opt, - 'arp=s', - 'verbose', - 'help|?', - 'man') or pod2usage(2); - pod2usage(-exitstatus => 0, -verbose => 2) if $opt->{man}; - pod2usage(-verbose => 1) if $opt->{help} or scalar @ARGV != 1; - - $opt->{sw} = shift @ARGV; - - $opt->{sw} =~ /^(.+)@(.+?)$/; - $opt->{sw} = $2; - $opt->{swco} = $1; - - if ($opt->{arp} and $opt->{arp} =~ /^(.+)@(.+?)$/){ - $opt->{ro} = $2; - $opt->{roco} = $1; - } -} - -sub pretty(@){ - my $index = shift; - my @ret = ($index); - foreach my $x (@_){ - push @ret, pretty_print($x); - }; - return @ret; -} - -__END__ - -=head1 NAME - -cammer - list switch ports with associated IP-addresses - -=head1 SYNOPSIS - -cammer [--arp=comunity@router] [--verbose] community@switch - -=head1 DESCRIPTION - -B<Cammer> is a script which polls a switch is able to query a switch for its -ethernet to port asignements. If a source of ip2mac mappings is provided as -well, it will resolve the ethernet addresses too. - -Cammer will use the machines local arp cache as well as the the F</var/lib/dhcp3/dhcpd.leases> -file to resolve etherent addresses -If you have a router, the router might know a lot about mac2ip mapping. Use - - --arp=comunity@router - -to query the router for its arp table. - -We found that running something like - - nmap --host-timeout 2s -sP 192.168.0.0/24 - -(as user!) helps to populate the local arp cache. - -=head1 COPYRIGHT - -Copyright (c) 2000 ETH Zurich, All rights reserved. -Copyright (c) 2008 OETIKER+PARTNER AG - -=head1 LICENSE - -This script is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -=head1 AUTHOR - -Tobi Oetiker E<lt>tobi@oetiker.chE<gt> - -=cut diff --git a/src/bin/rateup.nlm b/src/bin/rateup.nlm Binary files differdeleted file mode 100644 index 6c9db98..0000000 --- a/src/bin/rateup.nlm +++ /dev/null diff --git a/src/doc/mrtg-mailer.pod b/src/doc/mrtg-mailer.pod deleted file mode 120000 index 16c3bde..0000000 --- a/src/doc/mrtg-mailer.pod +++ /dev/null @@ -1 +0,0 @@ -../bin/mrtg-mailer
\ No newline at end of file diff --git a/src/doc/mrtg-traffic-sum.pod b/src/doc/mrtg-traffic-sum.pod deleted file mode 120000 index abdede7..0000000 --- a/src/doc/mrtg-traffic-sum.pod +++ /dev/null @@ -1 +0,0 @@ -../bin/mrtg-traffic-sum
\ No newline at end of file diff --git a/src/lib/mrtg2/Pod/Checker.pm b/src/lib/mrtg2/Pod/Checker.pm deleted file mode 100644 index a230542..0000000 --- a/src/lib/mrtg2/Pod/Checker.pm +++ /dev/null @@ -1,1268 +0,0 @@ -############################################################################# -# Pod/Checker.pm -- check pod documents for syntax errors -# -# Copyright (C) 1994-2000 by Bradford Appleton. All rights reserved. -# This file is part of "PodParser". PodParser is free software; -# you can redistribute it and/or modify it under the same terms -# as Perl itself. -############################################################################# - -package Pod::Checker; -use strict; - -use vars qw($VERSION @ISA @EXPORT %VALID_COMMANDS %VALID_SEQUENCES); -$VERSION = '1.45'; ## Current version of this package -require 5.005; ## requires this Perl version or later - -use Pod::ParseUtils; ## for hyperlinks and lists - -=head1 NAME - -Pod::Checker, podchecker() - check pod documents for syntax errors - -=head1 SYNOPSIS - - use Pod::Checker; - - $syntax_okay = podchecker($filepath, $outputpath, %options); - - my $checker = new Pod::Checker %options; - $checker->parse_from_file($filepath, \*STDERR); - -=head1 OPTIONS/ARGUMENTS - -C<$filepath> is the input POD to read and C<$outputpath> is -where to write POD syntax error messages. Either argument may be a scalar -indicating a file-path, or else a reference to an open filehandle. -If unspecified, the input-file it defaults to C<\*STDIN>, and -the output-file defaults to C<\*STDERR>. - -=head2 podchecker() - -This function can take a hash of options: - -=over 4 - -=item B<-warnings> =E<gt> I<val> - -Turn warnings on/off. I<val> is usually 1 for on, but higher values -trigger additional warnings. See L<"Warnings">. - -=back - -=head1 DESCRIPTION - -B<podchecker> will perform syntax checking of Perl5 POD format documentation. - -Curious/ambitious users are welcome to propose additional features they wish -to see in B<Pod::Checker> and B<podchecker> and verify that the checks are -consistent with L<perlpod>. - -The following checks are currently performed: - -=over 4 - -=item * - -Unknown '=xxxx' commands, unknown 'XE<lt>...E<gt>' interior-sequences, -and unterminated interior sequences. - -=item * - -Check for proper balancing of C<=begin> and C<=end>. The contents of such -a block are generally ignored, i.e. no syntax checks are performed. - -=item * - -Check for proper nesting and balancing of C<=over>, C<=item> and C<=back>. - -=item * - -Check for same nested interior-sequences (e.g. -C<LE<lt>...LE<lt>...E<gt>...E<gt>>). - -=item * - -Check for malformed or non-existing entities C<EE<lt>...E<gt>>. - -=item * - -Check for correct syntax of hyperlinks C<LE<lt>...E<gt>>. See L<perlpod> -for details. - -=item * - -Check for unresolved document-internal links. This check may also reveal -misspelled links that seem to be internal links but should be links -to something else. - -=back - -=head1 DIAGNOSTICS - -=head2 Errors - -=over 4 - -=item * empty =headn - -A heading (C<=head1> or C<=head2>) without any text? That ain't no -heading! - -=item * =over on line I<N> without closing =back - -The C<=over> command does not have a corresponding C<=back> before the -next heading (C<=head1> or C<=head2>) or the end of the file. - -=item * =item without previous =over - -=item * =back without previous =over - -An C<=item> or C<=back> command has been found outside a -C<=over>/C<=back> block. - -=item * No argument for =begin - -A C<=begin> command was found that is not followed by the formatter -specification. - -=item * =end without =begin - -A standalone C<=end> command was found. - -=item * Nested =begin's - -There were at least two consecutive C<=begin> commands without -the corresponding C<=end>. Only one C<=begin> may be active at -a time. - -=item * =for without formatter specification - -There is no specification of the formatter after the C<=for> command. - -=item * unresolved internal link I<NAME> - -The given link to I<NAME> does not have a matching node in the current -POD. This also happened when a single word node name is not enclosed in -C<"">. - -=item * Unknown command "I<CMD>" - -An invalid POD command has been found. Valid are C<=head1>, C<=head2>, -C<=head3>, C<=head4>, C<=over>, C<=item>, C<=back>, C<=begin>, C<=end>, -C<=for>, C<=pod>, C<=cut> - -=item * Unknown interior-sequence "I<SEQ>" - -An invalid markup command has been encountered. Valid are: -C<BE<lt>E<gt>>, C<CE<lt>E<gt>>, C<EE<lt>E<gt>>, C<FE<lt>E<gt>>, -C<IE<lt>E<gt>>, C<LE<lt>E<gt>>, C<SE<lt>E<gt>>, C<XE<lt>E<gt>>, -C<ZE<lt>E<gt>> - -=item * nested commands I<CMD>E<lt>...I<CMD>E<lt>...E<gt>...E<gt> - -Two nested identical markup commands have been found. Generally this -does not make sense. - -=item * garbled entity I<STRING> - -The I<STRING> found cannot be interpreted as a character entity. - -=item * Entity number out of range - -An entity specified by number (dec, hex, oct) is out of range (1-255). - -=item * malformed link LE<lt>E<gt> - -The link found cannot be parsed because it does not conform to the -syntax described in L<perlpod>. - -=item * nonempty ZE<lt>E<gt> - -The C<ZE<lt>E<gt>> sequence is supposed to be empty. - -=item * empty XE<lt>E<gt> - -The index entry specified contains nothing but whitespace. - -=item * Spurious text after =pod / =cut - -The commands C<=pod> and C<=cut> do not take any arguments. - -=item * Spurious character(s) after =back - -The C<=back> command does not take any arguments. - -=back - -=head2 Warnings - -These may not necessarily cause trouble, but indicate mediocre style. - -=over 4 - -=item * multiple occurrence of link target I<name> - -The POD file has some C<=item> and/or C<=head> commands that have -the same text. Potential hyperlinks to such a text cannot be unique then. -This warning is printed only with warning level greater than one. - -=item * line containing nothing but whitespace in paragraph - -There is some whitespace on a seemingly empty line. POD is very sensitive -to such things, so this is flagged. B<vi> users switch on the B<list> -option to avoid this problem. - -=begin _disabled_ - -=item * file does not start with =head - -The file starts with a different POD directive than head. -This is most probably something you do not want. - -=end _disabled_ - -=item * previous =item has no contents - -There is a list C<=item> right above the flagged line that has no -text contents. You probably want to delete empty items. - -=item * preceding non-item paragraph(s) - -A list introduced by C<=over> starts with a text or verbatim paragraph, -but continues with C<=item>s. Move the non-item paragraph out of the -C<=over>/C<=back> block. - -=item * =item type mismatch (I<one> vs. I<two>) - -A list started with e.g. a bullet-like C<=item> and continued with a -numbered one. This is obviously inconsistent. For most translators the -type of the I<first> C<=item> determines the type of the list. - -=item * I<N> unescaped C<E<lt>E<gt>> in paragraph - -Angle brackets not written as C<E<lt>ltE<gt>> and C<E<lt>gtE<gt>> -can potentially cause errors as they could be misinterpreted as -markup commands. This is only printed when the -warnings level is -greater than 1. - -=item * Unknown entity - -A character entity was found that does not belong to the standard -ISO set or the POD specials C<verbar> and C<sol>. - -=item * No items in =over - -The list opened with C<=over> does not contain any items. - -=item * No argument for =item - -C<=item> without any parameters is deprecated. It should either be followed -by C<*> to indicate an unordered list, by a number (optionally followed -by a dot) to indicate an ordered (numbered) list or simple text for a -definition list. - -=item * empty section in previous paragraph - -The previous section (introduced by a C<=head> command) does not contain -any text. This usually indicates that something is missing. Note: A -C<=head1> followed immediately by C<=head2> does not trigger this warning. - -=item * Verbatim paragraph in NAME section - -The NAME section (C<=head1 NAME>) should consist of a single paragraph -with the script/module name, followed by a dash `-' and a very short -description of what the thing is good for. - -=item * =headI<n> without preceding higher level - -For example if there is a C<=head2> in the POD file prior to a -C<=head1>. - -=back - -=head2 Hyperlinks - -There are some warnings with respect to malformed hyperlinks: - -=over 4 - -=item * ignoring leading/trailing whitespace in link - -There is whitespace at the beginning or the end of the contents of -LE<lt>...E<gt>. - -=item * (section) in '$page' deprecated - -There is a section detected in the page name of LE<lt>...E<gt>, e.g. -C<LE<lt>passwd(2)E<gt>>. POD hyperlinks may point to POD documents only. -Please write C<CE<lt>passwd(2)E<gt>> instead. Some formatters are able -to expand this to appropriate code. For links to (builtin) functions, -please say C<LE<lt>perlfunc/mkdirE<gt>>, without (). - -=item * alternative text/node '%s' contains non-escaped | or / - -The characters C<|> and C</> are special in the LE<lt>...E<gt> context. -Although the hyperlink parser does its best to determine which "/" is -text and which is a delimiter in case of doubt, one ought to escape -these literal characters like this: - - / E<sol> - | E<verbar> - -=back - -=head1 RETURN VALUE - -B<podchecker> returns the number of POD syntax errors found or -1 if -there were no POD commands at all found in the file. - -=head1 EXAMPLES - -See L</SYNOPSIS> - -=head1 INTERFACE - -While checking, this module collects document properties, e.g. the nodes -for hyperlinks (C<=headX>, C<=item>) and index entries (C<XE<lt>E<gt>>). -POD translators can use this feature to syntax-check and get the nodes in -a first pass before actually starting to convert. This is expensive in terms -of execution time, but allows for very robust conversions. - -Since PodParser-1.24 the B<Pod::Checker> module uses only the B<poderror> -method to print errors and warnings. The summary output (e.g. -"Pod syntax OK") has been dropped from the module and has been included in -B<podchecker> (the script). This allows users of B<Pod::Checker> to -control completely the output behavior. Users of B<podchecker> (the script) -get the well-known behavior. - -=cut - -############################################################################# - -#use diagnostics; -use Carp qw(croak); -use Exporter; -use Pod::Parser; - -@ISA = qw(Pod::Parser); -@EXPORT = qw(&podchecker); - -my %VALID_COMMANDS = ( - 'pod' => 1, - 'cut' => 1, - 'head1' => 1, - 'head2' => 1, - 'head3' => 1, - 'head4' => 1, - 'over' => 1, - 'back' => 1, - 'item' => 1, - 'for' => 1, - 'begin' => 1, - 'end' => 1, - 'encoding' => 1, -); - -my %VALID_SEQUENCES = ( - 'I' => 1, - 'B' => 1, - 'S' => 1, - 'C' => 1, - 'L' => 1, - 'F' => 1, - 'X' => 1, - 'Z' => 1, - 'E' => 1, -); - -# stolen from HTML::Entities -my %ENTITIES = ( - # Some normal chars that have special meaning in SGML context - amp => '&', # ampersand -'gt' => '>', # greater than -'lt' => '<', # less than - quot => '"', # double quote - - # PUBLIC ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML - AElig => 'Æ', # capital AE diphthong (ligature) - Aacute => 'Á', # capital A, acute accent - Acirc => 'Â', # capital A, circumflex accent - Agrave => 'À', # capital A, grave accent - Aring => 'Å', # capital A, ring - Atilde => 'Ã', # capital A, tilde - Auml => 'Ä', # capital A, dieresis or umlaut mark - Ccedil => 'Ç', # capital C, cedilla - ETH => 'Ð', # capital Eth, Icelandic - Eacute => 'É', # capital E, acute accent - Ecirc => 'Ê', # capital E, circumflex accent - Egrave => 'È', # capital E, grave accent - Euml => 'Ë', # capital E, dieresis or umlaut mark - Iacute => 'Í', # capital I, acute accent - Icirc => 'Î', # capital I, circumflex accent - Igrave => 'Ì', # capital I, grave accent - Iuml => 'Ï', # capital I, dieresis or umlaut mark - Ntilde => 'Ñ', # capital N, tilde - Oacute => 'Ó', # capital O, acute accent - Ocirc => 'Ô', # capital O, circumflex accent - Ograve => 'Ò', # capital O, grave accent - Oslash => 'Ø', # capital O, slash - Otilde => 'Õ', # capital O, tilde - Ouml => 'Ö', # capital O, dieresis or umlaut mark - THORN => 'Þ', # capital THORN, Icelandic - Uacute => 'Ú', # capital U, acute accent - Ucirc => 'Û', # capital U, circumflex accent - Ugrave => 'Ù', # capital U, grave accent - Uuml => 'Ü', # capital U, dieresis or umlaut mark - Yacute => 'Ý', # capital Y, acute accent - aacute => 'á', # small a, acute accent - acirc => 'â', # small a, circumflex accent - aelig => 'æ', # small ae diphthong (ligature) - agrave => 'à', # small a, grave accent - aring => 'å', # small a, ring - atilde => 'ã', # small a, tilde - auml => 'ä', # small a, dieresis or umlaut mark - ccedil => 'ç', # small c, cedilla - eacute => 'é', # small e, acute accent - ecirc => 'ê', # small e, circumflex accent - egrave => 'è', # small e, grave accent - eth => 'ð', # small eth, Icelandic - euml => 'ë', # small e, dieresis or umlaut mark - iacute => 'í', # small i, acute accent - icirc => 'î', # small i, circumflex accent - igrave => 'ì', # small i, grave accent - iuml => 'ï', # small i, dieresis or umlaut mark - ntilde => 'ñ', # small n, tilde - oacute => 'ó', # small o, acute accent - ocirc => 'ô', # small o, circumflex accent - ograve => 'ò', # small o, grave accent - oslash => 'ø', # small o, slash - otilde => 'õ', # small o, tilde - ouml => 'ö', # small o, dieresis or umlaut mark - szlig => 'ß', # small sharp s, German (sz ligature) - thorn => 'þ', # small thorn, Icelandic - uacute => 'ú', # small u, acute accent - ucirc => 'û', # small u, circumflex accent - ugrave => 'ù', # small u, grave accent - uuml => 'ü', # small u, dieresis or umlaut mark - yacute => 'ý', # small y, acute accent - yuml => 'ÿ', # small y, dieresis or umlaut mark - - # Some extra Latin 1 chars that are listed in the HTML3.2 draft (21-May-96) - copy => '©', # copyright sign - reg => '®', # registered sign - nbsp => "\240", # non breaking space - - # Additional ISO-8859/1 entities listed in rfc1866 (section 14) - iexcl => '¡', - cent => '¢', - pound => '£', - curren => '¤', - yen => '¥', - brvbar => '¦', - sect => '§', - uml => '¨', - ordf => 'ª', - laquo => '«', -'not' => '¬', # not is a keyword in perl - shy => '', - macr => '¯', - deg => '°', - plusmn => '±', - sup1 => '¹', - sup2 => '²', - sup3 => '³', - acute => '´', - micro => 'µ', - para => '¶', - middot => '·', - cedil => '¸', - ordm => 'º', - raquo => '»', - frac14 => '¼', - frac12 => '½', - frac34 => '¾', - iquest => '¿', -'times' => '×', # times is a keyword in perl - divide => '÷', - -# some POD special entities - verbar => '|', - sol => '/' -); - -##--------------------------------------------------------------------------- - -##--------------------------------- -## Function definitions begin here -##--------------------------------- - -sub podchecker { - my ($infile, $outfile, %options) = @_; - local $_; - - ## Set defaults - $infile ||= \*STDIN; - $outfile ||= \*STDERR; - - ## Now create a pod checker - my $checker = new Pod::Checker(%options); - - ## Now check the pod document for errors - $checker->parse_from_file($infile, $outfile); - - ## Return the number of errors found - return $checker->num_errors(); -} - -##--------------------------------------------------------------------------- - -##------------------------------- -## Method definitions begin here -##------------------------------- - -################################## - -=over 4 - -=item C<Pod::Checker-E<gt>new( %options )> - -Return a reference to a new Pod::Checker object that inherits from -Pod::Parser and is used for calling the required methods later. The -following options are recognized: - -C<-warnings =E<gt> num> - Print warnings if C<num> is true. The higher the value of C<num>, -the more warnings are printed. Currently there are only levels 1 and 2. - -C<-quiet =E<gt> num> - If C<num> is true, do not print any errors/warnings. This is useful -when Pod::Checker is used to munge POD code into plain text from within -POD formatters. - -=cut - -## sub new { -## my $this = shift; -## my $class = ref($this) || $this; -## my %params = @_; -## my $self = {%params}; -## bless $self, $class; -## $self->initialize(); -## return $self; -## } - -sub initialize { - my $self = shift; - ## Initialize number of errors, and setup an error function to - ## increment this number and then print to the designated output. - $self->{_NUM_ERRORS} = 0; - $self->{_NUM_WARNINGS} = 0; - $self->{-quiet} ||= 0; - # set the error handling subroutine - $self->errorsub($self->{-quiet} ? sub { 1; } : 'poderror'); - $self->{_commands} = 0; # total number of POD commands encountered - $self->{_list_stack} = []; # stack for nested lists - $self->{_have_begin} = ''; # stores =begin - $self->{_links} = []; # stack for internal hyperlinks - $self->{_nodes} = []; # stack for =head/=item nodes - $self->{_index} = []; # text in X<> - # print warnings? - $self->{-warnings} = 1 unless(defined $self->{-warnings}); - $self->{_current_head1} = ''; # the current =head1 block - $self->parseopts(-process_cut_cmd => 1, -warnings => $self->{-warnings}); -} - -################################## - -=item C<$checker-E<gt>poderror( @args )> - -=item C<$checker-E<gt>poderror( {%opts}, @args )> - -Internal method for printing errors and warnings. If no options are -given, simply prints "@_". The following options are recognized and used -to form the output: - - -msg - -A message to print prior to C<@args>. - - -line - -The line number the error occurred in. - - -file - -The file (name) the error occurred in. - - -severity - -The error level, should be 'WARNING' or 'ERROR'. - -=cut - -# Invoked as $self->poderror( @args ), or $self->poderror( {%opts}, @args ) -sub poderror { - my $self = shift; - my %opts = (ref $_[0]) ? %{shift()} : (); - - ## Retrieve options - chomp( my $msg = ($opts{-msg} || '')."@_" ); - my $line = (exists $opts{-line}) ? " at line $opts{-line}" : ''; - my $file = (exists $opts{-file}) ? " in file $opts{-file}" : ''; - unless (exists $opts{-severity}) { - ## See if can find severity in message prefix - $opts{-severity} = $1 if ( $msg =~ s/^\**\s*([A-Z]{3,}):\s+// ); - } - my $severity = (exists $opts{-severity}) ? "*** $opts{-severity}: " : ''; - - ## Increment error count and print message " - ++($self->{_NUM_ERRORS}) - if(!%opts || ($opts{-severity} && $opts{-severity} eq 'ERROR')); - ++($self->{_NUM_WARNINGS}) - if(!%opts || ($opts{-severity} && $opts{-severity} eq 'WARNING')); - unless($self->{-quiet}) { - my $out_fh = $self->output_handle() || \*STDERR; - print $out_fh ($severity, $msg, $line, $file, "\n") - if($self->{-warnings} || !%opts || $opts{-severity} ne 'WARNING'); - } -} - -################################## - -=item C<$checker-E<gt>num_errors()> - -Set (if argument specified) and retrieve the number of errors found. - -=cut - -sub num_errors { - return (@_ > 1) ? ($_[0]->{_NUM_ERRORS} = $_[1]) : $_[0]->{_NUM_ERRORS}; -} - -################################## - -=item C<$checker-E<gt>num_warnings()> - -Set (if argument specified) and retrieve the number of warnings found. - -=cut - -sub num_warnings { - return (@_ > 1) ? ($_[0]->{_NUM_WARNINGS} = $_[1]) : $_[0]->{_NUM_WARNINGS}; -} - -################################## - -=item C<$checker-E<gt>name()> - -Set (if argument specified) and retrieve the canonical name of POD as -found in the C<=head1 NAME> section. - -=cut - -sub name { - return (@_ > 1 && $_[1]) ? - ($_[0]->{-name} = $_[1]) : $_[0]->{-name}; -} - -################################## - -=item C<$checker-E<gt>node()> - -Add (if argument specified) and retrieve the nodes (as defined by C<=headX> -and C<=item>) of the current POD. The nodes are returned in the order of -their occurrence. They consist of plain text, each piece of whitespace is -collapsed to a single blank. - -=cut - -sub node { - my ($self,$text) = @_; - if(defined $text) { - $text =~ s/\s+$//s; # strip trailing whitespace - $text =~ s/\s+/ /gs; # collapse whitespace - # add node, order important! - push(@{$self->{_nodes}}, $text); - # keep also a uniqueness counter - $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s); - return $text; - } - @{$self->{_nodes}}; -} - -################################## - -=item C<$checker-E<gt>idx()> - -Add (if argument specified) and retrieve the index entries (as defined by -C<XE<lt>E<gt>>) of the current POD. They consist of plain text, each piece -of whitespace is collapsed to a single blank. - -=cut - -# set/return index entries of current POD -sub idx { - my ($self,$text) = @_; - if(defined $text) { - $text =~ s/\s+$//s; # strip trailing whitespace - $text =~ s/\s+/ /gs; # collapse whitespace - # add node, order important! - push(@{$self->{_index}}, $text); - # keep also a uniqueness counter - $self->{_unique_nodes}->{$text}++ if($text !~ /^\s*$/s); - return $text; - } - @{$self->{_index}}; -} - -################################## - -=item C<$checker-E<gt>hyperlink()> - -Add (if argument specified) and retrieve the hyperlinks (as defined by -C<LE<lt>E<gt>>) of the current POD. They consist of a 2-item array: line -number and C<Pod::Hyperlink> object. - -=back - -=cut - -# set/return hyperlinks of the current POD -sub hyperlink { - my $self = shift; - if($_[0]) { - push(@{$self->{_links}}, $_[0]); - return $_[0]; - } - @{$self->{_links}}; -} - -## overrides for Pod::Parser - -sub end_pod { - ## Do some final checks and - ## print the number of errors found - my $self = shift; - my $infile = $self->input_file(); - - if(@{$self->{_list_stack}}) { - my $list; - while(($list = $self->_close_list('EOF',$infile)) && - $list->indent() ne 'auto') { - $self->poderror({ -line => 'EOF', -file => $infile, - -severity => 'ERROR', -msg => '=over on line ' . - $list->start() . ' without closing =back' }); - } - } - - # check validity of document internal hyperlinks - # first build the node names from the paragraph text - my %nodes; - foreach($self->node()) { - $nodes{$_} = 1; - if(/^(\S+)\s+\S/) { - # we have more than one word. Use the first as a node, too. - # This is used heavily in perlfunc.pod - $nodes{$1} ||= 2; # derived node - } - } - foreach($self->idx()) { - $nodes{$_} = 3; # index node - } - foreach($self->hyperlink()) { - my ($line,$link) = @$_; - # _TODO_ what if there is a link to the page itself by the name, - # e.g. in Tk::Pod : L<Tk::Pod/"DESCRIPTION"> - if($link->node() && !$link->page() && $link->type() ne 'hyperlink') { - my $node = $self->_check_ptree($self->parse_text($link->node(), - $line), $line, $infile, 'L'); - if($node && !$nodes{$node}) { - $self->poderror({ -line => $line || '', -file => $infile, - -severity => 'ERROR', - -msg => "unresolved internal link '$node'"}); - } - } - } - - # check the internal nodes for uniqueness. This pertains to - # =headX, =item and X<...> - if($self->{-warnings} && $self->{-warnings}>1) { - foreach(grep($self->{_unique_nodes}->{$_} > 1, - keys %{$self->{_unique_nodes}})) { - $self->poderror({ -line => '-', -file => $infile, - -severity => 'WARNING', - -msg => "multiple occurrence of link target '$_'"}); - } - } - - # no POD found here - $self->num_errors(-1) if($self->{_commands} == 0); -} - -# check a POD command directive -sub command { - my ($self, $cmd, $paragraph, $line_num, $pod_para) = @_; - my ($file, $line) = $pod_para->file_line; - ## Check the command syntax - my $arg; # this will hold the command argument - if (! $VALID_COMMANDS{$cmd}) { - $self->poderror({ -line => $line, -file => $file, -severity => 'ERROR', - -msg => "Unknown command '$cmd'" }); - } - else { # found a valid command - $self->{_commands}++; # delete this line if below is enabled again - - ##### following check disabled due to strong request - #if(!$self->{_commands}++ && $cmd !~ /^head/) { - # $self->poderror({ -line => $line, -file => $file, - # -severity => 'WARNING', - # -msg => "file does not start with =head" }); - #} - - # check syntax of particular command - if($cmd eq 'over') { - # check for argument - $arg = $self->interpolate_and_check($paragraph, $line,$file); - my $indent = 4; # default - if($arg && $arg =~ /^\s*(\d+)\s*$/) { - $indent = $1; - } - # start a new list - $self->_open_list($indent,$line,$file); - } - elsif($cmd eq 'item') { - # are we in a list? - unless(@{$self->{_list_stack}}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => '=item without previous =over' }); - # auto-open in case we encounter many more - $self->_open_list('auto',$line,$file); - } - my $list = $self->{_list_stack}->[0]; - # check whether the previous item had some contents - if(defined $self->{_list_item_contents} && - $self->{_list_item_contents} == 0) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'previous =item has no contents' }); - } - if($list->{_has_par}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'preceding non-item paragraph(s)' }); - delete $list->{_has_par}; - } - # check for argument - $arg = $self->interpolate_and_check($paragraph, $line, $file); - if($arg && $arg =~ /(\S+)/) { - $arg =~ s/[\s\n]+$//; - my $type; - if($arg =~ /^[*]\s*(\S*.*)/) { - $type = 'bullet'; - $self->{_list_item_contents} = $1 ? 1 : 0; - $arg = $1; - } - elsif($arg =~ /^\d+\.?\s+(\S*)/) { - $type = 'number'; - $self->{_list_item_contents} = $1 ? 1 : 0; - $arg = $1; - } - else { - $type = 'definition'; - $self->{_list_item_contents} = 1; - } - my $first = $list->type(); - if($first && $first ne $type) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "=item type mismatch ('$first' vs. '$type')"}); - } - else { # first item - $list->type($type); - } - } - else { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'No argument for =item' }); - $arg = ' '; # empty - $self->{_list_item_contents} = 0; - } - # add this item - $list->item($arg); - # remember this node - $self->node($arg); - } - elsif($cmd eq 'back') { - # check if we have an open list - unless(@{$self->{_list_stack}}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => '=back without previous =over' }); - } - else { - # check for spurious characters - $arg = $self->interpolate_and_check($paragraph, $line,$file); - if($arg && $arg =~ /\S/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'Spurious character(s) after =back' }); - } - # close list - my $list = $self->_close_list($line,$file); - # check for empty lists - if(!$list->item() && $self->{-warnings}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'No items in =over (at line ' . - $list->start() . ') / =back list'}); - } - } - } - elsif($cmd =~ /^head(\d+)/) { - my $hnum = $1; - $self->{"_have_head_$hnum"}++; # count head types - if($hnum > 1 && !$self->{'_have_head_'.($hnum -1)}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "=head$hnum without preceding higher level"}); - } - # check whether the previous =head section had some contents - if(defined $self->{_commands_in_head} && - $self->{_commands_in_head} == 0 && - defined $self->{_last_head} && - $self->{_last_head} >= $hnum) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'empty section in previous paragraph'}); - } - $self->{_commands_in_head} = -1; - $self->{_last_head} = $hnum; - # check if there is an open list - if(@{$self->{_list_stack}}) { - my $list; - while(($list = $self->_close_list($line,$file)) && - $list->indent() ne 'auto') { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => '=over on line '. $list->start() . - " without closing =back (at $cmd)" }); - } - } - # remember this node - $arg = $self->interpolate_and_check($paragraph, $line,$file); - $arg =~ s/[\s\n]+$//s; - $self->node($arg); - unless(length($arg)) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => "empty =$cmd"}); - } - if($cmd eq 'head1') { - $self->{_current_head1} = $arg; - } else { - $self->{_current_head1} = ''; - } - } - elsif($cmd eq 'begin') { - if($self->{_have_begin}) { - # already have a begin - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => q{Nested =begin's (first at line } . - $self->{_have_begin} . ')'}); - } - else { - # check for argument - $arg = $self->interpolate_and_check($paragraph, $line,$file); - unless($arg && $arg =~ /(\S+)/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'No argument for =begin'}); - } - # remember the =begin - $self->{_have_begin} = "$line:$1"; - } - } - elsif($cmd eq 'end') { - if($self->{_have_begin}) { - # close the existing =begin - $self->{_have_begin} = ''; - # check for spurious characters - $arg = $self->interpolate_and_check($paragraph, $line,$file); - # the closing argument is optional - #if($arg && $arg =~ /\S/) { - # $self->poderror({ -line => $line, -file => $file, - # -severity => 'WARNING', - # -msg => "Spurious character(s) after =end" }); - #} - } - else { - # don't have a matching =begin - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => '=end without =begin' }); - } - } - elsif($cmd eq 'for') { - unless($paragraph =~ /\s*(\S+)\s*/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => '=for without formatter specification' }); - } - $arg = ''; # do not expand paragraph below - } - elsif($cmd =~ /^(pod|cut)$/) { - # check for argument - $arg = $self->interpolate_and_check($paragraph, $line,$file); - if($arg && $arg =~ /(\S+)/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => "Spurious text after =$cmd"}); - } - } - $self->{_commands_in_head}++; - ## Check the interior sequences in the command-text - $self->interpolate_and_check($paragraph, $line,$file) - unless(defined $arg); - } -} - -sub _open_list -{ - my ($self,$indent,$line,$file) = @_; - my $list = Pod::List->new( - -indent => $indent, - -start => $line, - -file => $file); - unshift(@{$self->{_list_stack}}, $list); - undef $self->{_list_item_contents}; - $list; -} - -sub _close_list -{ - my ($self,$line,$file) = @_; - my $list = shift(@{$self->{_list_stack}}); - if(defined $self->{_list_item_contents} && - $self->{_list_item_contents} == 0) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'previous =item has no contents' }); - } - undef $self->{_list_item_contents}; - $list; -} - -# process a block of some text -sub interpolate_and_check { - my ($self, $paragraph, $line, $file) = @_; - ## Check the interior sequences in the command-text - # and return the text - $self->_check_ptree( - $self->parse_text($paragraph,$line), $line, $file, ''); -} - -sub _check_ptree { - my ($self,$ptree,$line,$file,$nestlist) = @_; - local($_); - my $text = ''; - # process each node in the parse tree - foreach(@$ptree) { - # regular text chunk - unless(ref) { - # count the unescaped angle brackets - # complain only when warning level is greater than 1 - if($self->{-warnings} && $self->{-warnings}>1) { - my $count; - if($count = tr/<>/<>/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "$count unescaped <> in paragraph" }); - } - } - $text .= $_; - next; - } - # have an interior sequence - my $cmd = $_->cmd_name(); - my $contents = $_->parse_tree(); - ($file,$line) = $_->file_line(); - # check for valid tag - if (! $VALID_SEQUENCES{$cmd}) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => qq(Unknown interior-sequence '$cmd')}); - # expand it anyway - $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); - next; - } - if($nestlist =~ /$cmd/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "nested commands $cmd<...$cmd<...>...>"}); - # _TODO_ should we add the contents anyway? - # expand it anyway, see below - } - if($cmd eq 'E') { - # preserve entities - if(@$contents > 1 || ref $$contents[0] || $$contents[0] !~ /^\w+$/) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'garbled entity ' . $_->raw_text()}); - next; - } - my $ent = $$contents[0]; - my $val; - if($ent =~ /^0x[0-9a-f]+$/i) { - # hexadec entity - $val = hex($ent); - } - elsif($ent =~ /^0\d+$/) { - # octal - $val = oct($ent); - } - elsif($ent =~ /^\d+$/) { - # numeric entity - $val = $ent; - } - if(defined $val) { - if($val>0 && $val<256) { - $text .= chr($val); - } - else { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'Entity number out of range ' . $_->raw_text()}); - } - } - elsif($ENTITIES{$ent}) { - # known ISO entity - $text .= $ENTITIES{$ent}; - } - else { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'Unknown entity ' . $_->raw_text()}); - $text .= "E<$ent>"; - } - } - elsif($cmd eq 'L') { - # try to parse the hyperlink - my $link = Pod::Hyperlink->new($contents->raw_text()); - unless(defined $link) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'malformed link ' . $_->raw_text() ." : $@"}); - next; - } - $link->line($line); # remember line - if($self->{-warnings}) { - foreach my $w ($link->warning()) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => $w }); - } - } - # check the link text - $text .= $self->_check_ptree($self->parse_text($link->text(), - $line), $line, $file, "$nestlist$cmd"); - # remember link - $self->hyperlink([$line,$link]); - } - elsif($cmd =~ /[BCFIS]/) { - # add the guts - $text .= $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); - } - elsif($cmd eq 'Z') { - if(length($contents->raw_text())) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'Nonempty Z<>'}); - } - } - elsif($cmd eq 'X') { - my $idx = $self->_check_ptree($contents, $line, $file, "$nestlist$cmd"); - if($idx =~ /^\s*$/s) { - $self->poderror({ -line => $line, -file => $file, - -severity => 'ERROR', - -msg => 'Empty X<>'}); - } - else { - # remember this node - $self->idx($idx); - } - } - else { - # not reached - croak 'internal error'; - } - } - $text; -} - -# process a block of verbatim text -sub verbatim { - ## Nothing particular to check - my ($self, $paragraph, $line_num, $pod_para) = @_; - - $self->_preproc_par($paragraph); - - if($self->{_current_head1} eq 'NAME') { - my ($file, $line) = $pod_para->file_line; - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => 'Verbatim paragraph in NAME section' }); - } -} - -# process a block of regular text -sub textblock { - my ($self, $paragraph, $line_num, $pod_para) = @_; - my ($file, $line) = $pod_para->file_line; - - $self->_preproc_par($paragraph); - - # skip this paragraph if in a =begin block - unless($self->{_have_begin}) { - my $block = $self->interpolate_and_check($paragraph, $line,$file); - if($self->{_current_head1} eq 'NAME') { - if($block =~ /^\s*(\S+?)\s*[,-]/) { - # this is the canonical name - $self->{-name} = $1 unless(defined $self->{-name}); - } - } - } -} - -sub _preproc_par -{ - my $self = shift; - $_[0] =~ s/[\s\n]+$//; - if($_[0]) { - $self->{_commands_in_head}++; - $self->{_list_item_contents}++ if(defined $self->{_list_item_contents}); - if(@{$self->{_list_stack}} && !$self->{_list_stack}->[0]->item()) { - $self->{_list_stack}->[0]->{_has_par} = 1; - } - } -} - -1; - -__END__ - -=head1 AUTHOR - -Please report bugs using L<http://rt.cpan.org>. - -Brad Appleton E<lt>bradapp@enteract.comE<gt> (initial version), -Marek Rouchal E<lt>marekr@cpan.orgE<gt> - -Based on code for B<Pod::Text::pod2text()> written by -Tom Christiansen E<lt>tchrist@mox.perl.comE<gt> - -=cut - diff --git a/src/lib/mrtg2/Pod/Find.pm b/src/lib/mrtg2/Pod/Find.pm deleted file mode 100644 index 8d1103b..0000000 --- a/src/lib/mrtg2/Pod/Find.pm +++ /dev/null @@ -1,535 +0,0 @@ -############################################################################# -# Pod/Find.pm -- finds files containing POD documentation -# -# Author: Marek Rouchal <marekr@cpan.org> -# -# Copyright (C) 1999-2000 by Marek Rouchal (and borrowing code -# from Nick Ing-Simmon's PodToHtml). All rights reserved. -# This file is part of "PodParser". Pod::Find is free software; -# you can redistribute it and/or modify it under the same terms -# as Perl itself. -############################################################################# - -package Pod::Find; -use strict; - -use vars qw($VERSION); -$VERSION = '1.35'; ## Current version of this package -require 5.005; ## requires this Perl version or later -use Carp; - -BEGIN { - if ($] < 5.006) { - require Symbol; - import Symbol; - } -} - -############################################################################# - -=head1 NAME - -Pod::Find - find POD documents in directory trees - -=head1 SYNOPSIS - - use Pod::Find qw(pod_find simplify_name); - my %pods = pod_find({ -verbose => 1, -inc => 1 }); - foreach(keys %pods) { - print "found library POD `$pods{$_}' in $_\n"; - } - - print "podname=",simplify_name('a/b/c/mymodule.pod'),"\n"; - - $location = pod_where( { -inc => 1 }, "Pod::Find" ); - -=head1 DESCRIPTION - -B<Pod::Find> provides a set of functions to locate POD files. Note that -no function is exported by default to avoid pollution of your namespace, -so be sure to specify them in the B<use> statement if you need them: - - use Pod::Find qw(pod_find); - -From this version on the typical SCM (software configuration management) -files/directories like RCS, CVS, SCCS, .svn are ignored. - -=cut - -#use diagnostics; -use Exporter; -use File::Spec; -use File::Find; -use Cwd; - -use vars qw(@ISA @EXPORT_OK $VERSION); -@ISA = qw(Exporter); -@EXPORT_OK = qw(&pod_find &simplify_name &pod_where &contains_pod); - -# package global variables -my $SIMPLIFY_RX; - -=head2 C<pod_find( { %opts } , @directories )> - -The function B<pod_find> searches for POD documents in a given set of -files and/or directories. It returns a hash with the file names as keys -and the POD name as value. The POD name is derived from the file name -and its position in the directory tree. - -E.g. when searching in F<$HOME/perl5lib>, the file -F<$HOME/perl5lib/MyModule.pm> would get the POD name I<MyModule>, -whereas F<$HOME/perl5lib/Myclass/Subclass.pm> would be -I<Myclass::Subclass>. The name information can be used for POD -translators. - -Only text files containing at least one valid POD command are found. - -A warning is printed if more than one POD file with the same POD name -is found, e.g. F<CPAN.pm> in different directories. This usually -indicates duplicate occurrences of modules in the I<@INC> search path. - -B<OPTIONS> The first argument for B<pod_find> may be a hash reference -with options. The rest are either directories that are searched -recursively or files. The POD names of files are the plain basenames -with any Perl-like extension (.pm, .pl, .pod) stripped. - -=over 4 - -=item C<-verbose =E<gt> 1> - -Print progress information while scanning. - -=item C<-perl =E<gt> 1> - -Apply Perl-specific heuristics to find the correct PODs. This includes -stripping Perl-like extensions, omitting subdirectories that are numeric -but do I<not> match the current Perl interpreter's version id, suppressing -F<site_perl> as a module hierarchy name etc. - -=item C<-script =E<gt> 1> - -Search for PODs in the current Perl interpreter's installation -B<scriptdir>. This is taken from the local L<Config|Config> module. - -=item C<-inc =E<gt> 1> - -Search for PODs in the current Perl interpreter's I<@INC> paths. This -automatically considers paths specified in the C<PERL5LIB> environment -as this is included in I<@INC> by the Perl interpreter itself. - -=back - -=cut - -# return a hash of the POD files found -# first argument may be a hashref (options), -# rest is a list of directories to search recursively -sub pod_find -{ - my %opts; - if(ref $_[0]) { - %opts = %{shift()}; - } - - $opts{-verbose} ||= 0; - $opts{-perl} ||= 0; - - my (@search) = @_; - - if($opts{-script}) { - require Config; - push(@search, $Config::Config{scriptdir}) - if -d $Config::Config{scriptdir}; - $opts{-perl} = 1; - } - - if($opts{-inc}) { - if ($^O eq 'MacOS') { - # tolerate '.', './some_dir' and '(../)+some_dir' on Mac OS - my @new_INC = @INC; - for (@new_INC) { - if ( $_ eq '.' ) { - $_ = ':'; - } elsif ( $_ =~ s{^((?:\.\./)+)}{':' x (length($1)/3)}e ) { - $_ = ':'. $_; - } else { - $_ =~ s{^\./}{:}; - } - } - push(@search, grep($_ ne File::Spec->curdir, @new_INC)); - } else { - push(@search, grep($_ ne File::Spec->curdir, @INC)); - } - - $opts{-perl} = 1; - } - - if($opts{-perl}) { - require Config; - # this code simplifies the POD name for Perl modules: - # * remove "site_perl" - # * remove e.g. "i586-linux" (from 'archname') - # * remove e.g. 5.00503 - # * remove pod/ if followed by *.pod (e.g. in pod/perlfunc.pod) - - # Mac OS: - # * remove ":?site_perl:" - # * remove :?pod: if followed by *.pod (e.g. in :pod:perlfunc.pod) - - if ($^O eq 'MacOS') { - $SIMPLIFY_RX = - qq!^(?i:\:?site_perl\:|\:?pod\:(?=.*?\\.pod\\z))*!; - } else { - $SIMPLIFY_RX = - qq!^(?i:site(_perl)?/|\Q$Config::Config{archname}\E/|\\d+\\.\\d+([_.]?\\d+)?/|pod/(?=.*?\\.pod\\z))*!; - } - } - - my %dirs_visited; - my %pods; - my %names; - my $pwd = cwd(); - - foreach my $try (@search) { - unless(File::Spec->file_name_is_absolute($try)) { - # make path absolute - $try = File::Spec->catfile($pwd,$try); - } - # simplify path - # on VMS canonpath will vmsify:[the.path], but File::Find::find - # wants /unixy/paths - $try = File::Spec->canonpath($try) if ($^O ne 'VMS'); - $try = VMS::Filespec::unixify($try) if ($^O eq 'VMS'); - my $name; - if(-f $try) { - if($name = _check_and_extract_name($try, $opts{-verbose})) { - _check_for_duplicates($try, $name, \%names, \%pods); - } - next; - } - my $root_rx = $^O eq 'MacOS' ? qq!^\Q$try\E! : qq!^\Q$try\E/!; - File::Find::find( sub { - my $item = $File::Find::name; - if(-d) { - if($item =~ m{/(?:RCS|CVS|SCCS|\.svn)$}) { - $File::Find::prune = 1; - return; - } - elsif($dirs_visited{$item}) { - warn "Directory '$item' already seen, skipping.\n" - if($opts{-verbose}); - $File::Find::prune = 1; - return; - } - else { - $dirs_visited{$item} = 1; - } - if($opts{-perl} && /^(\d+\.[\d_]+)\z/s && eval "$1" != $]) { - $File::Find::prune = 1; - warn "Perl $] version mismatch on $_, skipping.\n" - if($opts{-verbose}); - } - return; - } - if($name = _check_and_extract_name($item, $opts{-verbose}, $root_rx)) { - _check_for_duplicates($item, $name, \%names, \%pods); - } - }, $try); # end of File::Find::find - } - chdir $pwd; - return %pods; -} - -sub _check_for_duplicates { - my ($file, $name, $names_ref, $pods_ref) = @_; - if($$names_ref{$name}) { - warn "Duplicate POD found (shadowing?): $name ($file)\n"; - warn ' Already seen in ', - join(' ', grep($$pods_ref{$_} eq $name, keys %$pods_ref)),"\n"; - } - else { - $$names_ref{$name} = 1; - } - return $$pods_ref{$file} = $name; -} - -sub _check_and_extract_name { - my ($file, $verbose, $root_rx) = @_; - - # check extension or executable flag - # this involves testing the .bat extension on Win32! - unless(-f $file && -T $file && ($file =~ /\.(pod|pm|plx?)\z/i || -x $file )) { - return; - } - - return unless contains_pod($file,$verbose); - - # strip non-significant path components - # TODO what happens on e.g. Win32? - my $name = $file; - if(defined $root_rx) { - $name =~ s/$root_rx//s; - $name =~ s/$SIMPLIFY_RX//s if(defined $SIMPLIFY_RX); - } - else { - if ($^O eq 'MacOS') { - $name =~ s/^.*://s; - } else { - $name =~ s{^.*/}{}s; - } - } - _simplify($name); - $name =~ s{/+}{::}g; - if ($^O eq 'MacOS') { - $name =~ s{:+}{::}g; # : -> :: - } else { - $name =~ s{/+}{::}g; # / -> :: - } - return $name; -} - -=head2 C<simplify_name( $str )> - -The function B<simplify_name> is equivalent to B<basename>, but also -strips Perl-like extensions (.pm, .pl, .pod) and extensions like -F<.bat>, F<.cmd> on Win32 and OS/2, or F<.com> on VMS, respectively. - -=cut - -# basic simplification of the POD name: -# basename & strip extension -sub simplify_name { - my ($str) = @_; - # remove all path components - if ($^O eq 'MacOS') { - $str =~ s/^.*://s; - } else { - $str =~ s{^.*/}{}s; - } - _simplify($str); - return $str; -} - -# internal sub only -sub _simplify { - # strip Perl's own extensions - $_[0] =~ s/\.(pod|pm|plx?)\z//i; - # strip meaningless extensions on Win32 and OS/2 - $_[0] =~ s/\.(bat|exe|cmd)\z//i if($^O =~ /mswin|os2/i); - # strip meaningless extensions on VMS - $_[0] =~ s/\.(com)\z//i if($^O eq 'VMS'); -} - -# contribution from Tim Jenness <t.jenness@jach.hawaii.edu> - -=head2 C<pod_where( { %opts }, $pod )> - -Returns the location of a pod document given a search directory -and a module (e.g. C<File::Find>) or script (e.g. C<perldoc>) name. - -Options: - -=over 4 - -=item C<-inc =E<gt> 1> - -Search @INC for the pod and also the C<scriptdir> defined in the -L<Config|Config> module. - -=item C<-dirs =E<gt> [ $dir1, $dir2, ... ]> - -Reference to an array of search directories. These are searched in order -before looking in C<@INC> (if B<-inc>). Current directory is used if -none are specified. - -=item C<-verbose =E<gt> 1> - -List directories as they are searched - -=back - -Returns the full path of the first occurrence to the file. -Package names (eg 'A::B') are automatically converted to directory -names in the selected directory. (eg on unix 'A::B' is converted to -'A/B'). Additionally, '.pm', '.pl' and '.pod' are appended to the -search automatically if required. - -A subdirectory F<pod/> is also checked if it exists in any of the given -search directories. This ensures that e.g. L<perlfunc|perlfunc> is -found. - -It is assumed that if a module name is supplied, that that name -matches the file name. Pods are not opened to check for the 'NAME' -entry. - -A check is made to make sure that the file that is found does -contain some pod documentation. - -=cut - -sub pod_where { - - # default options - my %options = ( - '-inc' => 0, - '-verbose' => 0, - '-dirs' => [ File::Spec->curdir ], - ); - - # Check for an options hash as first argument - if (defined $_[0] && ref($_[0]) eq 'HASH') { - my $opt = shift; - - # Merge default options with supplied options - %options = (%options, %$opt); - } - - # Check usage - carp 'Usage: pod_where({options}, $pod)' unless (scalar(@_)); - - # Read argument - my $pod = shift; - - # Split on :: and then join the name together using File::Spec - my @parts = split (/::/, $pod); - - # Get full directory list - my @search_dirs = @{ $options{'-dirs'} }; - - if ($options{'-inc'}) { - - require Config; - - # Add @INC - if ($^O eq 'MacOS' && $options{'-inc'}) { - # tolerate '.', './some_dir' and '(../)+some_dir' on Mac OS - my @new_INC = @INC; - for (@new_INC) { - if ( $_ eq '.' ) { - $_ = ':'; - } elsif ( $_ =~ s{^((?:\.\./)+)}{':' x (length($1)/3)}e ) { - $_ = ':'. $_; - } else { - $_ =~ s{^\./}{:}; - } - } - push (@search_dirs, @new_INC); - } elsif ($options{'-inc'}) { - push (@search_dirs, @INC); - } - - # Add location of pod documentation for perl man pages (eg perlfunc) - # This is a pod directory in the private install tree - #my $perlpoddir = File::Spec->catdir($Config::Config{'installprivlib'}, - # 'pod'); - #push (@search_dirs, $perlpoddir) - # if -d $perlpoddir; - - # Add location of binaries such as pod2text - push (@search_dirs, $Config::Config{'scriptdir'}) - if -d $Config::Config{'scriptdir'}; - } - - warn 'Search path is: '.join(' ', @search_dirs)."\n" - if $options{'-verbose'}; - - # Loop over directories - Dir: foreach my $dir ( @search_dirs ) { - - # Don't bother if can't find the directory - if (-d $dir) { - warn "Looking in directory $dir\n" - if $options{'-verbose'}; - - # Now concatenate this directory with the pod we are searching for - my $fullname = File::Spec->catfile($dir, @parts); - warn "Filename is now $fullname\n" - if $options{'-verbose'}; - - # Loop over possible extensions - foreach my $ext ('', '.pod', '.pm', '.pl') { - my $fullext = $fullname . $ext; - if (-f $fullext && - contains_pod($fullext, $options{'-verbose'}) ) { - warn "FOUND: $fullext\n" if $options{'-verbose'}; - return $fullext; - } - } - } else { - warn "Directory $dir does not exist\n" - if $options{'-verbose'}; - next Dir; - } - # for some strange reason the path on MacOS/darwin/cygwin is - # 'pods' not 'pod' - # this could be the case also for other systems that - # have a case-tolerant file system, but File::Spec - # does not recognize 'darwin' yet. And cygwin also has "pods", - # but is not case tolerant. Oh well... - if((File::Spec->case_tolerant || $^O =~ /macos|darwin|cygwin/i) - && -d File::Spec->catdir($dir,'pods')) { - $dir = File::Spec->catdir($dir,'pods'); - redo Dir; - } - if(-d File::Spec->catdir($dir,'pod')) { - $dir = File::Spec->catdir($dir,'pod'); - redo Dir; - } - } - # No match; - return; -} - -=head2 C<contains_pod( $file , $verbose )> - -Returns true if the supplied filename (not POD module) contains some pod -information. - -=cut - -sub contains_pod { - my $file = shift; - my $verbose = 0; - $verbose = shift if @_; - - # check for one line of POD - my $podfh; - if ($] < 5.006) { - $podfh = gensym(); - } - - unless(open($podfh,"<$file")) { - warn "Error: $file is unreadable: $!\n"; - return; - } - - local $/ = undef; - my $pod = <$podfh>; - close($podfh) || die "Error closing $file: $!\n"; - unless($pod =~ /^=(head\d|pod|over|item|cut)\b/m) { - warn "No POD in $file, skipping.\n" - if($verbose); - return 0; - } - - return 1; -} - -=head1 AUTHOR - -Please report bugs using L<http://rt.cpan.org>. - -Marek Rouchal E<lt>marekr@cpan.orgE<gt>, -heavily borrowing code from Nick Ing-Simmons' PodToHtml. - -Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt> provided -C<pod_where> and C<contains_pod>. - -=head1 SEE ALSO - -L<Pod::Parser>, L<Pod::Checker>, L<perldoc> - -=cut - -1; - diff --git a/src/lib/mrtg2/Pod/ParseUtils.pm b/src/lib/mrtg2/Pod/ParseUtils.pm deleted file mode 100644 index f3c7ef4..0000000 --- a/src/lib/mrtg2/Pod/ParseUtils.pm +++ /dev/null @@ -1,855 +0,0 @@ -############################################################################# -# Pod/ParseUtils.pm -- helpers for POD parsing and conversion -# -# Copyright (C) 1999-2000 by Marek Rouchal. All rights reserved. -# This file is part of "PodParser". PodParser is free software; -# you can redistribute it and/or modify it under the same terms -# as Perl itself. -############################################################################# - -package Pod::ParseUtils; -use strict; - -use vars qw($VERSION); -$VERSION = '1.36'; ## Current version of this package -require 5.005; ## requires this Perl version or later - -=head1 NAME - -Pod::ParseUtils - helpers for POD parsing and conversion - -=head1 SYNOPSIS - - use Pod::ParseUtils; - - my $list = new Pod::List; - my $link = Pod::Hyperlink->new('Pod::Parser'); - -=head1 DESCRIPTION - -B<Pod::ParseUtils> contains a few object-oriented helper packages for -POD parsing and processing (i.e. in POD formatters and translators). - -=cut - -#----------------------------------------------------------------------------- -# Pod::List -# -# class to hold POD list info (=over, =item, =back) -#----------------------------------------------------------------------------- - -package Pod::List; - -use Carp; - -=head2 Pod::List - -B<Pod::List> can be used to hold information about POD lists -(written as =over ... =item ... =back) for further processing. -The following methods are available: - -=over 4 - -=item Pod::List-E<gt>new() - -Create a new list object. Properties may be specified through a hash -reference like this: - - my $list = Pod::List->new({ -start => $., -indent => 4 }); - -See the individual methods/properties for details. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my %params = @_; - my $self = {%params}; - bless $self, $class; - $self->initialize(); - return $self; -} - -sub initialize { - my $self = shift; - $self->{-file} ||= 'unknown'; - $self->{-start} ||= 'unknown'; - $self->{-indent} ||= 4; # perlpod: "should be the default" - $self->{_items} = []; - $self->{-type} ||= ''; -} - -=item $list-E<gt>file() - -Without argument, retrieves the file name the list is in. This must -have been set before by either specifying B<-file> in the B<new()> -method or by calling the B<file()> method with a scalar argument. - -=cut - -# The POD file name the list appears in -sub file { - return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; -} - -=item $list-E<gt>start() - -Without argument, retrieves the line number where the list started. -This must have been set before by either specifying B<-start> in the -B<new()> method or by calling the B<start()> method with a scalar -argument. - -=cut - -# The line in the file the node appears -sub start { - return (@_ > 1) ? ($_[0]->{-start} = $_[1]) : $_[0]->{-start}; -} - -=item $list-E<gt>indent() - -Without argument, retrieves the indent level of the list as specified -in C<=over n>. This must have been set before by either specifying -B<-indent> in the B<new()> method or by calling the B<indent()> method -with a scalar argument. - -=cut - -# indent level -sub indent { - return (@_ > 1) ? ($_[0]->{-indent} = $_[1]) : $_[0]->{-indent}; -} - -=item $list-E<gt>type() - -Without argument, retrieves the list type, which can be an arbitrary value, -e.g. C<OL>, C<UL>, ... when thinking the HTML way. -This must have been set before by either specifying -B<-type> in the B<new()> method or by calling the B<type()> method -with a scalar argument. - -=cut - -# The type of the list (UL, OL, ...) -sub type { - return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type}; -} - -=item $list-E<gt>rx() - -Without argument, retrieves a regular expression for simplifying the -individual item strings once the list type has been determined. Usage: -E.g. when converting to HTML, one might strip the leading number in -an ordered list as C<E<lt>OLE<gt>> already prints numbers itself. -This must have been set before by either specifying -B<-rx> in the B<new()> method or by calling the B<rx()> method -with a scalar argument. - -=cut - -# The regular expression to simplify the items -sub rx { - return (@_ > 1) ? ($_[0]->{-rx} = $_[1]) : $_[0]->{-rx}; -} - -=item $list-E<gt>item() - -Without argument, retrieves the array of the items in this list. -The items may be represented by any scalar. -If an argument has been given, it is pushed on the list of items. - -=cut - -# The individual =items of this list -sub item { - my ($self,$item) = @_; - if(defined $item) { - push(@{$self->{_items}}, $item); - return $item; - } - else { - return @{$self->{_items}}; - } -} - -=item $list-E<gt>parent() - -Without argument, retrieves information about the parent holding this -list, which is represented as an arbitrary scalar. -This must have been set before by either specifying -B<-parent> in the B<new()> method or by calling the B<parent()> method -with a scalar argument. - -=cut - -# possibility for parsers/translators to store information about the -# lists's parent object -sub parent { - return (@_ > 1) ? ($_[0]->{-parent} = $_[1]) : $_[0]->{-parent}; -} - -=item $list-E<gt>tag() - -Without argument, retrieves information about the list tag, which can be -any scalar. -This must have been set before by either specifying -B<-tag> in the B<new()> method or by calling the B<tag()> method -with a scalar argument. - -=back - -=cut - -# possibility for parsers/translators to store information about the -# list's object -sub tag { - return (@_ > 1) ? ($_[0]->{-tag} = $_[1]) : $_[0]->{-tag}; -} - -#----------------------------------------------------------------------------- -# Pod::Hyperlink -# -# class to manipulate POD hyperlinks (L<>) -#----------------------------------------------------------------------------- - -package Pod::Hyperlink; - -=head2 Pod::Hyperlink - -B<Pod::Hyperlink> is a class for manipulation of POD hyperlinks. Usage: - - my $link = Pod::Hyperlink->new('alternative text|page/"section in page"'); - -The B<Pod::Hyperlink> class is mainly designed to parse the contents of the -C<LE<lt>...E<gt>> sequence, providing a simple interface for accessing the -different parts of a POD hyperlink for further processing. It can also be -used to construct hyperlinks. - -=over 4 - -=item Pod::Hyperlink-E<gt>new() - -The B<new()> method can either be passed a set of key/value pairs or a single -scalar value, namely the contents of a C<LE<lt>...E<gt>> sequence. An object -of the class C<Pod::Hyperlink> is returned. The value C<undef> indicates a -failure, the error message is stored in C<$@>. - -=cut - -use Carp; - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = +{}; - bless $self, $class; - $self->initialize(); - if(defined $_[0]) { - if(ref($_[0])) { - # called with a list of parameters - %$self = %{$_[0]}; - $self->_construct_text(); - } - else { - # called with L<> contents - return unless($self->parse($_[0])); - } - } - return $self; -} - -sub initialize { - my $self = shift; - $self->{-line} ||= 'undef'; - $self->{-file} ||= 'undef'; - $self->{-page} ||= ''; - $self->{-node} ||= ''; - $self->{-alttext} ||= ''; - $self->{-type} ||= 'undef'; - $self->{_warnings} = []; -} - -=item $link-E<gt>parse($string) - -This method can be used to (re)parse a (new) hyperlink, i.e. the contents -of a C<LE<lt>...E<gt>> sequence. The result is stored in the current object. -Warnings are stored in the B<warnings> property. -E.g. sections like C<LE<lt>open(2)E<gt>> are deprecated, as they do not point -to Perl documents. C<LE<lt>DBI::foo(3p)E<gt>> is wrong as well, the manpage -section can simply be dropped. - -=cut - -sub parse { - my $self = shift; - local($_) = $_[0]; - # syntax check the link and extract destination - my ($alttext,$page,$node,$type,$quoted) = (undef,'','','',0); - - $self->{_warnings} = []; - - # collapse newlines with whitespace - s/\s*\n+\s*/ /g; - - # strip leading/trailing whitespace - if(s/^[\s\n]+//) { - $self->warning('ignoring leading whitespace in link'); - } - if(s/[\s\n]+$//) { - $self->warning('ignoring trailing whitespace in link'); - } - unless(length($_)) { - _invalid_link('empty link'); - return; - } - - ## Check for different possibilities. This is tedious and error-prone - # we match all possibilities (alttext, page, section/item) - #warn "DEBUG: link=$_\n"; - - # only page - # problem: a lot of people use (), or (1) or the like to indicate - # man page sections. But this collides with L<func()> that is supposed - # to point to an internal funtion... - my $page_rx = '[\w.-]+(?:::[\w.-]+)*(?:[(](?:\d\w*|)[)]|)'; - # page name only - if(/^($page_rx)$/o) { - $page = $1; - $type = 'page'; - } - # alttext, page and "section" - elsif(m{^(.*?)\s*[|]\s*($page_rx)\s*/\s*"(.+)"$}o) { - ($alttext, $page, $node) = ($1, $2, $3); - $type = 'section'; - $quoted = 1; #... therefore | and / are allowed - } - # alttext and page - elsif(/^(.*?)\s*[|]\s*($page_rx)$/o) { - ($alttext, $page) = ($1, $2); - $type = 'page'; - } - # alttext and "section" - elsif(m{^(.*?)\s*[|]\s*(?:/\s*|)"(.+)"$}) { - ($alttext, $node) = ($1,$2); - $type = 'section'; - $quoted = 1; - } - # page and "section" - elsif(m{^($page_rx)\s*/\s*"(.+)"$}o) { - ($page, $node) = ($1, $2); - $type = 'section'; - $quoted = 1; - } - # page and item - elsif(m{^($page_rx)\s*/\s*(.+)$}o) { - ($page, $node) = ($1, $2); - $type = 'item'; - } - # only "section" - elsif(m{^/?"(.+)"$}) { - $node = $1; - $type = 'section'; - $quoted = 1; - } - # only item - elsif(m{^\s*/(.+)$}) { - $node = $1; - $type = 'item'; - } - - # non-standard: Hyperlink with alt-text - doesn't remove protocol prefix, maybe it should? - elsif(/^ \s* (.*?) \s* [|] \s* (\w+:[^:\s] [^\s|]*?) \s* $/ix) { - ($alttext,$node) = ($1,$2); - $type = 'hyperlink'; - } - - # non-standard: Hyperlink - elsif(/^(\w+:[^:\s]\S*)$/i) { - $node = $1; - $type = 'hyperlink'; - } - # alttext, page and item - elsif(m{^(.*?)\s*[|]\s*($page_rx)\s*/\s*(.+)$}o) { - ($alttext, $page, $node) = ($1, $2, $3); - $type = 'item'; - } - # alttext and item - elsif(m{^(.*?)\s*[|]\s*/(.+)$}) { - ($alttext, $node) = ($1,$2); - } - # must be an item or a "malformed" section (without "") - else { - $node = $_; - $type = 'item'; - } - # collapse whitespace in nodes - $node =~ s/\s+/ /gs; - - # empty alternative text expands to node name - if(defined $alttext) { - if(!length($alttext)) { - $alttext = $node || $page; - } - } - else { - $alttext = ''; - } - - if($page =~ /[(]\w*[)]$/) { - $self->warning("(section) in '$page' deprecated"); - } - if(!$quoted && $node =~ m{[|/]} && $type ne 'hyperlink') { - $self->warning("node '$node' contains non-escaped | or /"); - } - if($alttext =~ m{[|/]}) { - $self->warning("alternative text '$node' contains non-escaped | or /"); - } - $self->{-page} = $page; - $self->{-node} = $node; - $self->{-alttext} = $alttext; - #warn "DEBUG: page=$page section=$section item=$item alttext=$alttext\n"; - $self->{-type} = $type; - $self->_construct_text(); - 1; -} - -sub _construct_text { - my $self = shift; - my $alttext = $self->alttext(); - my $type = $self->type(); - my $section = $self->node(); - my $page = $self->page(); - my $page_ext = ''; - $page =~ s/([(]\w*[)])$// && ($page_ext = $1); - if($alttext) { - $self->{_text} = $alttext; - } - elsif($type eq 'hyperlink') { - $self->{_text} = $section; - } - else { - $self->{_text} = ($section || '') . - (($page && $section) ? ' in ' : '') . - "$page$page_ext"; - } - # for being marked up later - # use the non-standard markers P<> and Q<>, so that the resulting - # text can be parsed by the translators. It's their job to put - # the correct hypertext around the linktext - if($alttext) { - $self->{_markup} = "Q<$alttext>"; - } - elsif($type eq 'hyperlink') { - $self->{_markup} = "Q<$section>"; - } - else { - $self->{_markup} = (!$section ? '' : "Q<$section>") . - ($page ? ($section ? ' in ':'') . "P<$page>$page_ext" : ''); - } -} - -=item $link-E<gt>markup($string) - -Set/retrieve the textual value of the link. This string contains special -markers C<PE<lt>E<gt>> and C<QE<lt>E<gt>> that should be expanded by the -translator's interior sequence expansion engine to the -formatter-specific code to highlight/activate the hyperlink. The details -have to be implemented in the translator. - -=cut - -#' retrieve/set markuped text -sub markup { - return (@_ > 1) ? ($_[0]->{_markup} = $_[1]) : $_[0]->{_markup}; -} - -=item $link-E<gt>text() - -This method returns the textual representation of the hyperlink as above, -but without markers (read only). Depending on the link type this is one of -the following alternatives (the + and * denote the portions of the text -that are marked up): - - +perl+ L<perl> - *$|* in +perlvar+ L<perlvar/$|> - *OPTIONS* in +perldoc+ L<perldoc/"OPTIONS"> - *DESCRIPTION* L<"DESCRIPTION"> - -=cut - -# The complete link's text -sub text { - return $_[0]->{_text}; -} - -=item $link-E<gt>warning() - -After parsing, this method returns any warnings encountered during the -parsing process. - -=cut - -# Set/retrieve warnings -sub warning { - my $self = shift; - if(@_) { - push(@{$self->{_warnings}}, @_); - return @_; - } - return @{$self->{_warnings}}; -} - -=item $link-E<gt>file() - -=item $link-E<gt>line() - -Just simple slots for storing information about the line and the file -the link was encountered in. Has to be filled in manually. - -=cut - -# The line in the file the link appears -sub line { - return (@_ > 1) ? ($_[0]->{-line} = $_[1]) : $_[0]->{-line}; -} - -# The POD file name the link appears in -sub file { - return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; -} - -=item $link-E<gt>page() - -This method sets or returns the POD page this link points to. - -=cut - -# The POD page the link appears on -sub page { - if (@_ > 1) { - $_[0]->{-page} = $_[1]; - $_[0]->_construct_text(); - } - return $_[0]->{-page}; -} - -=item $link-E<gt>node() - -As above, but the destination node text of the link. - -=cut - -# The link destination -sub node { - if (@_ > 1) { - $_[0]->{-node} = $_[1]; - $_[0]->_construct_text(); - } - return $_[0]->{-node}; -} - -=item $link-E<gt>alttext() - -Sets or returns an alternative text specified in the link. - -=cut - -# Potential alternative text -sub alttext { - if (@_ > 1) { - $_[0]->{-alttext} = $_[1]; - $_[0]->_construct_text(); - } - return $_[0]->{-alttext}; -} - -=item $link-E<gt>type() - -The node type, either C<section> or C<item>. As an unofficial type, -there is also C<hyperlink>, derived from e.g. C<LE<lt>http://perl.comE<gt>> - -=cut - -# The type: item or headn -sub type { - return (@_ > 1) ? ($_[0]->{-type} = $_[1]) : $_[0]->{-type}; -} - -=item $link-E<gt>link() - -Returns the link as contents of C<LE<lt>E<gt>>. Reciprocal to B<parse()>. - -=back - -=cut - -# The link itself -sub link { - my $self = shift; - my $link = $self->page() || ''; - if($self->node()) { - my $node = $self->node(); - $node =~ s/\|/E<verbar>/g; - $node =~ s{/}{E<sol>}g; - if($self->type() eq 'section') { - $link .= ($link ? '/' : '') . '"' . $node . '"'; - } - elsif($self->type() eq 'hyperlink') { - $link = $self->node(); - } - else { # item - $link .= '/' . $node; - } - } - if($self->alttext()) { - my $text = $self->alttext(); - $text =~ s/\|/E<verbar>/g; - $text =~ s{/}{E<sol>}g; - $link = "$text|$link"; - } - return $link; -} - -sub _invalid_link { - my ($msg) = @_; - # this sets @_ - #eval { die "$msg\n" }; - #chomp $@; - $@ = $msg; # this seems to work, too! - return; -} - -#----------------------------------------------------------------------------- -# Pod::Cache -# -# class to hold POD page details -#----------------------------------------------------------------------------- - -package Pod::Cache; - -=head2 Pod::Cache - -B<Pod::Cache> holds information about a set of POD documents, -especially the nodes for hyperlinks. -The following methods are available: - -=over 4 - -=item Pod::Cache-E<gt>new() - -Create a new cache object. This object can hold an arbitrary number of -POD documents of class Pod::Cache::Item. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = []; - bless $self, $class; - return $self; -} - -=item $cache-E<gt>item() - -Add a new item to the cache. Without arguments, this method returns a -list of all cache elements. - -=cut - -sub item { - my ($self,%param) = @_; - if(%param) { - my $item = Pod::Cache::Item->new(%param); - push(@$self, $item); - return $item; - } - else { - return @{$self}; - } -} - -=item $cache-E<gt>find_page($name) - -Look for a POD document named C<$name> in the cache. Returns the -reference to the corresponding Pod::Cache::Item object or undef if -not found. - -=back - -=cut - -sub find_page { - my ($self,$page) = @_; - foreach(@$self) { - if($_->page() eq $page) { - return $_; - } - } - return; -} - -package Pod::Cache::Item; - -=head2 Pod::Cache::Item - -B<Pod::Cache::Item> holds information about individual POD documents, -that can be grouped in a Pod::Cache object. -It is intended to hold information about the hyperlink nodes of POD -documents. -The following methods are available: - -=over 4 - -=item Pod::Cache::Item-E<gt>new() - -Create a new object. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my %params = @_; - my $self = {%params}; - bless $self, $class; - $self->initialize(); - return $self; -} - -sub initialize { - my $self = shift; - $self->{-nodes} = [] unless(defined $self->{-nodes}); -} - -=item $cacheitem-E<gt>page() - -Set/retrieve the POD document name (e.g. "Pod::Parser"). - -=cut - -# The POD page -sub page { - return (@_ > 1) ? ($_[0]->{-page} = $_[1]) : $_[0]->{-page}; -} - -=item $cacheitem-E<gt>description() - -Set/retrieve the POD short description as found in the C<=head1 NAME> -section. - -=cut - -# The POD description, taken out of NAME if present -sub description { - return (@_ > 1) ? ($_[0]->{-description} = $_[1]) : $_[0]->{-description}; -} - -=item $cacheitem-E<gt>path() - -Set/retrieve the POD file storage path. - -=cut - -# The file path -sub path { - return (@_ > 1) ? ($_[0]->{-path} = $_[1]) : $_[0]->{-path}; -} - -=item $cacheitem-E<gt>file() - -Set/retrieve the POD file name. - -=cut - -# The POD file name -sub file { - return (@_ > 1) ? ($_[0]->{-file} = $_[1]) : $_[0]->{-file}; -} - -=item $cacheitem-E<gt>nodes() - -Add a node (or a list of nodes) to the document's node list. Note that -the order is kept, i.e. start with the first node and end with the last. -If no argument is given, the current list of nodes is returned in the -same order the nodes have been added. -A node can be any scalar, but usually is a pair of node string and -unique id for the C<find_node> method to work correctly. - -=cut - -# The POD nodes -sub nodes { - my ($self,@nodes) = @_; - if(@nodes) { - push(@{$self->{-nodes}}, @nodes); - return @nodes; - } - else { - return @{$self->{-nodes}}; - } -} - -=item $cacheitem-E<gt>find_node($name) - -Look for a node or index entry named C<$name> in the object. -Returns the unique id of the node (i.e. the second element of the array -stored in the node array) or undef if not found. - -=cut - -sub find_node { - my ($self,$node) = @_; - my @search; - push(@search, @{$self->{-nodes}}) if($self->{-nodes}); - push(@search, @{$self->{-idx}}) if($self->{-idx}); - foreach(@search) { - if($_->[0] eq $node) { - return $_->[1]; # id - } - } - return; -} - -=item $cacheitem-E<gt>idx() - -Add an index entry (or a list of them) to the document's index list. Note that -the order is kept, i.e. start with the first node and end with the last. -If no argument is given, the current list of index entries is returned in the -same order the entries have been added. -An index entry can be any scalar, but usually is a pair of string and -unique id. - -=back - -=cut - -# The POD index entries -sub idx { - my ($self,@idx) = @_; - if(@idx) { - push(@{$self->{-idx}}, @idx); - return @idx; - } - else { - return @{$self->{-idx}}; - } -} - -=head1 AUTHOR - -Please report bugs using L<http://rt.cpan.org>. - -Marek Rouchal E<lt>marekr@cpan.orgE<gt>, borrowing -a lot of things from L<pod2man> and L<pod2roff> as well as other POD -processing tools by Tom Christiansen, Brad Appleton and Russ Allbery. - -=head1 SEE ALSO - -L<pod2man>, L<pod2roff>, L<Pod::Parser>, L<Pod::Checker>, -L<pod2html> - -=cut - -1; diff --git a/src/src/rateup.c b/src/rateup.c index 0141000..0141000 100644 --- a/src/src/rateup.c +++ b/src/rateup.c diff --git a/src/src/strftime.c b/src/strftime.c index f349bbf..f349bbf 100644 --- a/src/src/strftime.c +++ b/src/strftime.c diff --git a/src/src/strftime.h b/src/strftime.h index 44da0ea..44da0ea 100644 --- a/src/src/strftime.h +++ b/src/strftime.h diff --git a/templates/cisco/host-cisco.tmpl b/templates/cisco/host-cisco.tmpl deleted file mode 100644 index 0f7afc1..0000000 --- a/templates/cisco/host-cisco.tmpl +++ /dev/null @@ -1,67 +0,0 @@ -# Author: Tobias Oetiker <tobi@oetiker.ch> -# Date: 2006-09-06 -# Purpose: Add some Box Graphs for Cisco devices - -$head_lines .= <<ECHO; -#--------------------------------------------------------------------- -ECHO - -# - -my $cpu_oid = oid_pick($router_connect,$v3opt,"1.3.6.1.4.1.9.2.1.58.0","1.3.6.1.4.1.9.9.109.1.1.1.1.3.9"); -if ($cpu_oid){ - my $target_name = $router_name . ".cpu"; - my $dir = ''; - $dir = "Directory[$target_name]: $directory_name" if $directory_name; - $target_lines .= <<ECHO; - -$dir -YLegend[$target_name]: CPU use in % -ShortLegend[$target_name]: % -Legend1[$target_name]: CPU use in % -Legend3[$target_name]: Max Observed CPU use -LegendI[$target_name]: CPU use: -WithPeak[$target_name]: ywm -MaxBytes[$target_name]: 100 -Options[$target_name]: growright, gauge, nopercent, noo -Title[$target_name]: $sysname CPU usage -Target[$target_name]: $cpu_oid&PseudoZero:$router_connect -PageTop[$target_name]: <h1>$sysname CPU use</h1> - <div><table> - <tr><td>System:</td> <td>$sysname in $html_syslocation</td></tr> - <tr><td>Maintainer:</td> <td>$html_syscontact</td></tr> - <tr><td>Description:</td><td>$html_sysdescr</td></tr> - <tr><td>Resource:</td> <td>5 Minute Average CPU busy ($cpu_oid)</td></tr> - </table></div> -ECHO -} - -my $mem_oid = oid_pick($router_connect,$v3opt,"1.3.6.1.4.1.9.2.1.8.0","1.3.6.1.4.1.9.9.48.1.1.1.6.1"); -if ($mem_oid) { - my $target_name = $router_name . ".mem"; - my $dir = ''; - $dir = "Directory[$target_name]: $directory_name" if $directory_name; - $target_lines .= <<ECHO; - -$dir -YLegend[$target_name]: Free Memory -ShortLegend[$target_name]: Bytes -Legend1[$target_name]: Free Memory -Legend3[$target_name]: Max Free Memory -LegendI[$target_name]: Free Memory: -WithPeak[$target_name]: ywm -MaxBytes[$target_name]: 10000000000 -Options[$target_name]: growright, gauge, nopercent, noo -Title[$target_name]: $sysname Free Memory -Target[$target_name]: $mem_oid&PseudoZero:$router_connect -PageTop[$target_name]: <h1>$sysname Free Memory</h1> - <div><table> - <tr><td>System:</td> <td>$sysname in $html_syslocation</td></tr> - <tr><td>Maintainer:</td> <td>$html_syscontact</td></tr> - <tr><td>Description:</td><td>$html_sysdescr</td></tr> - <tr><td>Resource:</td> <td>Free CPU Pool Memory ($mem_oid)</td></tr> - </table></div> -ECHO - -} - diff --git a/templates/generic/if-errors.tmpl b/templates/generic/if-errors.tmpl deleted file mode 100644 index 576274b..0000000 --- a/templates/generic/if-errors.tmpl +++ /dev/null @@ -1,37 +0,0 @@ -# Author: Tobias Oetiker <tobi@oetiker.ch> -# Date: 2006-09-06 -# Purpose: Add an Error graph for each Traffic Graph - - -#if($if_ok) { #we are only interested in 'running' interfaces - - my $el = $default_target_lines; - $el =~ s/^(Target\S+:\s+).+/${1}ifInErrors$if_ref&ifOutErrors$if_ref:$router_connect/m; # Error Target - $el =~ s/^([^\s\]]+)/${1}.error/gm; # Filename for error log and graphs - $el =~ s|</h1>| - Errors</h1>|i; - $el =~ s|^(Title\[.+)|$1 - Errors|mi; - $el =~ s/Traffic/Error/; - $el =~ s/^(MaxBytes)(\S+)\s+\d+/$1$2 10000/m; # more than 10'000 errors a second are BIG trouble anyway - $el .= <<LEGEND; -YLegend$2 Errors per Minute -ShortLegend$2 e/min -Legend1$2 Incoming Errors per Minute -Legend2$2 Outgoing Errors per Minute -Legend3$2 Maximal 5 Minute Incoming Minute -Legend4$2 Maximal 5 Minute Outgoing Minute -LegendI$2 In: -LegendO$2 Out: -Options$2 perminute -LEGEND - - $target_lines = $default_target_lines."\n"; - if (oid_pick($router_connect,$v3opt,"ifInErrors.$if_index") and oid_pick($router_connect,$v3opt,"ifOutErrors.$if_index")){ - $target_lines .= $el; - } - $target_lines =~ s{<tr>\s+<td>(.+?)</td>\s+<td>(.+?)</td>\s*</tr>}{<tr><td>$1</td>\t<td>$2</td></tr>}g; -#} else { -# $head_lines=""; -# $problem_lines=""; -# $target_lines=""; -# $separator_lines=""; -#} diff --git a/src/translate/README b/translate/README index c16f457..c16f457 100644 --- a/src/translate/README +++ b/translate/README diff --git a/src/translate/belarusian.pmd b/translate/belarusian.pmd index c8314bb..c8314bb 100644 --- a/src/translate/belarusian.pmd +++ b/translate/belarusian.pmd diff --git a/src/translate/big5.pmd b/translate/big5.pmd index 8138d6b..8138d6b 100644 --- a/src/translate/big5.pmd +++ b/translate/big5.pmd diff --git a/src/translate/brazilian.pmd b/translate/brazilian.pmd index b557a2a..b557a2a 100644 --- a/src/translate/brazilian.pmd +++ b/translate/brazilian.pmd diff --git a/src/translate/bulgarian.pmd b/translate/bulgarian.pmd index 4005aac..4005aac 100644 --- a/src/translate/bulgarian.pmd +++ b/translate/bulgarian.pmd diff --git a/src/translate/catalan.pmd b/translate/catalan.pmd index e83ab6e..e83ab6e 100644 --- a/src/translate/catalan.pmd +++ b/translate/catalan.pmd diff --git a/src/translate/chinese.pmd b/translate/chinese.pmd index e462e29..e462e29 100644 --- a/src/translate/chinese.pmd +++ b/translate/chinese.pmd diff --git a/src/translate/cn.pmd b/translate/cn.pmd index 0f1b163..0f1b163 100644 --- a/src/translate/cn.pmd +++ b/translate/cn.pmd diff --git a/src/translate/croatian.pmd b/translate/croatian.pmd index de5e98b..de5e98b 100644 --- a/src/translate/croatian.pmd +++ b/translate/croatian.pmd diff --git a/src/translate/czech.pmd b/translate/czech.pmd index 13c4380..13c4380 100644 --- a/src/translate/czech.pmd +++ b/translate/czech.pmd diff --git a/src/translate/czechutf8.pmd b/translate/czechutf8.pmd index d4d9f71..d4d9f71 100644 --- a/src/translate/czechutf8.pmd +++ b/translate/czechutf8.pmd diff --git a/src/translate/danish.pmd b/translate/danish.pmd index cec9aa3..cec9aa3 100644 --- a/src/translate/danish.pmd +++ b/translate/danish.pmd diff --git a/src/translate/dutch.pmd b/translate/dutch.pmd index b2a4376..b2a4376 100644 --- a/src/translate/dutch.pmd +++ b/translate/dutch.pmd diff --git a/src/translate/estonian.pmd b/translate/estonian.pmd index 048e2b7..048e2b7 100644 --- a/src/translate/estonian.pmd +++ b/translate/estonian.pmd diff --git a/src/translate/eucjp.pmd b/translate/eucjp.pmd index c250d36..c250d36 100644 --- a/src/translate/eucjp.pmd +++ b/translate/eucjp.pmd diff --git a/src/translate/finnish.pmd b/translate/finnish.pmd index d6d6b0c..d6d6b0c 100644 --- a/src/translate/finnish.pmd +++ b/translate/finnish.pmd diff --git a/src/translate/fixer b/translate/fixer index b666a9d..b666a9d 100644 --- a/src/translate/fixer +++ b/translate/fixer diff --git a/src/translate/french.pmd b/translate/french.pmd index 4a4b00d..4a4b00d 100644 --- a/src/translate/french.pmd +++ b/translate/french.pmd diff --git a/src/translate/galician.pmd b/translate/galician.pmd index 4952be8..4952be8 100644 --- a/src/translate/galician.pmd +++ b/translate/galician.pmd diff --git a/src/translate/gb.pmd b/translate/gb.pmd index c40d44b..c40d44b 100644 --- a/src/translate/gb.pmd +++ b/translate/gb.pmd diff --git a/src/translate/gb2312.pmd b/translate/gb2312.pmd index 2892cb4..2892cb4 100644 --- a/src/translate/gb2312.pmd +++ b/translate/gb2312.pmd diff --git a/src/translate/german.pmd b/translate/german.pmd index 7cb8a4b..7cb8a4b 100644 --- a/src/translate/german.pmd +++ b/translate/german.pmd diff --git a/src/translate/german.pmd.backup b/translate/german.pmd.backup index e6343ae..e6343ae 100644 --- a/src/translate/german.pmd.backup +++ b/translate/german.pmd.backup diff --git a/src/translate/greek.pmd b/translate/greek.pmd index ad29fad..ad29fad 100644 --- a/src/translate/greek.pmd +++ b/translate/greek.pmd diff --git a/src/translate/hungarian.pmd b/translate/hungarian.pmd index 181f606..181f606 100644 --- a/src/translate/hungarian.pmd +++ b/translate/hungarian.pmd diff --git a/src/translate/icelandic.pmd b/translate/icelandic.pmd index ee031ff..ee031ff 100644 --- a/src/translate/icelandic.pmd +++ b/translate/icelandic.pmd diff --git a/src/translate/indonesia.pmd b/translate/indonesia.pmd index 4bc7d52..4bc7d52 100644 --- a/src/translate/indonesia.pmd +++ b/translate/indonesia.pmd diff --git a/src/translate/iso2022jp.pmd b/translate/iso2022jp.pmd index ceda2cf..ceda2cf 100644 --- a/src/translate/iso2022jp.pmd +++ b/translate/iso2022jp.pmd diff --git a/src/translate/italian.pmd b/translate/italian.pmd index fbcea90..fbcea90 100644 --- a/src/translate/italian.pmd +++ b/translate/italian.pmd diff --git a/src/translate/korean.pmd b/translate/korean.pmd index 6bfa49f..6bfa49f 100644 --- a/src/translate/korean.pmd +++ b/translate/korean.pmd diff --git a/src/translate/lithuanian.pmd b/translate/lithuanian.pmd index 44d055d..44d055d 100644 --- a/src/translate/lithuanian.pmd +++ b/translate/lithuanian.pmd diff --git a/src/translate/locales_mrtg.pm b/translate/locales_mrtg.pm index 7b2477f..7b2477f 100644 --- a/src/translate/locales_mrtg.pm +++ b/translate/locales_mrtg.pm diff --git a/src/translate/macedonian.pmd b/translate/macedonian.pmd index 47aa9a4..47aa9a4 100644 --- a/src/translate/macedonian.pmd +++ b/translate/macedonian.pmd diff --git a/src/translate/malay.pmd b/translate/malay.pmd index 3c1ed48..3c1ed48 100644 --- a/src/translate/malay.pmd +++ b/translate/malay.pmd diff --git a/src/translate/mergelocale.pl b/translate/mergelocale.pl index ddd0720..ddd0720 100755 --- a/src/translate/mergelocale.pl +++ b/translate/mergelocale.pl diff --git a/src/translate/norwegian.pmd b/translate/norwegian.pmd index 962415e..962415e 100644 --- a/src/translate/norwegian.pmd +++ b/translate/norwegian.pmd diff --git a/src/translate/polish.pmd b/translate/polish.pmd index 611dcdf..611dcdf 100644 --- a/src/translate/polish.pmd +++ b/translate/polish.pmd diff --git a/src/translate/portuguese.pmd b/translate/portuguese.pmd index b19455f..b19455f 100644 --- a/src/translate/portuguese.pmd +++ b/translate/portuguese.pmd diff --git a/src/translate/romanian.pmd b/translate/romanian.pmd index 39e5cdf..39e5cdf 100644 --- a/src/translate/romanian.pmd +++ b/translate/romanian.pmd diff --git a/src/translate/russian.pmd b/translate/russian.pmd index 1b1bdc4..1b1bdc4 100644 --- a/src/translate/russian.pmd +++ b/translate/russian.pmd diff --git a/src/translate/russian1251.pmd b/translate/russian1251.pmd index 678437f..678437f 100644 --- a/src/translate/russian1251.pmd +++ b/translate/russian1251.pmd diff --git a/src/translate/serbian.pmd b/translate/serbian.pmd index 40ffeca..40ffeca 100644 --- a/src/translate/serbian.pmd +++ b/translate/serbian.pmd diff --git a/src/translate/skeleton.pm0 b/translate/skeleton.pm0 index 95e2a1a..95e2a1a 100644 --- a/src/translate/skeleton.pm0 +++ b/translate/skeleton.pm0 diff --git a/src/translate/slovak.pmd b/translate/slovak.pmd index 89bb886..89bb886 100644 --- a/src/translate/slovak.pmd +++ b/translate/slovak.pmd diff --git a/src/translate/slovenian.pmd b/translate/slovenian.pmd index 0af8334..0af8334 100644 --- a/src/translate/slovenian.pmd +++ b/translate/slovenian.pmd diff --git a/src/translate/spanish.pmd b/translate/spanish.pmd index d0a6b1a..d0a6b1a 100644 --- a/src/translate/spanish.pmd +++ b/translate/spanish.pmd diff --git a/src/translate/swedish.pmd b/translate/swedish.pmd index 75047c4..75047c4 100644 --- a/src/translate/swedish.pmd +++ b/translate/swedish.pmd diff --git a/src/translate/turkish.pmd b/translate/turkish.pmd index 75cd80f..75cd80f 100644 --- a/src/translate/turkish.pmd +++ b/translate/turkish.pmd diff --git a/src/translate/ukrainian.pmd b/translate/ukrainian.pmd index ff73d3d..ff73d3d 100644 --- a/src/translate/ukrainian.pmd +++ b/translate/ukrainian.pmd diff --git a/src/translate/ukrainian1251.pmd b/translate/ukrainian1251.pmd index 70546d8..70546d8 100644 --- a/src/translate/ukrainian1251.pmd +++ b/translate/ukrainian1251.pmd diff --git a/web/.gitignore b/web/.gitignore deleted file mode 100644 index d2ec122..0000000 --- a/web/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.var -*.en.html -*.tmp -*.pod
\ No newline at end of file diff --git a/web/.htaccess b/web/.htaccess deleted file mode 100644 index 8d5d297..0000000 --- a/web/.htaccess +++ /dev/null @@ -1,25 +0,0 @@ -DirectoryIndex index.en.html index.html -ErrorDocument 404 http://oss.oetiker.ch/mrtg/404.en.html -RewriteEngine On -RewriteRule mrtg.html http://oss.oetiker.ch/mrtg/ [R=301,L] -RewriteRule index.html http://oss.oetiker.ch/mrtg/ [R=301,L] -RewriteRule reference.html http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html [R=301,L] -RewriteRule mrtg-nt-guide.html http://oss.oetiker.ch/mrtg/doc/mrtg-nt-guide.en.html [R=301,L] -RewriteRule cfgmaker.html http://oss.oetiker.ch/mrtg/doc/cfgmaker.en.html [R=301,L] -RewriteRule unix-guide.html http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html [R=301,L] -RewriteRule mrtg-unix-guide.html http://oss.oetiker.ch/mrtg/doc/mrtg-unix-guide.en.html [R=301,L] -RewriteRule links.html http://oss.oetiker.ch/mrtg/3party.en.html [R=301,L] -RewriteRule mrtg-rrd.html http://oss.oetiker.ch/mrtg/doc/mrtg-rrd.en.html [R=301,L] -RewriteRule users.html http://people.ee.ethz.ch/~oetiker/webtools/mrtg-trac/wiki/MrtgUsers [R=302,L] -RewriteRule compat.html http://people.ee.ethz.ch/~oetiker/webtools/mrtg-trac/wiki/MrtgCompat [R=302,L] -#RewriteRule pub(/.*) http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub$1 [R=302,L] -#RewriteRule pub$ http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/ [R=302,L] -# for some reason there are odd requests sometimes -RewriteRule http:/([^/].*) http://$1 [R=301,L] -<FilesMatch ".htaccess"> - Order Allow,Deny - Allow From All -</FilesMatch> -<FilesMatch "mirror.html"> - SetHandler cgi-script -</FilesMatch> diff --git a/web/.wmkrc b/web/.wmkrc deleted file mode 100755 index 9600053..0000000 --- a/web/.wmkrc +++ /dev/null @@ -1,3 +0,0 @@ --o LANG_VAR:%BASE.var --o (ALL-LANG_*)+LANG_EN:%BASE.en.html@ug+x -#-o (ALL-LANG_*)+LANG_DE:%BASE.de.html@ug+x diff --git a/web/.wmlrc b/web/.wmlrc deleted file mode 100755 index 5643506..0000000 --- a/web/.wmlrc +++ /dev/null @@ -1,17 +0,0 @@ --DROOT~. - -############################### -# Language setup --DLANGS="en" - -############################### - -#-I/home/eedesign/public_html -# last has priority --I. - --E $(ROOT)/bin/htmlfix.sh --P $(ROOT)/bin/headfix.pl - -# tune mp4h behaviour (expansion 0 means complain about everything) --W "2,--expansion=0" diff --git a/web/192.33.92.249_fa4_1-day.png b/web/192.33.92.249_fa4_1-day.png Binary files differdeleted file mode 100644 index faea063..0000000 --- a/web/192.33.92.249_fa4_1-day.png +++ /dev/null diff --git a/web/3party.wml b/web/3party.wml deleted file mode 100644 index f1110b6..0000000 --- a/web/3party.wml +++ /dev/null @@ -1,228 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "3party"> - - <h1>MRTG Companion Sites</h1> - - <p>If you have a new URL for this page, please drop <a href="mailto:oetiker@ee.ethz.ch">me a note</a> with the relevant Information.</p> - - <h2>MRTG Comunities and Portals</h2> - - <ul> - <li><a href="http://www.steveshipway.org/cfgmaker">Steve Shipway's MRTG Template Library</a></li> - - <li><a href="http://www.plixer.com/support/mrtg_repository.php">Plixer MRTG Configuration Template Archive</a></li> - - <li><a href="http://howto.aphroland.org/HOWTO/MRTG">MRTG Howto Collection</a> by <a href="mailto:mrtg{at}aphroland.org">nate</a></li> - - <li><a href="http://fr.groups.yahoo.com/group/Reseaux-Supervision">French Language MRTG and RRDTOOL Mailinglist</a></li> - - <li><a href="http://www.wtcs.org/snmp4tpc/">Support web for SNMP, Windows NT, NetWare and MRTG</a> by Garth K. Williams.</li> - </ul> - - - <h2>Setup Instructions and Installer</h2> - <ul> - <li><a href="http://www.openxtra.co.uk/products/mrtg-xtra.htm">Prepackaged MRTG for windows</a> by OPENXTRA Limited</li> - - <li><a href="http://open-innovations.com/mrtgbundle.html">MRTG Bundle 2.0</a> a ready to run MRTG setup for Windows by <a href="mailto:chris{at}chrisdos.com">Chris Dos</a></li> - - <li><a href="http://www.darwinports.org/ports/?by=name&substr=mrtg">Installing MRTG on a Mac from darwinports.</a></li> - - <li><a href="http://www.seyhan.biz/dokuman/MRTG.pdf">Turkish MRTG documentation</a> by <a href="mailto:seyhan{at}hotmail.com">Seyhan Tekelioglu</a></li> - - <li><a href="http://www.persianadmins.com/site/articles/linux/install_and_config_mrtg.html">How to install and configure MRTG for Linux (in Farsi)</a> by <a href="mailto:reza{at}behroozi.info">Reza Behroozi</a></li> - - <li><a href=" http://www.murat.ws/mrtg-ve-cisco/">Setup Instructions for MRTG and CISCO (and USR9108) on Fedora 7 in Turkish</a> by <a href="mailto:murat{AT}murat.ws">Murat Ugur EMINOGLU</a></li> - - <li><a href="http://oss.oetiker.ch/mrtg/pub/contrib/MRTG_turkish_tutorial.pdf">Another Turkish MRTG tutorial</a> by <a href="mailto:celak{at}ttnet.net.tr">Celal Ünalp</a></li> - - <li><a href="http://www.eidenberger.com/mrtg/mrtgtut1.php">Implémenter Mrtg sur une plateforme Windows Nt/2k/2k3/Xp et son serveur web IIS</a> par <a href="mailto:Manuel{at}eidenberger.com">Manuel Eidenberger</a></li> - - <li><a href="http://linuxeiros.planetaclix.pt/software/mrtg.html">MRTG Install instructions in Portugese</a> par <a href="mailto:joaomiguelrebelo{at}clix.pt">João Rebelo</a></li> - - <li><a href="http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/">Setup MRTG with Red hat Enterprise Linux 3</a> by <a href="mailto:vivek{at}nixcraft.com">Vivek G Gite</a></li> - - <li><a href="http://www.netmon.org/">NetMon Website</a> by Jim Hunt. It is the home of the MRTG for Dummies tutorial</li> - - <li>MRTG on Linux setup instructions in <a href="http://www.linux-sottises.net/mrtg.php">French</a> and <a href="http://www.linux-sottises.net/en_mrtg.php">English</a> by TNK</li> - - <li><a href="http://www.debianhelp.co.uk/mrtg.htm">MRTG Configuration in Debian</a></li> - - <li><a href="http://www.geocities.com/rjayasin/RH7X-mrtg-howto.htm">MRTG Installation in 6 Steps for RH7X</a> by Ruwan Jayasinghe (rjayasin-at-lausd.k12.ca.us)</li> - - <li><a href="http://www.leh.net/~kevin/docs/mrtg/index_1.html">Tips for how mrtg can assist a NOC or Monitoring Center in first line troubleshooting</a> by <a href="mailto:kevin{at}leh.net">Kevin Howard</a></li> - - <li><a href="http://www.linuxtech.cc/article001.php">Building Linux Monitoring Portals with Open Source</a> by O'Neill, Donald</li> - </ul> - - <h2>Config Builders</h2> - <ul> - <li><a href="http://home.no.net/viggoeri/TorpXTG/">TorpX-TG</a> MRTG Configuration Frontend for Windows users by <a href="http://www.vman-software.tk/">Viggo Eriksen</a>.</li> - - <li><a href="http://projects.virtualflat.ch/mct/">MCT: MRTG Configuration Tool</a>. A PHP based frontend to configuring mrtg.</li> - - <li><a href="http://www.claridion.com/downloads/MRTGgui.htm">MRTG GUI - Rapid CFG Builder</a> a Windows GUI for the quick creation and maintainance of MRTG configuration files. <a href="mailto:salvatore.cimmino{at}claridion.com">Salvatore Cimmino</a></li> - - <li><a href="http://sourceforge.net/projects/mrtgconfig">Mrtg Config Generator</a> by <a href="mailto:DElder{at}novacoast.com">Dan Elder</a>.</li> - - <li><a href="http://sourceforge.net/projects/gnulsms2mrtg/">A mrtg config generator</a> supporting Allot NetEnforcer, Bluecoat/Cacheflow Security Products, Cyclades TS and ACS, Fortinet firewalls, Lucent LSMS / Brick firewalls, and any MIB2 device, Microsoft Windows 2000/XP/2003 by John Baker</li> - - <li><a href="http://savannah.gnu.org/projects/cfgstoragemk/">Cfgstoragemaker</a> can be used to generate a MRTG config file in order to graph all the storage devices (disk, memory and swap) of one or more specific host(s) via SNMP by <a href="mailto:cyril{at}bouthors.org">Cyril Bouthors</a></li> - - <li><a href="http://www.novell.chel.ru/start.php?dir=plugin/project/mrtgwebcfg&app=main&lng=english">MRTGWebCfg</a> a php based web frontend to mrtg with rrdtool by <a href="mailto:neo@chel.skbkontur.ru">Michael Grigorjev</a>.</li> - </ul> - - <h2>MRTG Add-Ons</h2> - <ul> - <li><a href="http://bangbangsoundslikemachinery.blogspot.com/2010/12/mrtg-percentile-calculation.html">Obtaining percentiles from MRTG Logs</a> Philip Damian-Grint has a solution.</li> - - <li><a href="http://mkmrtg.blogspot.com/">mkmrtg.sh</a> An easy way to see your stats; Designed for new and old users of MRTG by Joe McShinsky.</li> - - <li><a href="http://www.tenox.tc/out/#ttg">Little cli for queering a routers bandwith info live via snmp </a> by Antoni Sawicki</li> - - <li><a href="http://chuck.steel.googlepages.com/googlemodules">iGoogle module for mrtg</a> by <a href="http://chuck.steel.googlepages.com">Chuck Steel</a></li> - - <li><a href="http://ipsyn.net/projects/rotate_url/">Rotate MRTG graphs inside a single web browser session</a> by <a href="mailto:nstefani{at}ipsyn.net">Nicolas STEFANI</a></li> - - <li><a href="http://www.ronny-goerner.de/patch/">95%ile patch for MRTG-2.4.17</a> by <a href="mailto:support{at}pghosting.de">pgHosting</a></li> - - <li><a href="http://www.geocities.com/aisvc">MRTG-Central front end</a> by <a href="mailto:aisvc{at}yahoo.com">Mark Anderson</a></li> - - <li><a href="http://phpmrtgadmin.sourceforge.net">phpMrtgAdmin front end</a> by <a href="mailto:phpmrtgadmin{at}users.sourceforge.net">Ildar N. Shaimordanov</a></li> - - <li><a href="http://mrtgfe.sourceforge.net">MRTGFE --- builds a dynamic target index with php</a> by <a href="mailto:i_am_fishing{at}bigpond.com">Greg West</a></li> - - <li>Baer explains how to <a href="http://members.tik.com.au/mrtg/default.htm">setup mrtg, 14all and rrdtool on NT</a></li> - - <li><a href="http://www.steveshipway.org/software/">Frontend for the MRTG/RRDTOOL combo</a> by Steve Shipway. There is also a <a href="http://www.steveshipway.org/forum">support forum</a> for this on Steves site.</li> - - <li><a href="http://www.genis-x.com/launcher">Launcher</a> a free cron-like service for Windows NT/2k by <a href="mailto:adstar{at}genis-x.com">Adam Niedzwiedzki</a></li> - - <li><a href="http://www.geocities.com/mrtg_daemon">Windows users - A daemon that enables you to make changes to your MRTG scripts without having to end the Perl task</a>. This site also contains the Windows GUI script maker for MRTG (by <a href="mailto:david.sawyer{at}uk.mckhboc.com">David Sawyer)</a></li> - - <li><a href="http://www.loplop.net/projects/1minMRTG">How to patch MRTG w/ RRDTool to get 1 minute updates in the RRD databases and so on the graphs</a> by <a href="mailto:Nick{at}loplop.net">Nicolas Sayer</a></li> - - <li><a href="http://cmeik.gawble.net/mrtg/">A Very Customizable Perl MRTG Config Builder</a> by <a href="mailto:cmeik{at}gawble.net">Chris Meiklejohn</a></li> - - <li><a href="http://iserv.nl/traffic/totaal/">Analyze *.log files for monthly total</a> by <a href="mailto:Stimpy{at}iserv.nl">Seth Mos</a>.</li> - - <li><a href="http://www.netmail.kz/adgsoft/mrtg_lp.zip">Windows version of Seth's *.log analyzer</a> by <a href="mailto:noc{at}netmail.kz">Eugeny Hohlov</a>.</li> - - <li><a href="http://www.geocities.com/josef_wendel">Collects and outputs daily and monthly totals as html file with embedded png-graphic.</a> by <a href="mailto:josef.wendel{at}web.de">Josef Wendel</a>.</li> - - <li><a href="http://www.geocities.com/mrtgutil/">Script to collect and store the daily MRTG graph</a> by <a href="mailto:yijie_li{at}hotmail.com">Yijie Li</a>.</li> - - <li><a href="http://wizardsworks.org/GoofyTG/">Goofy TG</a> -- create a webpage with physical images of your network gear and get mrtg graphs by clicking on ports by <a href="mailto:chandleg{at}wizardsworks.org">Sir Ace</a></li> - - <li><a href="http://net-snmp.sourceforge.net/tutorial/tutorial-5/mrtg/index.html">The official word on using NET-SNMP with mrtg</a>. Net-SNMP is the <a href="http://net-snmp.sourceforge.net/">sourceforged</a> version of UCD-SNMP.</li> - - <li><a href="http://www.snert.com/Software/mod_watch/">mod_watch</a> an Apache to MRTG interface module that allows you to collect bytes in & out per virtual host or per file owner. by <a href="mailto:achowe{at}snert.com">Anthony Howe</a>.</li> - </ul> - - - - - <h2>Monitoring Special Devices and Applications</h2> - - <ul> - <li>Snippets on monitoring <a href="./pub/contrib/UPSAPC.txt">APC UPS</a>, <a href="./pub/contrib/EMUAPC.txt">APC EMU</a> and a <a href="./pub/contrib/ContivityNortel.txt"> Nortel Contivity VPN Router</a> with MRTG.</a> by Arkadiusz Nowicki</li> - - <li><a href="http://www.cluebyfour.org/~streiner/mrtg/fwsm.html">Cisco Firewall Service Modules (FWSMs) monitoring with MRTG.</a> by Justin M. Streiner</li> - - <li><a href="http://www.david-taylor.myby.co.uk/mrtg/daily_ntp.html">NTP Monitoring</a> by David J. Taylor</li> - - <li><a href="http://www.david-taylor.myby.co.uk/mrtg/Eumetcast.html">Satelite Signal Quality Monitoring</a> by David J. Taylor</li> - - <li><a href="http://www.timewind.se/rsyncmrtg/index_eng.html">Monitoring an Rsync Server</a> by Stefan Sundberg</li> - - <li><a href="http://alex.kruijff.org/FreeBSD/Traffic_Report.html">Monitoring FreeBSD IPFW with MRTG</a> by Alex de Kruijff</li> - - <li><a href="http://forge.novell.com/modules/xfmod/project/?mrtgext">MRTG Extensions for Netware</a> by <a href="mailto:drews{at}engr.wisc.edu">James Drews</a></li> - - <li><a href="http://www.castellan.net/mrtg.html">How to setup MRTG to monitor your windows servers</a> by Chris Willis</li> - - <li><a href="http://www.serverroomstuff.com/reviews/management/062005/06032005-a1.asp">Monitoring APC AP9319 EMU with mrtg/rrdtool</a> by <a href="mailto:andras.bellak{at}serverroomstuff.com">Andras Bellak</a>.</li> - - <li><a href="http://pwo.de/projects/mrtg/">Variouse software probes for mrtg</a> by <a href="mailto:pwo{at}guug.de">Peter "WWW" Osel</a>.</li> - - <li><a href="http://www.rdrop.com/mrtg/weather.html">Weather monitoring monitoring with Davis Weather Wizard III</a> by e <a href="mailto:alan{at}batie.org">Alan Batie</a></li> - - <li><a href="http://www.blahz.ab.ca/mrtginfo">Basice SETI Monitoring</a> by <a href="mailto:msroest{at}blahz.ab.ca">Mike Roest</a></li> - - <li><a href="http://www.nwlab.net/tutorials/m0n0wall/monowall-mrtg.html">Use MRTG with m0n0wall</a> by <a href="mailto:mail{at}uridium.net">Mirko Kulpa</a></li> - - <li><a href="http://www.ionum.ch/tools/">Netgear Router MR314</a> MRTG poller script by <a href="mailto:info{at}ionum.ch">Stefan Kolb</a>.</li> - - <li><a href="http://www.joerg.cc/cgi-bin/wiki.pl?MyMRTG_Page">Monitoring Firewall 1</a> by Joerg Fritsch</li> - - <li><a href="http://www.geocities.com/passportmrtg/">Using MRTG with Nortel Passport Devices</a></li> - - <li><a href="http://members.cox.net/jeepnsam/linksys.html">Monitoring Linksys Router</a> by Brian Akins</li> - - <li><a href="http://www.networktechinc.com/enviro-sems-mrtg-app.html">NTI's ENVIROMUX Server Environment Monitoring System Graphs Critical Environmental Conditions with MRTG by Deepa Nair.</a></li> - - <li><a href="http://www.triponthis.net/Matt/USGII/index.htm">Notes on monitoring the Nomadix Universal Service Gateway II</a> by <a href="mailto:mevans3%20.%20triad.rr.com">Matthew Evans</a></li> - - <li><a href="http://www.thiscow.com/dl/bgp-peers-1.5.pl">Program that generates a MRTG configuration file for graphing traffic to and from all peers present on an exchange point (MAE...), using mac-accounting. Tested with Cisco 720x and Cisco 750x</a> by by <a href="mailto:erwan{at}de.clara.net">Lerale Erwan</a></li> - - <li><a href="http://www.mikrotik.com/docs/ros/2.8/appex/mrtg1.content">MRTG monitoring of a MikroTik LINUX based router, as documented by MikroTik.</a></li> - - <li><a href="http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/dialsol/nmssol/mrtg.htm">Ciscos Page on MRTG and AS5300</a></li> - - <li><a href="http://www.cyberguard.com/snapgear/cgi-bin/fom?_highlightWords=mrtg&file=240">Configuring MRTG for SnapGear Routers</a></li> - - <li><a href="http://www.xolution.ch/mrtg/">Monitoring Brocade Silkworm Fibre Channel Switches</a> by <a href="mailto:rolf{at}xolution.ch">Jordi Rolf</a></li> - - <li><a href="http://www.cluebyfour.org/~streiner/redback.html">Using MRTG with Redback SMS platforms</a> by <a href="mailto:streiner{at}stargate.net">Justin M. Streiner</a></li> - - <li><a href="http://vegan.net/MRTG">MRTG and Loadbalancing Devices</a> by <a href="mailto:tony{at}vegan.net">Tony Bourke</a></li> - - <li><a href="http://home.online.no/~jorner/Bay_and_FR.html">How to monitor FrameRelay PVC's on BayNetworks routers</a> by <a href="mailto:jorn{at}jorneriksen.com">Jørn Eriksen</a>.</li> - - <li><a href="http://feenix.burgiss.net/linux/mrtg/5660/">Monitor Efficient Networks SS 5660 ADSL modem/router</a>. By <a href="mailto:hburgiss{at}bellsouth.net">Hal Burgiss</a>.</li> - - <li><a href="http://www.polesye.net/roma/">Monitoring Atmel chipset based Access Points (GL2411AP and Linksys WAP11)</a> by <a href="mailto:roma{at}polesye.net">Roman Festchook</a></li> - - <li><a href="http://www.anetzb.de/upnp2mrtg/">Monitoring a FritzBox</a> by <a href="mailto:upnp2mrtg{at}anetzb.de">Michael Tomschitz</a></li> - - <li><a href="http://www.sensatronics.com/downloads/mrtg_temptrax_howto.pdf">Graph server room temperatures using the Sensatronics TempTrax device</a> by <a href="mailto:kwright{at}sensatronics.com">Keith A.Wright</a>.</li> - - <li><a href="http://www.geek.net.au/mrtg.html">Assorted Linux RedHat 7.x MRTG stand-alone configurations for graphing system activity incl network traffic without using SNMP</a> by <a href="mailto:cnd{at}geek.net.au">Chris Drake</a> .</li> - - <li><a href="http://www.dmzs.com/~dmz/projects/mrtgsystemload.html">Basic Script to graph load/memory/[system|user|idle]load/cpu/etc</a> by <a href="mailto:zendzidm{at}wellsfargo.com">David M. Zendzian</a></li> - - <li><a href="http://itc1.inftech.com/mrtg/mrtg.html">Monitor system memory with Top (version 3.5beta12) on Solaris</a> by <a href="mailto:admin{at}inftech.com">Ben Fallah</a></li> - - <li><a href="http://www.bursztein.net/prog/stat/">Generic Stats Gatherer for Linux and FreeBSD</a> use it with mrtg or rrdtool for you monitoring tasks. By <a href="mailto:elie{at}bursztein.net">Elie Bursztein</a>.</li> - - <li><a href="http://www.visi.com/~corwin/mrtg/">Monitoring Novel 5.1</a> by <a href="mailto:greg.riedesel{at}ci.stpaul.mn.us">Greg Riedesel</a></li> - - <li><a href="http://mbm2mrtg.hn.org">MBM2MRTG</a> lets you graph MBM5 (Motherboard Monitor) data by <a href="mailto:dev{at}mbm2mrtg.hn.org">MBM2MRTG Team</a></li> - - <li><a href="http://snmpboy.msft.net">Monitoring NT Servers with MRTG</a> Courtesy of Microsoft Global Networking, <a href="mailto:ottoh{at}microsoft.com">Otto J. Helweg</a></li> - - <li><a href="http://www.crossley-nilsen.com/Linux/Mrtg_and_Trend_Viruswall/mrtg_and_trend_viruswall.html">Monitoring Trend InterScan Viruswall</a> by <a href="mailto:thomas.nilsen{at}doc-s.co.uk">Thomas Nilsen</a></li> - - <li><a href="http://www.megalinux.net/archives/38.html">Monitoring DNS Server(BIND) by Ram Prasad</a></li> - - <li><a href="http://www.inter7.com/qmailmrtg7">Qmail Monitoring</a> by Ken Jones</li> - - <li><a href="http://dev.publicshout.org/qmrtg/">Alternative Qmail Monitoring</a> by mij at dev.publicshout.org</li> - - <li><a href="http://datacenter.seven.it//modules.php?name=Content&pa=showpage&pid=2">Graph ipfm data</a> by Enrico Centenaro</li> - - <li><a href="http://users.2z.net/rpuhek/scripts_public/spamd/">Spamassassin Monitoring</a> by <a href="mailto:rpuhek{at}etnsystems.com">Rich Puhek</a>.</li> - - <li><a href="http://www.earlham.edu/~littejo/software/mrtg-mailstats.html">Alternate MRTG Mailstats program</a> by <a href="mailto:littejo{at}earlham.edu">John Rowan Littell</a></li> - - <li><a href="http://www.bitbybit.dk/mysqlfaq/mrtg-mysql-load/">A small extension to MRTG which will allow people running MySQL servers to monitor the performance of the server.</a> by <a href="mailto:carsten.pedersen{at}bitbybit.dk">Carsten H. Pedersen</a></li> - - <li><a href="http://web.csma.biz/apps/ntpstat.shtml">Script to display NTP clock drift</a> by <a href="mailto:c{at}csma.biz">Corey S. McFadden</a></li> - - <li><a href="http://vvv.csma.biz/apps/mrtg-spamscorer.shtml">Graph Spam Scores from MailScanner / SpamAssassin</a> by <a href="mailto:c{at}csma.biz">Corey S. McFadden</a></li> - - <li><a href="http://anhold.com/mrtgstuff/">FTP usage grapher by</a> <a href="mailto:jon{at}anhold.com">Jon Anhold</a></li> - - <li><a href="http://www.webinject.org/mrtgplugin.html">WebInject</a> performance meter by Corey Goldberg.</li> - </ul> - diff --git a/web/404.wml b/web/404.wml deleted file mode 100644 index 4a0967c..0000000 --- a/web/404.wml +++ /dev/null @@ -1,9 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "404"> - - -<H1>Sorry this page does not exist</H1> - -<p>The MRTG website has been restructured. -Most things are still around, but probably under a new address.</p> - diff --git a/web/award-white.png b/web/award-white.png Binary files differdeleted file mode 100644 index 40d0b24..0000000 --- a/web/award-white.png +++ /dev/null diff --git a/web/bin/fix-hrefs.pl b/web/bin/fix-hrefs.pl deleted file mode 100755 index e34414e..0000000 --- a/web/bin/fix-hrefs.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/sepp/bin/perl-5.8.8 -w - -use strict; -use HTML::Parser; - -my $p = HTML::Parser->new(api_version => 3); -$p->handler(start => \&startsub, 'tagname, text'); -#$p->handler(end => \&endsub, 'tagname, text'); -$p->handler(default => sub { print shift() }, 'text'); -$p->parse_file(shift||"-") or die("parse: $!"); - -sub startsub { - my $tag = shift; - my $text = shift; - - if ($tag eq "a") { - $text =~ s,".*?/web/doc/,",; - $text =~ /^http/ || $text =~ s,\.html,.en.html,; - } - print $text; -} diff --git a/web/bin/fix-pod2html-orig.pl b/web/bin/fix-pod2html-orig.pl deleted file mode 100755 index fa51400..0000000 --- a/web/bin/fix-pod2html-orig.pl +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use HTML::Parser; - -# fix pod2html output: -# v1.0: defer </dd> and </dt> tags until -# the next <dd>, <dt> or </dl> - -# v1.1: don't nest any <a> elements; -# end one before beginning another - -# v1.2: insert <dd> tags if <dl> occurs -# inside <dt> - -# v1.3: <a> anchors must not start with a digit; -# insert a letter "N" at the start if they do - -# v1.4: insert the "N" letter into <a href="#xxx"> too. - -my $p = HTML::Parser->new(api_version => 3); -$p->handler(start => \&startsub, 'tagname, text'); -$p->handler(end => \&endsub, 'tagname, text'); -$p->handler(default => sub { print shift() }, 'text'); -$p->parse_file(shift||"-") or die("parse: $!"); - -my @stack; -my $a=0; - -sub startsub { - my $tag = shift; - my $text = shift; - if ($tag eq "dl") { - if (@stack and $stack[0] eq "dt") { - $stack[0] = "dd"; - print "</dt><dd>"; - } - unshift @stack, 0; - } - if (($tag eq "dt" or $tag eq "dd") and $stack[0]) { - print "</$stack[0]>"; - $stack[0] = 0; - } - if ($tag eq "a") { - if ($a) { - print "</a>"; - } else { - $a++; - } - $text =~ s/(name="|href="#)(\d)/$1N$2/; - } - print $text; -} - - -sub endsub { - my $tag = shift; - my $text = shift; - if ($tag eq "dl") { - print "</$stack[0]>" if $stack[0]; - shift @stack; - } - if ($tag eq "a") { - if ($a) { - print "</a>"; - $a--; - } - } elsif ($tag eq "dd" or $tag eq "dt") { - $stack[0] = $tag; - } else { - print $text; - } -} diff --git a/web/bin/fix-pod2html.pl b/web/bin/fix-pod2html.pl deleted file mode 100755 index 3f12e69..0000000 --- a/web/bin/fix-pod2html.pl +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/sepp/bin/perl-5.8.8 -w - -use strict; -use HTML::Parser; - -# fix pod2html output: -# v1.0: defer </dd> and </dt> tags until -# the next <dd>, <dt> or </dl> - -# v1.1: don't nest any <a> elements; -# end one before beginning another - -# v1.2: insert <dd> tags if <dl> occurs -# inside <dt> - -# v1.3: <a> anchors must not start with a digit; -# insert a letter "N" at the start if they do - -# v1.4: insert the "N" letter into <a href="#xxx"> too. - -my $p = HTML::Parser->new(api_version => 3); -$p->handler(start => \&startsub, 'tagname, text'); -$p->handler(end => \&endsub, 'tagname, text'); -$p->handler(default => sub { print shift() }, 'text'); -$p->parse_file(shift||"-") or die("parse: $!"); - -my @ddstack; -my @listack; -my $a=0; - -sub startsub { - my $tag = shift; - my $text = shift; - if ($tag eq "dl") { - if (@ddstack and $ddstack[0] eq "dt") { - $ddstack[0] = "dd"; - print "</dt><dd>"; - } - unshift @ddstack, 0; - } - if ($tag =~ /^[uo]l$/) { - unshift @listack, 0; - } - if (($tag eq "dt" or $tag eq "dd") and $ddstack[0]) { - print "</$ddstack[0]>"; - $ddstack[0] = 0; - } - if (($tag eq "li") and $listack[0]) { - print "</$listack[0]>"; - $listack[0] = 0; - } - if ($tag eq "a") { - if ($a) { - print "</a>"; - } else { - $a++; - } - $text =~ s/(name="|href="#)(\d)/$1N$2/; - } - print $text; -} - - -sub endsub { - my $tag = shift; - my $text = shift; - if ($tag eq "dl") { - print "</$ddstack[0]>" if $ddstack[0]; - shift @ddstack; - } elsif ($tag =~ /^[uo]l$/) { - print "</$listack[0]>" if $listack[0]; - shift @listack; - } - - if ($tag eq "a") { - if ($a) { - print "</a>"; - $a--; - } - } elsif ($tag eq "dd" or $tag eq "dt") { - $ddstack[0] = $tag; - } elsif ($tag eq "li") { - $listack[0] = $tag; - } else { - print $text; - } -} diff --git a/web/bin/headfix.pl b/web/bin/headfix.pl deleted file mode 100755 index 7c0ef90..0000000 --- a/web/bin/headfix.pl +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/sepp/bin/perl-5.8.8 -undef $/; #slurp alll -$_ = <>; -while (s/<page[\s\n\r]+(\S+)\s*=\s*(?:"([^"]+)"|([^"\s>]+))/<page/si){ - chomp($VAL{uc($1)}= $2 ? $2: $3); -} - -if ($VAL{TYPE} eq 'lone') { - $sub="_$VAL{TYPE}"; -} - -s|<page[\s\n\r]*/?>|#include <inc/template${sub}.inc> PAGE="$VAL{PAGE}" AUTHOR="$VAL{AUTHOR}" TYPE="$VAL{TYPE}"\n|si; - -print; - diff --git a/web/bin/htmlfix.sh b/web/bin/htmlfix.sh deleted file mode 100755 index 92a5559..0000000 --- a/web/bin/htmlfix.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -case $1 in -*.html) -# tidy -latin1 -wrap 0 -q -asxhtml $1 >$1.fixed 2>$1.report -# TIDY_RET=$? - exit 0 - TIDY_RET=0 - perl -i -0777 -p -e 's/^\s*//;s{="mailto:(oetiker|tobi|tobias)@(oetiker.ch|ee.ethz.ch)"}{="http://tobi.oetiker.ch/"}g;s{="mailto:(\S*?)\@(\S*?)"}{="mailto:$1@..delete..this..$2"}g' $1.fixed - # yes, beleive it or not IE chockes on propper xhtml pages ... sigh - perl -i -0777 -p -e 's/^\s*<\?xml.+?\?>\s*//;' $1.fixed - if [ $TIDY_RET != 0 ]; then - echo Parsing: $1 - egrep -v "^(HTML Tidy|$1:|To learn|Please send|HTML and CSS|Lobby your)" $1.report - rm $1.report - name=`basename $1 .html` - name=`basename $name .en` - name=`basename $name .de` - touch -m -t 198001010000 $name.*.html - exit 1 - fi - mv $1.fixed $1 - rm $1.report -;; -esac diff --git a/web/bin/lib/Pod/.exists b/web/bin/lib/Pod/.exists deleted file mode 100644 index e69de29..0000000 --- a/web/bin/lib/Pod/.exists +++ /dev/null diff --git a/web/bin/lib/Pod/Escapes.pm b/web/bin/lib/Pod/Escapes.pm deleted file mode 100644 index de4d75a..0000000 --- a/web/bin/lib/Pod/Escapes.pm +++ /dev/null @@ -1,721 +0,0 @@ - -require 5; -# The documentation is at the end. -# Time-stamp: "2004-05-07 15:31:25 ADT" -package Pod::Escapes; -require Exporter; -@ISA = ('Exporter'); -$VERSION = '1.04'; -@EXPORT_OK = qw( - %Code2USASCII - %Name2character - %Name2character_number - %Latin1Code_to_fallback - %Latin1Char_to_fallback - e2char - e2charnum -); -%EXPORT_TAGS = ('ALL' => \@EXPORT_OK); - -#========================================================================== - -use strict; -use vars qw( - %Code2USASCII - %Name2character - %Name2character_number - %Latin1Code_to_fallback - %Latin1Char_to_fallback - $FAR_CHAR - $FAR_CHAR_NUMBER - $NOT_ASCII -); - -$FAR_CHAR = "?" unless defined $FAR_CHAR; -$FAR_CHAR_NUMBER = ord($FAR_CHAR) unless defined $FAR_CHAR_NUMBER; - -$NOT_ASCII = 'A' ne chr(65) unless defined $NOT_ASCII; - -#-------------------------------------------------------------------------- -sub e2char { - my $in = $_[0]; - return undef unless defined $in and length $in; - - # Convert to decimal: - if($in =~ m/^(0[0-7]*)$/s ) { - $in = oct $in; - } elsif($in =~ m/^0?x([0-9a-fA-F]+)$/s ) { - $in = hex $1; - } # else it's decimal, or named - - if($NOT_ASCII) { - # We're in bizarro world of not-ASCII! - # Cope with US-ASCII codes, use fallbacks for Latin-1, or use FAR_CHAR. - unless($in =~ m/^\d+$/s) { - # It's a named character reference. Get its numeric Unicode value. - $in = $Name2character{$in}; - return undef unless defined $in; # (if there's no such name) - $in = ord $in; # (All ents must be one character long.) - # ...So $in holds the char's US-ASCII numeric value, which we'll - # now go get the local equivalent for. - } - - # It's numeric, whether by origin or by mutation from a known name - return $Code2USASCII{$in} # so "65" => "A" everywhere - || $Latin1Code_to_fallback{$in} # Fallback. - || $FAR_CHAR; # Fall further back - } - - # Normal handling: - if($in =~ m/^\d+$/s) { - if($] < 5.007 and $in > 255) { # can't be trusted with Unicode - return $FAR_CHAR; - } else { - return chr($in); - } - } else { - return $Name2character{$in}; # returns undef if unknown - } -} - -#-------------------------------------------------------------------------- -sub e2charnum { - my $in = $_[0]; - return undef unless defined $in and length $in; - - # Convert to decimal: - if($in =~ m/^(0[0-7]*)$/s ) { - $in = oct $in; - } elsif($in =~ m/^0?x([0-9a-fA-F]+)$/s ) { - $in = hex $1; - } # else it's decimal, or named - - if($in =~ m/^\d+$/s) { - return 0 + $in; - } else { - return $Name2character_number{$in}; # returns undef if unknown - } -} - -#-------------------------------------------------------------------------- - -%Name2character_number = ( - # General XML/XHTML: - 'lt' => 60, - 'gt' => 62, - 'quot' => 34, - 'amp' => 38, - 'apos' => 39, - - # POD-specific: - 'sol' => 47, - 'verbar' => 124, - - 'lchevron' => 171, # legacy for laquo - 'rchevron' => 187, # legacy for raquo - - # Remember, grave looks like \ (as in virtu\) - # acute looks like / (as in re/sume/) - # circumflex looks like ^ (as in papier ma^che/) - # umlaut/dieresis looks like " (as in nai"ve, Chloe") - - # From the XHTML 1 .ent files: - 'nbsp' , 160, - 'iexcl' , 161, - 'cent' , 162, - 'pound' , 163, - 'curren' , 164, - 'yen' , 165, - 'brvbar' , 166, - 'sect' , 167, - 'uml' , 168, - 'copy' , 169, - 'ordf' , 170, - 'laquo' , 171, - 'not' , 172, - 'shy' , 173, - 'reg' , 174, - 'macr' , 175, - 'deg' , 176, - 'plusmn' , 177, - 'sup2' , 178, - 'sup3' , 179, - 'acute' , 180, - 'micro' , 181, - 'para' , 182, - 'middot' , 183, - 'cedil' , 184, - 'sup1' , 185, - 'ordm' , 186, - 'raquo' , 187, - 'frac14' , 188, - 'frac12' , 189, - 'frac34' , 190, - 'iquest' , 191, - 'Agrave' , 192, - 'Aacute' , 193, - 'Acirc' , 194, - 'Atilde' , 195, - 'Auml' , 196, - 'Aring' , 197, - 'AElig' , 198, - 'Ccedil' , 199, - 'Egrave' , 200, - 'Eacute' , 201, - 'Ecirc' , 202, - 'Euml' , 203, - 'Igrave' , 204, - 'Iacute' , 205, - 'Icirc' , 206, - 'Iuml' , 207, - 'ETH' , 208, - 'Ntilde' , 209, - 'Ograve' , 210, - 'Oacute' , 211, - 'Ocirc' , 212, - 'Otilde' , 213, - 'Ouml' , 214, - 'times' , 215, - 'Oslash' , 216, - 'Ugrave' , 217, - 'Uacute' , 218, - 'Ucirc' , 219, - 'Uuml' , 220, - 'Yacute' , 221, - 'THORN' , 222, - 'szlig' , 223, - 'agrave' , 224, - 'aacute' , 225, - 'acirc' , 226, - 'atilde' , 227, - 'auml' , 228, - 'aring' , 229, - 'aelig' , 230, - 'ccedil' , 231, - 'egrave' , 232, - 'eacute' , 233, - 'ecirc' , 234, - 'euml' , 235, - 'igrave' , 236, - 'iacute' , 237, - 'icirc' , 238, - 'iuml' , 239, - 'eth' , 240, - 'ntilde' , 241, - 'ograve' , 242, - 'oacute' , 243, - 'ocirc' , 244, - 'otilde' , 245, - 'ouml' , 246, - 'divide' , 247, - 'oslash' , 248, - 'ugrave' , 249, - 'uacute' , 250, - 'ucirc' , 251, - 'uuml' , 252, - 'yacute' , 253, - 'thorn' , 254, - 'yuml' , 255, - - 'fnof' , 402, - 'Alpha' , 913, - 'Beta' , 914, - 'Gamma' , 915, - 'Delta' , 916, - 'Epsilon' , 917, - 'Zeta' , 918, - 'Eta' , 919, - 'Theta' , 920, - 'Iota' , 921, - 'Kappa' , 922, - 'Lambda' , 923, - 'Mu' , 924, - 'Nu' , 925, - 'Xi' , 926, - 'Omicron' , 927, - 'Pi' , 928, - 'Rho' , 929, - 'Sigma' , 931, - 'Tau' , 932, - 'Upsilon' , 933, - 'Phi' , 934, - 'Chi' , 935, - 'Psi' , 936, - 'Omega' , 937, - 'alpha' , 945, - 'beta' , 946, - 'gamma' , 947, - 'delta' , 948, - 'epsilon' , 949, - 'zeta' , 950, - 'eta' , 951, - 'theta' , 952, - 'iota' , 953, - 'kappa' , 954, - 'lambda' , 955, - 'mu' , 956, - 'nu' , 957, - 'xi' , 958, - 'omicron' , 959, - 'pi' , 960, - 'rho' , 961, - 'sigmaf' , 962, - 'sigma' , 963, - 'tau' , 964, - 'upsilon' , 965, - 'phi' , 966, - 'chi' , 967, - 'psi' , 968, - 'omega' , 969, - 'thetasym' , 977, - 'upsih' , 978, - 'piv' , 982, - 'bull' , 8226, - 'hellip' , 8230, - 'prime' , 8242, - 'Prime' , 8243, - 'oline' , 8254, - 'frasl' , 8260, - 'weierp' , 8472, - 'image' , 8465, - 'real' , 8476, - 'trade' , 8482, - 'alefsym' , 8501, - 'larr' , 8592, - 'uarr' , 8593, - 'rarr' , 8594, - 'darr' , 8595, - 'harr' , 8596, - 'crarr' , 8629, - 'lArr' , 8656, - 'uArr' , 8657, - 'rArr' , 8658, - 'dArr' , 8659, - 'hArr' , 8660, - 'forall' , 8704, - 'part' , 8706, - 'exist' , 8707, - 'empty' , 8709, - 'nabla' , 8711, - 'isin' , 8712, - 'notin' , 8713, - 'ni' , 8715, - 'prod' , 8719, - 'sum' , 8721, - 'minus' , 8722, - 'lowast' , 8727, - 'radic' , 8730, - 'prop' , 8733, - 'infin' , 8734, - 'ang' , 8736, - 'and' , 8743, - 'or' , 8744, - 'cap' , 8745, - 'cup' , 8746, - 'int' , 8747, - 'there4' , 8756, - 'sim' , 8764, - 'cong' , 8773, - 'asymp' , 8776, - 'ne' , 8800, - 'equiv' , 8801, - 'le' , 8804, - 'ge' , 8805, - 'sub' , 8834, - 'sup' , 8835, - 'nsub' , 8836, - 'sube' , 8838, - 'supe' , 8839, - 'oplus' , 8853, - 'otimes' , 8855, - 'perp' , 8869, - 'sdot' , 8901, - 'lceil' , 8968, - 'rceil' , 8969, - 'lfloor' , 8970, - 'rfloor' , 8971, - 'lang' , 9001, - 'rang' , 9002, - 'loz' , 9674, - 'spades' , 9824, - 'clubs' , 9827, - 'hearts' , 9829, - 'diams' , 9830, - 'OElig' , 338, - 'oelig' , 339, - 'Scaron' , 352, - 'scaron' , 353, - 'Yuml' , 376, - 'circ' , 710, - 'tilde' , 732, - 'ensp' , 8194, - 'emsp' , 8195, - 'thinsp' , 8201, - 'zwnj' , 8204, - 'zwj' , 8205, - 'lrm' , 8206, - 'rlm' , 8207, - 'ndash' , 8211, - 'mdash' , 8212, - 'lsquo' , 8216, - 'rsquo' , 8217, - 'sbquo' , 8218, - 'ldquo' , 8220, - 'rdquo' , 8221, - 'bdquo' , 8222, - 'dagger' , 8224, - 'Dagger' , 8225, - 'permil' , 8240, - 'lsaquo' , 8249, - 'rsaquo' , 8250, - 'euro' , 8364, -); - - -# Fill out %Name2character... -{ - %Name2character = (); - my($name, $number); - while( ($name, $number) = each %Name2character_number) { - if($] < 5.007 and $number > 255) { - $Name2character{$name} = $FAR_CHAR; - # substitute for Unicode characters, for perls - # that can't reliable handle them - } else { - $Name2character{$name} = chr $number; - # normal case - } - } - # So they resolve 'right' even in EBCDIC-land - $Name2character{'lt' } = '<'; - $Name2character{'gt' } = '>'; - $Name2character{'quot'} = '"'; - $Name2character{'amp' } = '&'; - $Name2character{'apos'} = "'"; - $Name2character{'sol' } = '/'; - $Name2character{'verbar'} = '|'; -} - -#-------------------------------------------------------------------------- - -%Code2USASCII = ( -# mostly generated by -# perl -e "printf qq{ \x25 3s, '\x25s',\n}, $_, chr($_) foreach (32 .. 126)" - 32, ' ', - 33, '!', - 34, '"', - 35, '#', - 36, '$', - 37, '%', - 38, '&', - 39, "'", #! - 40, '(', - 41, ')', - 42, '*', - 43, '+', - 44, ',', - 45, '-', - 46, '.', - 47, '/', - 48, '0', - 49, '1', - 50, '2', - 51, '3', - 52, '4', - 53, '5', - 54, '6', - 55, '7', - 56, '8', - 57, '9', - 58, ':', - 59, ';', - 60, '<', - 61, '=', - 62, '>', - 63, '?', - 64, '@', - 65, 'A', - 66, 'B', - 67, 'C', - 68, 'D', - 69, 'E', - 70, 'F', - 71, 'G', - 72, 'H', - 73, 'I', - 74, 'J', - 75, 'K', - 76, 'L', - 77, 'M', - 78, 'N', - 79, 'O', - 80, 'P', - 81, 'Q', - 82, 'R', - 83, 'S', - 84, 'T', - 85, 'U', - 86, 'V', - 87, 'W', - 88, 'X', - 89, 'Y', - 90, 'Z', - 91, '[', - 92, "\\", #! - 93, ']', - 94, '^', - 95, '_', - 96, '`', - 97, 'a', - 98, 'b', - 99, 'c', - 100, 'd', - 101, 'e', - 102, 'f', - 103, 'g', - 104, 'h', - 105, 'i', - 106, 'j', - 107, 'k', - 108, 'l', - 109, 'm', - 110, 'n', - 111, 'o', - 112, 'p', - 113, 'q', - 114, 'r', - 115, 's', - 116, 't', - 117, 'u', - 118, 'v', - 119, 'w', - 120, 'x', - 121, 'y', - 122, 'z', - 123, '{', - 124, '|', - 125, '}', - 126, '~', -); - -#-------------------------------------------------------------------------- - -%Latin1Code_to_fallback = (); -@Latin1Code_to_fallback{0xA0 .. 0xFF} = ( -# Copied from Text/Unidecode/x00.pm: - -' ', qq{!}, qq{C/}, 'PS', qq{\$?}, qq{Y=}, qq{|}, 'SS', qq{"}, qq{(c)}, 'a', qq{<<}, qq{!}, "", qq{(r)}, qq{-}, -'deg', qq{+-}, '2', '3', qq{'}, 'u', 'P', qq{*}, qq{,}, '1', 'o', qq{>>}, qq{1/4}, qq{1/2}, qq{3/4}, qq{?}, -'A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', -'D', 'N', 'O', 'O', 'O', 'O', 'O', 'x', 'O', 'U', 'U', 'U', 'U', 'U', 'Th', 'ss', -'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', -'d', 'n', 'o', 'o', 'o', 'o', 'o', qq{/}, 'o', 'u', 'u', 'u', 'u', 'y', 'th', 'y', - -); - -{ - # Now stuff %Latin1Char_to_fallback: - %Latin1Char_to_fallback = (); - my($k,$v); - while( ($k,$v) = each %Latin1Code_to_fallback) { - $Latin1Char_to_fallback{chr $k} = $v; - #print chr($k), ' => ', $v, "\n"; - } -} - -#-------------------------------------------------------------------------- -1; -__END__ - -=head1 NAME - -Pod::Escapes -- for resolving Pod EE<lt>...E<gt> sequences - -=head1 SYNOPSIS - - use Pod::Escapes qw(e2char); - ...la la la, parsing POD, la la la... - $text = e2char($e_node->label); - unless(defined $text) { - print "Unknown E sequence \"", $e_node->label, "\"!"; - } - ...else print/interpolate $text... - -=head1 DESCRIPTION - -This module provides things that are useful in decoding -Pod EE<lt>...E<gt> sequences. Presumably, it should be used -only by Pod parsers and/or formatters. - -By default, Pod::Escapes exports none of its symbols. But -you can request any of them to be exported. -Either request them individually, as with -C<use Pod::Escapes qw(symbolname symbolname2...);>, -or you can do C<use Pod::Escapes qw(:ALL);> to get all -exportable symbols. - -=head1 GOODIES - -=over - -=item e2char($e_content) - -Given a name or number that could appear in a -C<EE<lt>name_or_numE<gt>> sequence, this returns the string that -it stands for. For example, C<e2char('sol')>, C<e2char('47')>, -C<e2char('0x2F')>, and C<e2char('057')> all return "/", -because C<EE<lt>solE<gt>>, C<EE<lt>47E<gt>>, C<EE<lt>0x2fE<gt>>, -and C<EE<lt>057E<gt>>, all mean "/". If -the name has no known value (as with a name of "qacute") or is -syntactally invalid (as with a name of "1/4"), this returns undef. - -=item e2charnum($e_content) - -Given a name or number that could appear in a -C<EE<lt>name_or_numE<gt>> sequence, this returns the number of -the Unicode character that this stands for. For example, -C<e2char('sol')>, C<e2char('47')>, -C<e2char('0x2F')>, and C<e2char('057')> all return 47, -because C<EE<lt>solE<gt>>, C<EE<lt>47E<gt>>, C<EE<lt>0x2fE<gt>>, -and C<EE<lt>057E<gt>>, all mean "/", whose Unicode number is 47. If -the name has no known value (as with a name of "qacute") or is -syntactally invalid (as with a name of "1/4"), this returns undef. - -=item $Name2character{I<name>} - -Maps from names (as in C<EE<lt>I<name>E<gt>>) like "eacute" or "sol" -to the string that each stands for. Note that this does not -include numerics (like "64" or "x981c"). Under old Perl versions -(before 5.7) you get a "?" in place of characters whose Unicode -value is over 255. - -=item $Name2character_number{I<name>} - -Maps from names (as in C<EE<lt>I<name>E<gt>>) like "eacute" or "sol" -to the Unicode value that each stands for. For example, -C<$Name2character_number{'eacute'}> is 201, and -C<$Name2character_number{'eacute'}> is 8364. You get the correct -Unicode value, regardless of the version of Perl you're using -- -which differs from C<%Name2character>'s behavior under pre-5.7 Perls. - -Note that this hash does not -include numerics (like "64" or "x981c"). - -=item $Latin1Code_to_fallback{I<integer>} - -For numbers in the range 160 (0x00A0) to 255 (0x00FF), this maps -from the character code for a Latin-1 character (like 233 for -lowercase e-acute) to the US-ASCII character that best aproximates -it (like "e"). You may find this useful if you are rendering -POD in a format that you think deals well only with US-ASCII -characters. - -=item $Latin1Char_to_fallback{I<character>} - -Just as above, but maps from characters (like "\xE9", -lowercase e-acute) to characters (like "e"). - -=item $Code2USASCII{I<integer>} - -This maps from US-ASCII codes (like 32) to the corresponding -character (like space, for 32). Only characters 32 to 126 are -defined. This is meant for use by C<e2char($x)> when it senses -that it's running on a non-ASCII platform (where chr(32) doesn't -get you a space -- but $Code2USASCII{32} will). It's -documented here just in case you might find it useful. - -=back - -=head1 CAVEATS - -On Perl versions before 5.7, Unicode characters with a value -over 255 (like lambda or emdash) can't be conveyed. This -module does work under such early Perl versions, but in the -place of each such character, you get a "?". Latin-1 -characters (characters 160-255) are unaffected. - -Under EBCDIC platforms, C<e2char($n)> may not always be the -same as C<chr(e2charnum($n))>, and ditto for -C<$Name2character{$name}> and -C<chr($Name2character_number{$name})>. - -=head1 SEE ALSO - -L<perlpod|perlpod> - -L<perlpodspec|perlpodspec> - -L<Text::Unidecode|Text::Unidecode> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2001-2004 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -Portions of the data tables in this module are derived from the -entity declarations in the W3C XHTML specification. - -Currently (October 2001), that's these three: - - http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent - http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent - http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# What I used for reading the XHTML .ent files: - -use strict; -my(@norms, @good, @bad); -my $dir = 'c:/sgml/docbook/'; -my %escapes; -foreach my $file (qw( - xhtml-symbol.ent - xhtml-lat1.ent - xhtml-special.ent -)) { - open(IN, "<$dir$file") or die "can't read-open $dir$file: $!"; - print "Reading $file...\n"; - while(<IN>) { - if(m/<!ENTITY\s+(\S+)\s+"&#([^;]+);">/) { - my($name, $value) = ($1,$2); - next if $name eq 'quot' or $name eq 'apos' or $name eq 'gt'; - - $value = hex $1 if $value =~ m/^x([a-fA-F0-9]+)$/s; - print "ILLEGAL VALUE $value" unless $value =~ m/^\d+$/s; - if($value > 255) { - push @good , sprintf " %-10s , chr(%s),\n", "'$name'", $value; - push @bad , sprintf " %-10s , \$bad,\n", "'$name'", $value; - } else { - push @norms, sprintf " %-10s , chr(%s),\n", "'$name'", $value; - } - } elsif(m/<!ENT/) { - print "# Skipping $_"; - } - - } - close(IN); -} - -print @norms; -print "\n ( \$] .= 5.006001 ? (\n"; -print @good; -print " ) : (\n"; -print @bad; -print " )\n);\n"; - -__END__ -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - diff --git a/web/bin/lib/Pod/Hyperlink/BounceURL.pm b/web/bin/lib/Pod/Hyperlink/BounceURL.pm deleted file mode 100644 index b29c73e..0000000 --- a/web/bin/lib/Pod/Hyperlink/BounceURL.pm +++ /dev/null @@ -1,123 +0,0 @@ -package Pod::Hyperlink::BounceURL; -use Pod::ParseUtils; -use URI::Escape; - -use vars qw($VERSION @ISA); -$VERSION = ('$Revision: 1.7 $' =~ /([\d\.]+)/)[0]; -@ISA = 'Pod::Hyperlink'; - -sub configure { - my $self = shift; - my %opts = @_; - if ($opts{'URL'}) { - $self->{'___url'} = $opts{'URL'}; - } -} - -sub type { - my $self = shift; - - # very special case - if we are called explicitly (rather than by our superclass) and with other conditions - # 1) a page type with a page value - # 2) an item type with a page value - # We don't care about any other cases - my ($callpack) = caller(); - if ($callpack ne $ISA[0]) { - DUMP(__PACKAGE__."::type", [ $self, @_ ]); - } else { - DUMP(" indirect call of ".__PACKAGE__."::type", [ $self, @_ ]); - } - - if ( - ($callpack ne $ISA[0]) - && (($self->{'-type'} eq 'page') || ($self->{'-type'} eq 'item')) - && $self->{'-page'} - ) { - my $page_esc = uri_escape( $self->{'-page'} ); - my $node_esc = uri_escape( $self->{'-node'} ); - my $url = sprintf( $self->{'___url'}, $page_esc, $node_esc ); - return "bounceurl:$url"; - } - # in all other cases, let the superclass handle the work - return $self->SUPER::type(@_); -} - -# debug hooks -sub TRACE {} -sub DUMP {} - -1; - -=head1 NAME - -Pod::Hyperlink::BounceURL - Allow off-page links in POD to point to a URL - -=head1 SYNOPSIS - - use Pod::Hyperlink::BounceURL; - my $linkparser = new Pod::Hyperlink::BounceURL; - $linkparser->configure( URL => '/cgi-perl/support/bounce.pl?page=%s' ); - my $pod2xhtml = new Pod::Xhtml( LinkParser => $linkparser ); - -=head1 DESCRIPTION - -Some links in your pod may not be resolveable by Pod::Hyperlink, e.g. C<LE<lt>Some::ModuleE<gt>> - -this module allows you to detect such links and generate a hyperlink instead of some static text. -The target URL will probably be some kind of dynamic webpage or CGI application which can then serve up -the relevant page or send a redirect to the page, hence the "bounce" in this module's name. - -This module overrides the type() method and, for relevant links, will return a string which is -"bounceurl:" followed by the URL, instead of returning "page" or "item". -Your pod-conversion module can then switch on this case and emit the correct kind of markup. -L<Pod::Xhtml> supports the use of this module. - -=head1 METHODS - -=over 4 - -=item configure( %OPTIONS ) - -Set persistent configuration for this object. See L</OPTIONS>. - -=item type() - -Behaves as L<Pod::Hyperlink>'s type() method except for the unresolveable links, where the string returned is -as described in L</DESCRIPTION>. - -=back - -=head1 OPTIONS - -=over 4 - -=item URL - -The URL to handle the link, which may be absolute or relative, of any protocol - it's just -treated as a string and is passed through sprintf(), with two string arguments that are both -already URL-escaped. - -The first argument is the page name, and will always exist. The second argument is the "node" within the page, and may be -empty. - -Insert '%s' where you wish the arguments to be interpolated. The string goes through sprintf() so -you should have '%%' where you want an actual percent sign. If you need the arguments in a different order, see -the perl-specific features of L<perlfunc/sprintf>. - -=back - -=head1 VERSION - -$Revision: 1.7 $ - -=head1 AUTHOR - -P Kent E<lt>cpan _at_ bbc _dot_ co _dot_ ukE<gt> - -=head1 COPYRIGHT - -(c) BBC 2007. This program is free software; you can redistribute it and/or modify it under the GNU GPL. - -See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt - -=cut - diff --git a/web/bin/lib/Pod/Simple.pm b/web/bin/lib/Pod/Simple.pm deleted file mode 100644 index 6beacaa..0000000 --- a/web/bin/lib/Pod/Simple.pm +++ /dev/null @@ -1,1520 +0,0 @@ - -require 5; -package Pod::Simple; -use strict; -use Carp (); -BEGIN { *DEBUG = sub () {0} unless defined &DEBUG } -use integer; -use Pod::Escapes 1.03 (); -use Pod::Simple::LinkSection (); -use Pod::Simple::BlackBox (); -#use utf8; - -use vars qw( - $VERSION @ISA - @Known_formatting_codes @Known_directives - %Known_formatting_codes %Known_directives - $NL -); - -@ISA = ('Pod::Simple::BlackBox'); -$VERSION = '3.05'; - -@Known_formatting_codes = qw(I B C L E F S X Z); -%Known_formatting_codes = map(($_=>1), @Known_formatting_codes); -@Known_directives = qw(head1 head2 head3 head4 item over back); -%Known_directives = map(($_=>'Plain'), @Known_directives); -$NL = $/ unless defined $NL; - -#----------------------------------------------------------------------------- -# Set up some constants: - -BEGIN { - if(defined &ASCII) { } - elsif(chr(65) eq 'A') { *ASCII = sub () {1} } - else { *ASCII = sub () {''} } - - unless(defined &MANY_LINES) { *MANY_LINES = sub () {20} } - DEBUG > 4 and print "MANY_LINES is ", MANY_LINES(), "\n"; - unless(MANY_LINES() >= 1) { - die "MANY_LINES is too small (", MANY_LINES(), ")!\nAborting"; - } - if(defined &UNICODE) { } - elsif($] >= 5.008) { *UNICODE = sub() {1} } - else { *UNICODE = sub() {''} } -} -if(DEBUG > 2) { - print "# We are ", ASCII ? '' : 'not ', "in ASCII-land\n"; - print "# We are under a Unicode-safe Perl.\n"; -} - -# Design note: -# This is a parser for Pod. It is not a parser for the set of Pod-like -# languages which happens to contain Pod -- it is just for Pod, plus possibly -# some extensions. - -# @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ -#@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -__PACKAGE__->_accessorize( - 'nbsp_for_S', # Whether to map S<...>'s to \xA0 characters - 'source_filename', # Filename of the source, for use in warnings - 'source_dead', # Whether to consider this parser's source dead - - 'output_fh', # The filehandle we're writing to, if applicable. - # Used only in some derived classes. - - 'hide_line_numbers', # For some dumping subclasses: whether to pointedly - # suppress the start_line attribute - - 'line_count', # the current line number - 'pod_para_count', # count of pod paragraphs seen so far - - 'no_whining', # whether to suppress whining - 'no_errata_section', # whether to suppress the errata section - 'complain_stderr', # whether to complain to stderr - - 'doc_has_started', # whether we've fired the open-Document event yet - - 'bare_output', # For some subclasses: whether to prepend - # header-code and postpend footer-code - - 'fullstop_space_harden', # Whether to turn ". " into ".[nbsp] "; - - 'nix_X_codes', # whether to ignore X<...> codes - 'merge_text', # whether to avoid breaking a single piece of - # text up into several events - - 'preserve_whitespace', # whether to try to keep whitespace as-is - - 'content_seen', # whether we've seen any real Pod content - 'errors_seen', # TODO: document. whether we've seen any errors (fatal or not) - - 'codes_in_verbatim', # for PseudoPod extensions - - 'code_handler', # coderef to call when a code (non-pod) line is seen - 'cut_handler', # coderef to call when a =cut line is seen - #Called like: - # $code_handler->($line, $self->{'line_count'}, $self) if $code_handler; - # $cut_handler->($line, $self->{'line_count'}, $self) if $cut_handler; - -); - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub any_errata_seen { # good for using as an exit() value... - return shift->{'errors_seen'} || 0; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# Pull in some functions that, for some reason, I expect to see here too: -BEGIN { - *pretty = \&Pod::Simple::BlackBox::pretty; - *stringify_lol = \&Pod::Simple::BlackBox::stringify_lol; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub version_report { - my $class = ref($_[0]) || $_[0]; - if($class eq __PACKAGE__) { - return "$class $VERSION"; - } else { - my $v = $class->VERSION; - return "$class $v (" . __PACKAGE__ . " $VERSION)"; - } -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -#sub curr_open { # read-only list accessor -# return @{ $_[0]{'curr_open'} || return() }; -#} -#sub _curr_open_listref { $_[0]{'curr_open'} ||= [] } - - -sub output_string { - # Works by faking out output_fh. Simplifies our code. - # - my $this = shift; - return $this->{'output_string'} unless @_; # GET. - - require Pod::Simple::TiedOutFH; - my $x = (defined($_[0]) and ref($_[0])) ? $_[0] : \( $_[0] ); - $$x = '' unless defined $$x; - DEBUG > 4 and print "# Output string set to $x ($$x)\n"; - $this->{'output_fh'} = Pod::Simple::TiedOutFH->handle_on($_[0]); - return - $this->{'output_string'} = $_[0]; - #${ ${ $this->{'output_fh'} } }; -} - -sub abandon_output_string { $_[0]->abandon_output_fh; delete $_[0]{'output_string'} } -sub abandon_output_fh { $_[0]->output_fh(undef) } -# These don't delete the string or close the FH -- they just delete our -# references to it/them. -# TODO: document these - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub new { - # takes no parameters - my $class = ref($_[0]) || $_[0]; - #Carp::croak(__PACKAGE__ . " is a virtual base class -- see perldoc " - # . __PACKAGE__ ); - return bless { - 'accept_codes' => { map( ($_=>$_), @Known_formatting_codes ) }, - 'accept_directives' => { %Known_directives }, - 'accept_targets' => {}, - }, $class; -} - - - -# TODO: an option for whether to interpolate E<...>'s, or just resolve to codes. - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _handle_element_start { # OVERRIDE IN DERIVED CLASS - my($self, $element_name, $attr_hash_r) = @_; - return; -} - -sub _handle_element_end { # OVERRIDE IN DERIVED CLASS - my($self, $element_name) = @_; - return; -} - -sub _handle_text { # OVERRIDE IN DERIVED CLASS - my($self, $text) = @_; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# -# And now directives (not targets) - -sub accept_directive_as_verbatim { shift->_accept_directives('Verbatim', @_) } -sub accept_directive_as_data { shift->_accept_directives('Data', @_) } -sub accept_directive_as_processed { shift->_accept_directives('Plain', @_) } - -sub _accept_directives { - my($this, $type) = splice @_,0,2; - foreach my $d (@_) { - next unless defined $d and length $d; - Carp::croak "\"$d\" isn't a valid directive name" - unless $d =~ m/^[a-zA-Z][a-zA-Z0-9]*$/s; - Carp::croak "\"$d\" is already a reserved Pod directive name" - if exists $Known_directives{$d}; - $this->{'accept_directives'}{$d} = $type; - DEBUG > 2 and print "Learning to accept \"=$d\" as directive of type $type\n"; - } - DEBUG > 6 and print "$this\'s accept_directives : ", - pretty($this->{'accept_directives'}), "\n"; - - return sort keys %{ $this->{'accept_directives'} } if wantarray; - return; -} - -#-------------------------------------------------------------------------- -# TODO: document these: - -sub unaccept_directive { shift->unaccept_directives(@_) }; - -sub unaccept_directives { - my $this = shift; - foreach my $d (@_) { - next unless defined $d and length $d; - Carp::croak "\"$d\" isn't a valid directive name" - unless $d =~ m/^[a-zA-Z][a-zA-Z0-9]*$/s; - Carp::croak "But you must accept \"$d\" directives -- it's a builtin!" - if exists $Known_directives{$d}; - delete $this->{'accept_directives'}{$d}; - DEBUG > 2 and print "OK, won't accept \"=$d\" as directive.\n"; - } - return sort keys %{ $this->{'accept_directives'} } if wantarray; - return -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# -# And now targets (not directives) - -sub accept_target { shift->accept_targets(@_) } # alias -sub accept_target_as_text { shift->accept_targets_as_text(@_) } # alias - - -sub accept_targets { shift->_accept_targets('1', @_) } - -sub accept_targets_as_text { shift->_accept_targets('force_resolve', @_) } - # forces them to be processed, even when there's no ":". - -sub _accept_targets { - my($this, $type) = splice @_,0,2; - foreach my $t (@_) { - next unless defined $t and length $t; - # TODO: enforce some limitations on what a target name can be? - $this->{'accept_targets'}{$t} = $type; - DEBUG > 2 and print "Learning to accept \"$t\" as target of type $type\n"; - } - return sort keys %{ $this->{'accept_targets'} } if wantarray; - return; -} - -#-------------------------------------------------------------------------- -sub unaccept_target { shift->unaccept_targets(@_) } - -sub unaccept_targets { - my $this = shift; - foreach my $t (@_) { - next unless defined $t and length $t; - # TODO: enforce some limitations on what a target name can be? - delete $this->{'accept_targets'}{$t}; - DEBUG > 2 and print "OK, won't accept \"$t\" as target.\n"; - } - return sort keys %{ $this->{'accept_targets'} } if wantarray; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# -# And now codes (not targets or directives) - -sub accept_code { shift->accept_codes(@_) } # alias - -sub accept_codes { # Add some codes - my $this = shift; - - foreach my $new_code (@_) { - next unless defined $new_code and length $new_code; - if(ASCII) { - # A good-enough check that it's good as an XML Name symbol: - Carp::croak "\"$new_code\" isn't a valid element name" - if $new_code =~ - m/[\x00-\x2C\x2F\x39\x3B-\x40\x5B-\x5E\x60\x7B-\x7F]/ - # Characters under 0x80 that aren't legal in an XML Name. - or $new_code =~ m/^[-\.0-9]/s - or $new_code =~ m/:[-\.0-9]/s; - # The legal under-0x80 Name characters that - # an XML Name still can't start with. - } - - $this->{'accept_codes'}{$new_code} = $new_code; - - # Yes, map to itself -- just so that when we - # see "=extend W [whatever] thatelementname", we say that W maps - # to whatever $this->{accept_codes}{thatelementname} is, - # i.e., "thatelementname". Then when we go re-mapping, - # a "W" in the treelet turns into "thatelementname". We only - # remap once. - # If we say we accept "W", then a "W" in the treelet simply turns - # into "W". - } - - return; -} - -#-------------------------------------------------------------------------- -sub unaccept_code { shift->unaccept_codes(@_) } - -sub unaccept_codes { # remove some codes - my $this = shift; - - foreach my $new_code (@_) { - next unless defined $new_code and length $new_code; - if(ASCII) { - # A good-enough check that it's good as an XML Name symbol: - Carp::croak "\"$new_code\" isn't a valid element name" - if $new_code =~ - m/[\x00-\x2C\x2F\x39\x3B-\x40\x5B-\x5E\x60\x7B-\x7F]/ - # Characters under 0x80 that aren't legal in an XML Name. - or $new_code =~ m/^[-\.0-9]/s - or $new_code =~ m/:[-\.0-9]/s; - # The legal under-0x80 Name characters that - # an XML Name still can't start with. - } - - Carp::croak "But you must accept \"$new_code\" codes -- it's a builtin!" - if grep $new_code eq $_, @Known_formatting_codes; - - delete $this->{'accept_codes'}{$new_code}; - - DEBUG > 2 and print "OK, won't accept the code $new_code<...>.\n"; - } - - return; -} - - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub parse_string_document { - my $self = shift; - my @lines; - foreach my $line_group (@_) { - next unless defined $line_group and length $line_group; - pos($line_group) = 0; - while($line_group =~ - m/([^\n\r]*)((?:\r?\n)?)/g - ) { - #print(">> $1\n"), - $self->parse_lines($1) - if length($1) or length($2) - or pos($line_group) != length($line_group); - # I.e., unless it's a zero-length "empty line" at the very - # end of "foo\nbar\n" (i.e., between the \n and the EOS). - } - } - $self->parse_lines(undef); # to signal EOF - return $self; -} - -sub _init_fh_source { - my($self, $source) = @_; - - #DEBUG > 1 and print "Declaring $source as :raw for starters\n"; - #$self->_apply_binmode($source, ':raw'); - #binmode($source, ":raw"); - - return; -} - -#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. -# - -sub parse_file { - my($self, $source) = (@_); - - if(!defined $source) { - Carp::croak("Can't use empty-string as a source for parse_file"); - } elsif(ref(\$source) eq 'GLOB') { - $self->{'source_filename'} = '' . ($source); - } elsif(ref $source) { - $self->{'source_filename'} = '' . ($source); - } elsif(!length $source) { - Carp::croak("Can't use empty-string as a source for parse_file"); - } else { - { - local *PODSOURCE; - open(PODSOURCE, "<$source") || Carp::croak("Can't open $source: $!"); - $self->{'source_filename'} = $source; - $source = *PODSOURCE{IO}; - } - $self->_init_fh_source($source); - } - # By here, $source is a FH. - - $self->{'source_fh'} = $source; - - my($i, @lines); - until( $self->{'source_dead'} ) { - splice @lines; - for($i = MANY_LINES; $i--;) { # read those many lines at a time - local $/ = $NL; - push @lines, scalar(<$source>); # readline - last unless defined $lines[-1]; - # but pass thru the undef, which will set source_dead to true - } - $self->parse_lines(@lines); - } - delete($self->{'source_fh'}); # so it can be GC'd - return $self; -} - -#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - -sub parse_from_file { - # An emulation of Pod::Parser's interface, for the sake of Perldoc. - # Basically just a wrapper around parse_file. - - my($self, $source, $to) = @_; - $self = $self->new unless ref($self); # so we tolerate being a class method - - if(!defined $source) { $source = *STDIN{IO} - } elsif(ref(\$source) eq 'GLOB') { # stet - } elsif(ref($source) ) { # stet - } elsif(!length $source - or $source eq '-' or $source =~ m/^<&(STDIN|0)$/i - ) { - $source = *STDIN{IO}; - } - - if(!defined $to) { $self->output_fh( *STDOUT{IO} ); - } elsif(ref(\$to) eq 'GLOB') { $self->output_fh( $to ); - } elsif(ref($to)) { $self->output_fh( $to ); - } elsif(!length $to - or $to eq '-' or $to =~ m/^>&?(?:STDOUT|1)$/i - ) { - $self->output_fh( *STDOUT{IO} ); - } else { - require Symbol; - my $out_fh = Symbol::gensym(); - DEBUG and print "Write-opening to $to\n"; - open($out_fh, ">$to") or Carp::croak "Can't write-open $to: $!"; - binmode($out_fh) - if $self->can('write_with_binmode') and $self->write_with_binmode; - $self->output_fh($out_fh); - } - - return $self->parse_file($source); -} - -#----------------------------------------------------------------------------- - -sub whine { - #my($self,$line,$complaint) = @_; - my $self = shift(@_); - ++$self->{'errors_seen'}; - if($self->{'no_whining'}) { - DEBUG > 9 and print "Discarding complaint (at line $_[0]) $_[1]\n because no_whining is on.\n"; - return; - } - return $self->_complain_warn(@_) if $self->{'complain_stderr'}; - return $self->_complain_errata(@_); -} - -sub scream { # like whine, but not suppressable - #my($self,$line,$complaint) = @_; - my $self = shift(@_); - ++$self->{'errors_seen'}; - return $self->_complain_warn(@_) if $self->{'complain_stderr'}; - return $self->_complain_errata(@_); -} - -sub _complain_warn { - my($self,$line,$complaint) = @_; - return printf STDERR "%s around line %s: %s\n", - $self->{'source_filename'} || 'Pod input', $line, $complaint; -} - -sub _complain_errata { - my($self,$line,$complaint) = @_; - if( $self->{'no_errata_section'} ) { - DEBUG > 9 and print "Discarding erratum (at line $line) $complaint\n because no_errata_section is on.\n"; - } else { - DEBUG > 9 and print "Queuing erratum (at line $line) $complaint\n"; - push @{$self->{'errata'}{$line}}, $complaint - # for a report to be generated later! - } - return 1; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _get_initial_item_type { - # A hack-wrapper here for when you have like "=over\n\n=item 456\n\n" - my($self, $para) = @_; - return $para->[1]{'~type'} if $para->[1]{'~type'}; - - return $para->[1]{'~type'} = 'text' - if join("\n", @{$para}[2 .. $#$para]) =~ m/^\s*(\d+)\.?\s*$/s and $1 ne '1'; - # Else fall thru to the general case: - return $self->_get_item_type($para); -} - - - -sub _get_item_type { # mutates the item!! - my($self, $para) = @_; - return $para->[1]{'~type'} if $para->[1]{'~type'}; - - - # Otherwise we haven't yet been to this node. Maybe alter it... - - my $content = join "\n", @{$para}[2 .. $#$para]; - - if($content =~ m/^\s*\*\s*$/s or $content =~ m/^\s*$/s) { - # Like: "=item *", "=item * ", "=item" - splice @$para, 2; # so it ends up just being ['=item', { attrhash } ] - $para->[1]{'~orig_content'} = $content; - return $para->[1]{'~type'} = 'bullet'; - - } elsif($content =~ m/^\s*\*\s+(.+)/s) { # tolerance - - # Like: "=item * Foo bar baz"; - $para->[1]{'~orig_content'} = $content; - $para->[1]{'~_freaky_para_hack'} = $1; - DEBUG > 2 and print " Tolerating $$para[2] as =item *\\n\\n$1\n"; - splice @$para, 2; # so it ends up just being ['=item', { attrhash } ] - return $para->[1]{'~type'} = 'bullet'; - - } elsif($content =~ m/^\s*(\d+)\.?\s*$/s) { - # Like: "=item 1.", "=item 123412" - - $para->[1]{'~orig_content'} = $content; - $para->[1]{'number'} = $1; # Yes, stores the number there! - - splice @$para, 2; # so it ends up just being ['=item', { attrhash } ] - return $para->[1]{'~type'} = 'number'; - - } else { - # It's anything else. - return $para->[1]{'~type'} = 'text'; - - } -} - -#----------------------------------------------------------------------------- - -sub _make_treelet { - my $self = shift; # and ($para, $start_line) - my $treelet; - if(!@_) { - return ['']; - } if(ref $_[0] and ref $_[0][0] and $_[0][0][0] eq '~Top') { - # Hack so we can pass in fake-o pre-cooked paragraphs: - # just have the first line be a reference to a ['~Top', {}, ...] - # We use this feechure in gen_errata and stuff. - - DEBUG and print "Applying precooked treelet hack to $_[0][0]\n"; - $treelet = $_[0][0]; - splice @$treelet, 0, 2; # lop the top off - return $treelet; - } else { - $treelet = $self->_treelet_from_formatting_codes(@_); - } - - if( $self->_remap_sequences($treelet) ) { - $self->_treat_Zs($treelet); # Might as well nix these first - $self->_treat_Ls($treelet); # L has to precede E and S - $self->_treat_Es($treelet); - $self->_treat_Ss($treelet); # S has to come after E - - $self->_wrap_up($treelet); # Nix X's and merge texties - - } else { - DEBUG and print "Formatless treelet gets fast-tracked.\n"; - # Very common case! - } - - splice @$treelet, 0, 2; # lop the top off - - return $treelet; -} - -#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - -sub _wrap_up { - my($self, @stack) = @_; - my $nixx = $self->{'nix_X_codes'}; - my $merge = $self->{'merge_text' }; - return unless $nixx or $merge; - - DEBUG > 2 and print "\nStarting _wrap_up traversal.\n", - $merge ? (" Merge mode on\n") : (), - $nixx ? (" Nix-X mode on\n") : (), - ; - - - my($i, $treelet); - while($treelet = shift @stack) { - DEBUG > 3 and print " Considering children of this $treelet->[0] node...\n"; - for($i = 2; $i < @$treelet; ++$i) { # iterate over children - DEBUG > 3 and print " Considering child at $i ", pretty($treelet->[$i]), "\n"; - if($nixx and ref $treelet->[$i] and $treelet->[$i][0] eq 'X') { - DEBUG > 3 and print " Nixing X node at $i\n"; - splice(@$treelet, $i, 1); # just nix this node (and its descendants) - # no need to back-update the counter just yet - redo; - - } elsif($merge and $i != 2 and # non-initial - !ref $treelet->[$i] and !ref $treelet->[$i - 1] - ) { - DEBUG > 3 and print " Merging ", $i-1, - ":[$treelet->[$i-1]] and $i\:[$treelet->[$i]]\n"; - $treelet->[$i-1] .= ( splice(@$treelet, $i, 1) )[0]; - DEBUG > 4 and print " Now: ", $i-1, ":[$treelet->[$i-1]]\n"; - --$i; - next; - # since we just pulled the possibly last node out from under - # ourselves, we can't just redo() - - } elsif( ref $treelet->[$i] ) { - DEBUG > 4 and print " Enqueuing ", pretty($treelet->[$i]), " for traversal.\n"; - push @stack, $treelet->[$i]; - - if($treelet->[$i][0] eq 'L') { - my $thing; - foreach my $attrname ('section', 'to') { - if(defined($thing = $treelet->[$i][1]{$attrname}) and ref $thing) { - unshift @stack, $thing; - DEBUG > 4 and print " +Enqueuing ", - pretty( $treelet->[$i][1]{$attrname} ), - " as an attribute value to tweak.\n"; - } - } - } - } - } - } - DEBUG > 2 and print "End of _wrap_up traversal.\n\n"; - - return; -} - -#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - -sub _remap_sequences { - my($self,@stack) = @_; - - if(@stack == 1 and @{ $stack[0] } == 3 and !ref $stack[0][2]) { - # VERY common case: abort it. - DEBUG and print "Skipping _remap_sequences: formatless treelet.\n"; - return 0; - } - - my $map = ($self->{'accept_codes'} || die "NO accept_codes in $self?!?"); - - my $start_line = $stack[0][1]{'start_line'}; - DEBUG > 2 and printf - "\nAbout to start _remap_sequences on treelet from line %s.\n", - $start_line || '[?]' - ; - DEBUG > 3 and print " Map: ", - join('; ', map "$_=" . ( - ref($map->{$_}) ? join(",", @{$map->{$_}}) : $map->{$_} - ), - sort keys %$map ), - ("B~C~E~F~I~L~S~X~Z" eq join '~', sort keys %$map) - ? " (all normal)\n" : "\n" - ; - - # A recursive algorithm implemented iteratively! Whee! - - my($is, $was, $i, $treelet); # scratch - while($treelet = shift @stack) { - DEBUG > 3 and print " Considering children of this $treelet->[0] node...\n"; - for($i = 2; $i < @$treelet; ++$i) { # iterate over children - next unless ref $treelet->[$i]; # text nodes are uninteresting - - DEBUG > 4 and print " Noting child $i : $treelet->[$i][0]<...>\n"; - - $is = $treelet->[$i][0] = $map->{ $was = $treelet->[$i][0] }; - if( DEBUG > 3 ) { - if(!defined $is) { - print " Code $was<> is UNKNOWN!\n"; - } elsif($is eq $was) { - DEBUG > 4 and print " Code $was<> stays the same.\n"; - } else { - print " Code $was<> maps to ", - ref($is) - ? ( "tags ", map("$_<", @$is), '...', map('>', @$is), "\n" ) - : "tag $is<...>.\n"; - } - } - - if(!defined $is) { - $self->whine($start_line, "Deleting unknown formatting code $was<>"); - $is = $treelet->[$i][0] = '1'; # But saving the children! - # I could also insert a leading "$was<" and tailing ">" as - # children of this node, but something about that seems icky. - } - if(ref $is) { - my @dynasty = @$is; - DEBUG > 4 and print " Renaming $was node to $dynasty[-1]\n"; - $treelet->[$i][0] = pop @dynasty; - my $nugget; - while(@dynasty) { - DEBUG > 4 and printf - " Grafting a new %s node between %s and %s\n", - $dynasty[-1], $treelet->[0], $treelet->[$i][0], - ; - - #$nugget = ; - splice @$treelet, $i, 1, [pop(@dynasty), {}, $treelet->[$i]]; - # relace node with a new parent - } - } elsif($is eq '0') { - splice(@$treelet, $i, 1); # just nix this node (and its descendants) - --$i; # back-update the counter - } elsif($is eq '1') { - splice(@$treelet, $i, 1 # replace this node with its children! - => splice @{ $treelet->[$i] },2 - # (not catching its first two (non-child) items) - ); - --$i; # back up for new stuff - } else { - # otherwise it's unremarkable - unshift @stack, $treelet->[$i]; # just recurse - } - } - } - - DEBUG > 2 and print "End of _remap_sequences traversal.\n\n"; - - if(@_ == 2 and @{ $_[1] } == 3 and !ref $_[1][2]) { - DEBUG and print "Noting that the treelet is now formatless.\n"; - return 0; - } - return 1; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub _ponder_extend { - - # "Go to an extreme, move back to a more comfortable place" - # -- /Oblique Strategies/, Brian Eno and Peter Schmidt - - my($self, $para) = @_; - my $content = join ' ', splice @$para, 2; - $content =~ s/^\s+//s; - $content =~ s/\s+$//s; - - DEBUG > 2 and print "Ogling extensor: =extend $content\n"; - - if($content =~ - m/^ - (\S+) # 1 : new item - \s+ - (\S+) # 2 : fallback(s) - (?:\s+(\S+))? # 3 : element name(s) - \s* - $ - /xs - ) { - my $new_letter = $1; - my $fallbacks_one = $2; - my $elements_one; - $elements_one = defined($3) ? $3 : $1; - - DEBUG > 2 and print "Extensor has good syntax.\n"; - - unless($new_letter =~ m/^[A-Z]$/s or $new_letter) { - DEBUG > 2 and print " $new_letter isn't a valid thing to entend.\n"; - $self->whine( - $para->[1]{'start_line'}, - "You can extend only formatting codes A-Z, not like \"$new_letter\"" - ); - return; - } - - if(grep $new_letter eq $_, @Known_formatting_codes) { - DEBUG > 2 and print " $new_letter isn't a good thing to extend, because known.\n"; - $self->whine( - $para->[1]{'start_line'}, - "You can't extend an established code like \"$new_letter\"" - ); - - #TODO: or allow if last bit is same? - - return; - } - - unless($fallbacks_one =~ m/^[A-Z](,[A-Z])*$/s # like "B", "M,I", etc. - or $fallbacks_one eq '0' or $fallbacks_one eq '1' - ) { - $self->whine( - $para->[1]{'start_line'}, - "Format for second =extend parameter must be like" - . " M or 1 or 0 or M,N or M,N,O but you have it like " - . $fallbacks_one - ); - return; - } - - unless($elements_one =~ m/^[^ ,]+(,[^ ,]+)*$/s) { # like "B", "M,I", etc. - $self->whine( - $para->[1]{'start_line'}, - "Format for third =extend parameter: like foo or bar,Baz,qu:ux but not like " - . $elements_one - ); - return; - } - - my @fallbacks = split ',', $fallbacks_one, -1; - my @elements = split ',', $elements_one, -1; - - foreach my $f (@fallbacks) { - next if exists $Known_formatting_codes{$f} or $f eq '0' or $f eq '1'; - DEBUG > 2 and print " Can't fall back on unknown code $f\n"; - $self->whine( - $para->[1]{'start_line'}, - "Can't use unknown formatting code '$f' as a fallback for '$new_letter'" - ); - return; - } - - DEBUG > 3 and printf "Extensor: Fallbacks <%s> Elements <%s>.\n", - @fallbacks, @elements; - - my $canonical_form; - foreach my $e (@elements) { - if(exists $self->{'accept_codes'}{$e}) { - DEBUG > 1 and print " Mapping '$new_letter' to known extension '$e'\n"; - $canonical_form = $e; - last; # first acceptable elementname wins! - } else { - DEBUG > 1 and print " Can't map '$new_letter' to unknown extension '$e'\n"; - } - } - - - if( defined $canonical_form ) { - # We found a good N => elementname mapping - $self->{'accept_codes'}{$new_letter} = $canonical_form; - DEBUG > 2 and print - "Extensor maps $new_letter => known element $canonical_form.\n"; - } else { - # We have to use the fallback(s), which might be '0', or '1'. - $self->{'accept_codes'}{$new_letter} - = (@fallbacks == 1) ? $fallbacks[0] : \@fallbacks; - DEBUG > 2 and print - "Extensor maps $new_letter => fallbacks @fallbacks.\n"; - } - - } else { - DEBUG > 2 and print "Extensor has bad syntax.\n"; - $self->whine( - $para->[1]{'start_line'}, - "Unknown =extend syntax: $content" - ) - } - return; -} - - -#:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - -sub _treat_Zs { # Nix Z<...>'s - my($self,@stack) = @_; - - my($i, $treelet); - my $start_line = $stack[0][1]{'start_line'}; - - # A recursive algorithm implemented iteratively! Whee! - - while($treelet = shift @stack) { - for($i = 2; $i < @$treelet; ++$i) { # iterate over children - next unless ref $treelet->[$i]; # text nodes are uninteresting - unless($treelet->[$i][0] eq 'Z') { - unshift @stack, $treelet->[$i]; # recurse - next; - } - - DEBUG > 1 and print "Nixing Z node @{$treelet->[$i]}\n"; - - # bitch UNLESS it's empty - unless( @{$treelet->[$i]} == 2 - or (@{$treelet->[$i]} == 3 and $treelet->[$i][2] eq '') - ) { - $self->whine( $start_line, "A non-empty Z<>" ); - } # but kill it anyway - - splice(@$treelet, $i, 1); # thereby just nix this node. - --$i; - - } - } - - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -# Quoting perlpodspec: - -# In parsing an L<...> code, Pod parsers must distinguish at least four -# attributes: - -############# Not used. Expressed via the element children plus -############# the value of the "content-implicit" flag. -# First: -# The link-text. If there is none, this must be undef. (E.g., in "L<Perl -# Functions|perlfunc>", the link-text is "Perl Functions". In -# "L<Time::HiRes>" and even "L<|Time::HiRes>", there is no link text. Note -# that link text may contain formatting.) -# - -############# The element children -# Second: -# The possibly inferred link-text -- i.e., if there was no real link text, -# then this is the text that we'll infer in its place. (E.g., for -# "L<Getopt::Std>", the inferred link text is "Getopt::Std".) -# - -############# The "to" attribute (which might be text, or a treelet) -# Third: -# The name or URL, or undef if none. (E.g., in "L<Perl -# Functions|perlfunc>", the name -- also sometimes called the page -- is -# "perlfunc". In "L</CAVEATS>", the name is undef.) -# - -############# The "section" attribute (which might be next, or a treelet) -# Fourth: -# The section (AKA "item" in older perlpods), or undef if none. E.g., in -# Getopt::Std/DESCRIPTION, "DESCRIPTION" is the section. (Note that this -# is not the same as a manpage section like the "5" in "man 5 crontab". -# "Section Foo" in the Pod sense means the part of the text that's -# introduced by the heading or item whose text is "Foo".) -# -# Pod parsers may also note additional attributes including: -# - -############# The "type" attribute. -# Fifth: -# A flag for whether item 3 (if present) is a URL (like -# "http://lists.perl.org" is), in which case there should be no section -# attribute; a Pod name (like "perldoc" and "Getopt::Std" are); or -# possibly a man page name (like "crontab(5)" is). -# - -############# Not implemented, I guess. -# Sixth: -# The raw original L<...> content, before text is split on "|", "/", etc, -# and before E<...> codes are expanded. - - -# For L<...> codes without a "name|" part, only E<...> and Z<> codes may -# occur -- no other formatting codes. That is, authors should not use -# "L<B<Foo::Bar>>". -# -# Note, however, that formatting codes and Z<>'s can occur in any and all -# parts of an L<...> (i.e., in name, section, text, and url). - -sub _treat_Ls { # Process our dear dear friends, the L<...> sequences - - # L<name> - # L<name/"sec"> or L<name/sec> - # L</"sec"> or L</sec> or L<"sec"> - # L<text|name> - # L<text|name/"sec"> or L<text|name/sec> - # L<text|/"sec"> or L<text|/sec> or L<text|"sec"> - # L<scheme:...> - - my($self,@stack) = @_; - - my($i, $treelet); - my $start_line = $stack[0][1]{'start_line'}; - - # A recursive algorithm implemented iteratively! Whee! - - while($treelet = shift @stack) { - for(my $i = 2; $i < @$treelet; ++$i) { - # iterate over children of current tree node - next unless ref $treelet->[$i]; # text nodes are uninteresting - unless($treelet->[$i][0] eq 'L') { - unshift @stack, $treelet->[$i]; # recurse - next; - } - - - # By here, $treelet->[$i] is definitely an L node - DEBUG > 1 and print "Ogling L node $treelet->[$i]\n"; - - # bitch if it's empty - if( @{$treelet->[$i]} == 2 - or (@{$treelet->[$i]} == 3 and $treelet->[$i][2] eq '') - ) { - $self->whine( $start_line, "An empty L<>" ); - $treelet->[$i] = 'L<>'; # just make it a text node - next; # and move on - } - - # Catch URLs: - # URLs can, alas, contain E<...> sequences, so we can't /assume/ - # that this is one text node. But it has to START with one text - # node... - if(! ref $treelet->[$i][2] and - $treelet->[$i][2] =~ m/^\w+:[^:\s]\S*$/s - ) { - $treelet->[$i][1]{'type'} = 'url'; - $treelet->[$i][1]{'content-implicit'} = 'yes'; - - # TODO: deal with rel: URLs here? - - if( 3 == @{ $treelet->[$i] } ) { - # But if it IS just one text node (most common case) - DEBUG > 1 and printf qq{Catching "%s as " as ho-hum L<URL> link.\n}, - $treelet->[$i][2] - ; - $treelet->[$i][1]{'to'} = Pod::Simple::LinkSection->new( - $treelet->[$i][2] - ); # its own treelet - } else { - # It's a URL but complex (like "L<foo:bazE<123>bar>"). Feh. - #$treelet->[$i][1]{'to'} = [ @{$treelet->[$i]} ]; - #splice @{ $treelet->[$i][1]{'to'} }, 0,2; - #DEBUG > 1 and printf qq{Catching "%s as " as complex L<URL> link.\n}, - # join '~', @{$treelet->[$i][1]{'to' }}; - - $treelet->[$i][1]{'to'} = Pod::Simple::LinkSection->new( - $treelet->[$i] # yes, clone the whole content as a treelet - ); - $treelet->[$i][1]{'to'}[0] = ''; # set the copy's tagname to nil - die "SANITY FAILURE" if $treelet->[0] eq ''; # should never happen! - DEBUG > 1 and print - qq{Catching "$treelet->[$i][1]{'to'}" as a complex L<URL> link.\n}; - } - - next; # and move on - } - - - # Catch some very simple and/or common cases - if(@{$treelet->[$i]} == 3 and ! ref $treelet->[$i][2]) { - my $it = $treelet->[$i][2]; - if($it =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s) { # man sections - # Hopefully neither too broad nor too restrictive a RE - DEBUG > 1 and print "Catching \"$it\" as manpage link.\n"; - $treelet->[$i][1]{'type'} = 'man'; - # This's the only place where man links can get made. - $treelet->[$i][1]{'content-implicit'} = 'yes'; - $treelet->[$i][1]{'to' } = - Pod::Simple::LinkSection->new( $it ); # treelet! - - next; - } - if($it =~ m/^[^\/\|,\$\%\@\ \"\<\>\:\#\&\*\{\}\[\]\(\)]+(\:\:[^\/\|,\$\%\@\ \"\<\>\:\#\&\*\{\}\[\]\(\)]+)*$/s) { - # Extremely forgiving idea of what constitutes a bare - # modulename link like L<Foo::Bar> or even L<Thing::1.0::Docs::Tralala> - DEBUG > 1 and print "Catching \"$it\" as ho-hum L<Modulename> link.\n"; - $treelet->[$i][1]{'type'} = 'pod'; - $treelet->[$i][1]{'content-implicit'} = 'yes'; - $treelet->[$i][1]{'to' } = - Pod::Simple::LinkSection->new( $it ); # treelet! - next; - } - # else fall thru... - } - - - - # ...Uhoh, here's the real L<...> parsing stuff... - # "With the ill behavior, with the ill behavior, with the ill behavior..." - - DEBUG > 1 and print "Running a real parse on this non-trivial L\n"; - - - my $link_text; # set to an arrayref if found - my $ell = $treelet->[$i]; - my @ell_content = @$ell; - splice @ell_content,0,2; # Knock off the 'L' and {} bits - - DEBUG > 3 and print " Ell content to start: ", - pretty(@ell_content), "\n"; - - - # Look for the "|" -- only in CHILDREN (not all underlings!) - # Like L<I like the strictness|strict> - DEBUG > 3 and - print " Peering at L content for a '|' ...\n"; - for(my $j = 0; $j < @ell_content; ++$j) { - next if ref $ell_content[$j]; - DEBUG > 3 and - print " Peering at L-content text bit \"$ell_content[$j]\" for a '|'.\n"; - - if($ell_content[$j] =~ m/^([^\|]*)\|(.*)$/s) { - my @link_text = ($1); # might be 0-length - $ell_content[$j] = $2; # might be 0-length - - DEBUG > 3 and - print " FOUND a '|' in it. Splitting into [$1] + [$2]\n"; - - unshift @link_text, splice @ell_content, 0, $j; - # leaving only things at J and after - @ell_content = grep ref($_)||length($_), @ell_content ; - $link_text = [grep ref($_)||length($_), @link_text ]; - DEBUG > 3 and printf - " So link text is %s\n and remaining ell content is %s\n", - pretty($link_text), pretty(@ell_content); - last; - } - } - - - # Now look for the "/" -- only in CHILDREN (not all underlings!) - # And afterward, anything left in @ell_content will be the raw name - # Like L<Foo::Bar/Object Methods> - my $section_name; # set to arrayref if found - DEBUG > 3 and print " Peering at L-content for a '/' ...\n"; - for(my $j = 0; $j < @ell_content; ++$j) { - next if ref $ell_content[$j]; - DEBUG > 3 and - print " Peering at L-content text bit \"$ell_content[$j]\" for a '/'.\n"; - - if($ell_content[$j] =~ m/^([^\/]*)\/(.*)$/s) { - my @section_name = ($2); # might be 0-length - $ell_content[$j] = $1; # might be 0-length - - DEBUG > 3 and - print " FOUND a '/' in it.", - " Splitting to page [...$1] + section [$2...]\n"; - - push @section_name, splice @ell_content, 1+$j; - # leaving only things before and including J - - @ell_content = grep ref($_)||length($_), @ell_content ; - @section_name = grep ref($_)||length($_), @section_name ; - - # Turn L<.../"foo"> into L<.../foo> - if(@section_name - and !ref($section_name[0]) and !ref($section_name[-1]) - and $section_name[ 0] =~ m/^\"/s - and $section_name[-1] =~ m/\"$/s - and !( # catch weird degenerate case of L<"> ! - @section_name == 1 and $section_name[0] eq '"' - ) - ) { - $section_name[ 0] =~ s/^\"//s; - $section_name[-1] =~ s/\"$//s; - DEBUG > 3 and - print " Quotes removed: ", pretty(@section_name), "\n"; - } else { - DEBUG > 3 and - print " No need to remove quotes in ", pretty(@section_name), "\n"; - } - - $section_name = \@section_name; - last; - } - } - - # Turn L<"Foo Bar"> into L</Foo Bar> - if(!$section_name and @ell_content - and !ref($ell_content[0]) and !ref($ell_content[-1]) - and $ell_content[ 0] =~ m/^\"/s - and $ell_content[-1] =~ m/\"$/s - and !( # catch weird degenerate case of L<"> ! - @ell_content == 1 and $ell_content[0] eq '"' - ) - ) { - $section_name = [splice @ell_content]; - $section_name->[ 0] =~ s/^\"//s; - $section_name->[-1] =~ s/\"$//s; - } - - # Turn L<Foo Bar> into L</Foo Bar>. - if(!$section_name and !$link_text and @ell_content - and grep !ref($_) && m/ /s, @ell_content - ) { - $section_name = [splice @ell_content]; - # That's support for the now-deprecated syntax. - # (Maybe generate a warning eventually?) - # Note that it deliberately won't work on L<...|Foo Bar> - } - - - # Now make up the link_text - # L<Foo> -> L<Foo|Foo> - # L</Bar> -> L<"Bar"|Bar> - # L<Foo/Bar> -> L<"Bar" in Foo/Foo> - unless($link_text) { - $ell->[1]{'content-implicit'} = 'yes'; - $link_text = []; - push @$link_text, '"', @$section_name, '"' if $section_name; - - if(@ell_content) { - $link_text->[-1] .= ' in ' if $section_name; - push @$link_text, @ell_content; - } - } - - - # And the E resolver will have to deal with all our treeletty things: - - if(@ell_content == 1 and !ref($ell_content[0]) - and $ell_content[0] =~ m/^[-a-zA-Z0-9]+\([-a-zA-Z0-9]+\)$/s - ) { - $ell->[1]{'type'} = 'man'; - DEBUG > 3 and print "Considering this ($ell_content[0]) a man link.\n"; - } else { - $ell->[1]{'type'} = 'pod'; - DEBUG > 3 and print "Considering this a pod link (not man or url).\n"; - } - - if( defined $section_name ) { - $ell->[1]{'section'} = Pod::Simple::LinkSection->new( - ['', {}, @$section_name] - ); - DEBUG > 3 and print "L-section content: ", pretty($ell->[1]{'section'}), "\n"; - } - - if( @ell_content ) { - $ell->[1]{'to'} = Pod::Simple::LinkSection->new( - ['', {}, @ell_content] - ); - DEBUG > 3 and print "L-to content: ", pretty($ell->[1]{'to'}), "\n"; - } - - # And update children to be the link-text: - @$ell = (@$ell[0,1], defined($link_text) ? splice(@$link_text) : ''); - - DEBUG > 2 and print "End of L-parsing for this node $treelet->[$i]\n"; - - unshift @stack, $treelet->[$i]; # might as well recurse - } - } - - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub _treat_Es { - my($self,@stack) = @_; - - my($i, $treelet, $content, $replacer, $charnum); - my $start_line = $stack[0][1]{'start_line'}; - - # A recursive algorithm implemented iteratively! Whee! - - - # Has frightening side effects on L nodes' attributes. - - #my @ells_to_tweak; - - while($treelet = shift @stack) { - for(my $i = 2; $i < @$treelet; ++$i) { # iterate over children - next unless ref $treelet->[$i]; # text nodes are uninteresting - if($treelet->[$i][0] eq 'L') { - # SPECIAL STUFF for semi-processed L<>'s - - my $thing; - foreach my $attrname ('section', 'to') { - if(defined($thing = $treelet->[$i][1]{$attrname}) and ref $thing) { - unshift @stack, $thing; - DEBUG > 2 and print " Enqueuing ", - pretty( $treelet->[$i][1]{$attrname} ), - " as an attribute value to tweak.\n"; - } - } - - unshift @stack, $treelet->[$i]; # recurse - next; - } elsif($treelet->[$i][0] ne 'E') { - unshift @stack, $treelet->[$i]; # recurse - next; - } - - DEBUG > 1 and print "Ogling E node ", pretty($treelet->[$i]), "\n"; - - # bitch if it's empty - if( @{$treelet->[$i]} == 2 - or (@{$treelet->[$i]} == 3 and $treelet->[$i][2] eq '') - ) { - $self->whine( $start_line, "An empty E<>" ); - $treelet->[$i] = 'E<>'; # splice in a literal - next; - } - - # bitch if content is weird - unless(@{$treelet->[$i]} == 3 and !ref($content = $treelet->[$i][2])) { - $self->whine( $start_line, "An E<...> surrounding strange content" ); - $replacer = $treelet->[$i]; # scratch - splice(@$treelet, $i, 1, # fake out a literal - 'E<', - splice(@$replacer,2), # promote its content - '>' - ); - # Don't need to do --$i, as the 'E<' we just added isn't interesting. - next; - } - - DEBUG > 1 and print "Ogling E<$content>\n"; - - $charnum = Pod::Escapes::e2charnum($content); - DEBUG > 1 and print " Considering E<$content> with char ", - defined($charnum) ? $charnum : "undef", ".\n"; - - if(!defined( $charnum )) { - DEBUG > 1 and print "I don't know how to deal with E<$content>.\n"; - $self->whine( $start_line, "Unknown E content in E<$content>" ); - $replacer = "E<$content>"; # better than nothing - } elsif($charnum >= 255 and !UNICODE) { - $replacer = ASCII ? "\xA4" : "?"; - DEBUG > 1 and print "This Perl version can't handle ", - "E<$content> (chr $charnum), so replacing with $replacer\n"; - } else { - $replacer = Pod::Escapes::e2char($content); - DEBUG > 1 and print " Replacing E<$content> with $replacer\n"; - } - - splice(@$treelet, $i, 1, $replacer); # no need to back up $i, tho - } - } - - return; -} - - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub _treat_Ss { - my($self,$treelet) = @_; - - _change_S_to_nbsp($treelet,0) if $self->{'nbsp_for_S'}; - - # TODO: or a change_nbsp_to_S - # Normalizing nbsp's to S is harder: for each text node, make S content - # out of anything matching m/([^ \xA0]*(?:\xA0+[^ \xA0]*)+)/ - - - return; -} - - -sub _change_S_to_nbsp { # a recursive function - # Sanely assumes that the top node in the excursion won't be an S node. - my($treelet, $in_s) = @_; - - my $is_s = ('S' eq $treelet->[0]); - $in_s ||= $is_s; # So in_s is on either by this being an S element, - # or by an ancestor being an S element. - - for(my $i = 2; $i < @$treelet; ++$i) { - if(ref $treelet->[$i]) { - if( _change_S_to_nbsp( $treelet->[$i], $in_s ) ) { - my $to_pull_up = $treelet->[$i]; - splice @$to_pull_up,0,2; # ...leaving just its content - splice @$treelet, $i, 1, @$to_pull_up; # Pull up content - $i += @$to_pull_up - 1; # Make $i skip the pulled-up stuff - } - } else { - $treelet->[$i] =~ s/\s/\xA0/g if ASCII and $in_s; - # (If not in ASCIIland, we can't assume that \xA0 == nbsp.) - - # Note that if you apply nbsp_for_S to text, and so turn - # "foo S<bar baz> quux" into "foo bar faz quux", you - # end up with something that fails to say "and don't hyphenate - # any part of 'bar baz'". However, hyphenation is such a vexing - # problem anyway, that most Pod renderers just don't render it - # at all. But if you do want to implement hyphenation, I guess - # that you'd better have nbsp_for_S off. - } - } - - return $is_s; -} - -#----------------------------------------------------------------------------- - -sub _accessorize { # A simple-minded method-maker - no strict 'refs'; - foreach my $attrname (@_) { - next if $attrname =~ m/::/; # a hack - *{caller() . '::' . $attrname} = sub { - use strict; - $Carp::CarpLevel = 1, Carp::croak( - "Accessor usage: \$obj->$attrname() or \$obj->$attrname(\$new_value)" - ) unless (@_ == 1 or @_ == 2) and ref $_[0]; - (@_ == 1) ? $_[0]->{$attrname} - : ($_[0]->{$attrname} = $_[1]); - }; - } - # Ya know, they say accessories make the ensemble! - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -#============================================================================= - -sub filter { - my($class, $source) = @_; - my $new = $class->new; - $new->output_fh(*STDOUT{IO}); - - if(ref($source || '') eq 'SCALAR') { - $new->parse_string_document( $$source ); - } elsif(ref($source)) { # it's a file handle - $new->parse_file($source); - } else { # it's a filename - $new->parse_file($source); - } - - return $new; -} - - -#----------------------------------------------------------------------------- - -sub _out { - # For use in testing: Class->_out($source) - # returns the transformation of $source - - my $class = shift(@_); - - my $mutor = shift(@_) if @_ and ref($_[0] || '') eq 'CODE'; - - DEBUG and print "\n\n", '#' x 76, - "\nAbout to parse source: {{\n$_[0]\n}}\n\n"; - - - my $parser = $class->new; - $parser->hide_line_numbers(1); - - my $out = ''; - $parser->output_string( \$out ); - DEBUG and print " _out to ", \$out, "\n"; - - $mutor->($parser) if $mutor; - - $parser->parse_string_document( $_[0] ); - # use Data::Dumper; print Dumper($parser), "\n"; - return $out; -} - - -sub _duo { - # For use in testing: Class->_duo($source1, $source2) - # returns the parse trees of $source1 and $source2. - # Good in things like: &ok( Class->duo(... , ...) ); - - my $class = shift(@_); - - Carp::croak "But $class->_duo is useful only in list context!" - unless wantarray; - - my $mutor = shift(@_) if @_ and ref($_[0] || '') eq 'CODE'; - - Carp::croak "But $class->_duo takes two parameters, not: @_" - unless @_ == 2; - - my(@out); - - while( @_ ) { - my $parser = $class->new; - - push @out, ''; - $parser->output_string( \( $out[-1] ) ); - - DEBUG and print " _duo out to ", $parser->output_string(), - " = $parser->{'output_string'}\n"; - - $parser->hide_line_numbers(1); - $mutor->($parser) if $mutor; - $parser->parse_string_document( shift( @_ ) ); - # use Data::Dumper; print Dumper($parser), "\n"; - } - - return @out; -} - - - -#----------------------------------------------------------------------------- -1; -__END__ - -TODO: -A start_formatting_code and end_formatting_code methods, which in the -base class call start_L, end_L, start_C, end_C, etc., if they are -defined. - -have the POD FORMATTING ERRORS section note the localtime, and the -version of Pod::Simple. - -option to delete all E<shy>s? -option to scream if under-0x20 literals are found in the input, or -under-E<32> E codes are found in the tree. And ditto \x7f-\x9f - -Option to turn highbit characters into their compromised form? (applies -to E parsing too) - -TODO: BOM/encoding things. - -TODO: ascii-compat things in the XML classes? - diff --git a/web/bin/lib/Pod/Simple.pod b/web/bin/lib/Pod/Simple.pod deleted file mode 100644 index b0a8a6f..0000000 --- a/web/bin/lib/Pod/Simple.pod +++ /dev/null @@ -1,218 +0,0 @@ - -=head1 NAME - -Pod::Simple - framework for parsing Pod - -=head1 SYNOPSIS - - TODO - -=head1 DESCRIPTION - -Pod::Simple is a Perl library for parsing text in the Pod ("plain old -documentation") markup language that is typically used for writing -documentation for Perl and for Perl modules. The Pod format is explained -in the L<perlpod|perlpod> man page; the most common formatter is called -"perldoc". - -Pod formatters can use Pod::Simple to parse Pod documents into produce -renderings of them in plain ASCII, in HTML, or in any number of other -formats. Typically, such formatters will be subclasses of Pod::Simple, -and so they will inherit its methods, like C<parse_file>. - -If you're reading this document just because you have a Pod-processing -subclass that you want to use, this document (plus the documentation for -the subclass) is probably all you'll need to read. - -If you're reading this document because you want to write a formatter -subclass, continue reading this document, and then read -L<Pod::Simple::Subclassing>, and then possibly even read L<perlpodspec> -(some of which is for parser-writers, but much of which is notes to -formatter-writers). - - -=head1 MAIN METHODS - - - -=over - -=item C<< $parser = I<SomeClass>->new(); >> - -This returns a new parser object, where I<C<SomeClass>> is a subclass -of Pod::Simple. - -=item C<< $parser->output_fh( *OUT ); >> - -This sets the filehandle that C<$parser>'s output will be written to. -You can pass C<*STDOUT>, otherwise you should probably do something -like this: - - my $outfile = "output.txt"; - open TXTOUT, ">$outfile" or die "Can't write to $outfile: $!"; - $parser->output_fh(*TXTOUT); - -...before you call one of the C<< $parser->parse_I<whatever> >> methods. - -=item C<< $parser->output_string( \$somestring ); >> - -This sets the string that C<$parser>'s output will be sent to, -instead of any filehandle. - - -=item C<< $parser->parse_file( I<$some_filename> ); >> - -=item C<< $parser->parse_file( *INPUT_FH ); >> - -This reads the Pod content of the file (or filehandle) that you specify, -and processes it with that C<$parser> object, according to however -C<$parser>'s class works, and according to whatever parser options you -have set up for this C<$parser> object. - -=item C<< $parser->parse_string_document( I<$all_content> ); >> - -This works just like C<parse_file> except that it reads the Pod -content not from a file, but from a string that you have already -in memory. - -=item C<< $parser->parse_lines( I<...@lines...>, undef ); >> - -This processes the lines in C<@lines> (where each list item must be a -defined value, and must contain exactly one line of content -- so no -items like C<"foo\nbar"> are allowed). The final C<undef> is used to -indicate the end of document being parsed. - -The other C<parser_I<whatever>> methods are meant to be called only once -per C<$parser> object; but C<parse_lines> can be called as many times per -C<$parser> object as you want, as long as the last call (and only -the last call) ends with an C<undef> value. - - -=item C<< $parser->content_seen >> - -This returns true only if there has been any real content seen -for this document. - - -=item C<< I<SomeClass>->filter( I<$filename> ); >> - -=item C<< I<SomeClass>->filter( I<*INPUT_FH> ); >> - -=item C<< I<SomeClass>->filter( I<\$document_content> ); >> - -This is a shortcut method for creating a new parser object, setting the -output handle to STDOUT, and then processing the specified file (or -filehandle, or in-memory document). This is handy for one-liners like -this: - - perl -MPod::Simple::Text -e "Pod::Simple::Text->filter('thingy.pod')" - -=back - - - -=head1 SECONDARY METHODS - -Some of these methods might be of interest to general users, as -well as of interest to formatter-writers. - -Note that the general pattern here is that the accessor-methods -read the attribute's value with C<< $value = $parser->I<attribute> >> -and set the attribute's value with -C<< $parser->I<attribute>(I<newvalue>) >>. For each accessor, I typically -only mention one syntax or another, based on which I think you are actually -most likely to use. - - -=over - -=item C<< $parser->no_whining( I<SOMEVALUE> ) >> - -If you set this attribute to a true value, you will suppress the -parser's complaints about irregularities in the Pod coding. By default, -this attribute's value is false, meaning that irregularities will -be reported. - -Note that turning this attribute to true won't suppress one or two kinds -of complaints about rarely occurring unrecoverable errors. - - -=item C<< $parser->no_errata_section( I<SOMEVALUE> ) >> - -If you set this attribute to a true value, you will stop the parser from -generating a "POD ERRORS" section at the end of the document. By -default, this attribute's value is false, meaning that an errata section -will be generated, as necessary. - - -=item C<< $parser->complain_stderr( I<SOMEVALUE> ) >> - -If you set this attribute to a true value, it will send reports of -parsing errors to STDERR. By default, this attribute's value is false, -meaning that no output is sent to STDERR. - -Note that errors can be noted in an errata section, or sent to STDERR, -or both, or neither. So don't think that turning on C<complain_stderr> -will turn off C<no_errata_section> or vice versa -- these are -independent attributes. - - -=item C<< $parser->source_filename >> - -This returns the filename that this parser object was set to read from. - - -=item C<< $parser->doc_has_started >> - -This returns true if C<$parser> has read from a source, and has seen -Pod content in it. - - -=item C<< $parser->source_dead >> - -This returns true if C<$parser> has read from a source, and come to the -end of that source. - -=back - - -=head1 CAVEATS - -This is just a beta release -- there are a good number of things still -left to do. Notably, support for EBCDIC platforms is still half-done, -an untested. - - -=head1 SEE ALSO - -L<Pod::Simple::Subclassing> - -L<perlpod|perlpod> - -L<perlpodspec|perlpodspec> - -L<Pod::Escapes|Pod::Escapes> - -L<perldoc> - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Original author: Sean M. Burke C<sburke@cpan.org> - -Maintained by: Allison Randal C<allison@perl.org> - -=cut - - diff --git a/web/bin/lib/Pod/Simple/BlackBox.pm b/web/bin/lib/Pod/Simple/BlackBox.pm deleted file mode 100644 index 6d7fdba..0000000 --- a/web/bin/lib/Pod/Simple/BlackBox.pm +++ /dev/null @@ -1,1923 +0,0 @@ - -package Pod::Simple::BlackBox; -# -# "What's in the box?" "Pain." -# -########################################################################### -# -# This is where all the scary things happen: parsing lines into -# paragraphs; and then into directives, verbatims, and then also -# turning formatting sequences into treelets. -# -# Are you really sure you want to read this code? -# -#----------------------------------------------------------------------------- -# -# The basic work of this module Pod::Simple::BlackBox is doing the dirty work -# of parsing Pod into treelets (generally one per non-verbatim paragraph), and -# to call the proper callbacks on the treelets. -# -# Every node in a treelet is a ['name', {attrhash}, ...children...] - -use integer; # vroom! -use strict; -use Carp (); -BEGIN { - require Pod::Simple; - *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub parse_line { shift->parse_lines(@_) } # alias - -# - - - Turn back now! Run away! - - - - -sub parse_lines { # Usage: $parser->parse_lines(@lines) - # an undef means end-of-stream - my $self = shift; - - my $code_handler = $self->{'code_handler'}; - my $cut_handler = $self->{'cut_handler'}; - $self->{'line_count'} ||= 0; - - my $scratch; - - DEBUG > 4 and - print "# Parsing starting at line ", $self->{'line_count'}, ".\n"; - - DEBUG > 5 and - print "# About to parse lines: ", - join(' ', map defined($_) ? "[$_]" : "EOF", @_), "\n"; - - my $paras = ($self->{'paras'} ||= []); - # paragraph buffer. Because we need to defer processing of =over - # directives and verbatim paragraphs. We call _ponder_paragraph_buffer - # to process this. - - $self->{'pod_para_count'} ||= 0; - - my $line; - foreach my $source_line (@_) { - if( $self->{'source_dead'} ) { - DEBUG > 4 and print "# Source is dead.\n"; - last; - } - - unless( defined $source_line ) { - DEBUG > 4 and print "# Undef-line seen.\n"; - - push @$paras, ['~end', {'start_line' => $self->{'line_count'}}]; - push @$paras, $paras->[-1], $paras->[-1]; - # So that it definitely fills the buffer. - $self->{'source_dead'} = 1; - $self->_ponder_paragraph_buffer; - next; - } - - - if( $self->{'line_count'}++ ) { - ($line = $source_line) =~ tr/\n\r//d; - # If we don't have two vars, we'll end up with that there - # tr/// modding the (potentially read-only) original source line! - - } else { - DEBUG > 2 and print "First line: [$source_line]\n"; - - if( ($line = $source_line) =~ s/^\xEF\xBB\xBF//s ) { - DEBUG and print "UTF-8 BOM seen. Faking a '=encode utf8'.\n"; - $self->_handle_encoding_line( "=encode utf8" ); - $line =~ tr/\n\r//d; - - } elsif( $line =~ s/^\xFE\xFF//s ) { - DEBUG and print "Big-endian UTF-16 BOM seen. Aborting parsing.\n"; - $self->scream( - $self->{'line_count'}, - "UTF16-BE Byte Encoding Mark found; but Pod::Simple v$Pod::Simple::VERSION doesn't implement UTF16 yet." - ); - splice @_; - push @_, undef; - next; - - # TODO: implement somehow? - - } elsif( $line =~ s/^\xFF\xFE//s ) { - DEBUG and print "Little-endian UTF-16 BOM seen. Aborting parsing.\n"; - $self->scream( - $self->{'line_count'}, - "UTF16-LE Byte Encoding Mark found; but Pod::Simple v$Pod::Simple::VERSION doesn't implement UTF16 yet." - ); - splice @_; - push @_, undef; - next; - - # TODO: implement somehow? - - } else { - DEBUG > 2 and print "First line is BOM-less.\n"; - ($line = $source_line) =~ tr/\n\r//d; - } - } - - - DEBUG > 5 and print "# Parsing line: [$line]\n"; - - if(!$self->{'in_pod'}) { - if($line =~ m/^=([a-zA-Z]+)/s) { - if($1 eq 'cut') { - $self->scream( - $self->{'line_count'}, - "=cut found outside a pod block. Skipping to next block." - ); - - ## Before there were errata sections in the world, it was - ## least-pessimal to abort processing the file. But now we can - ## just barrel on thru (but still not start a pod block). - #splice @_; - #push @_, undef; - - next; - } else { - $self->{'in_pod'} = $self->{'start_of_pod_block'} - = $self->{'last_was_blank'} = 1; - # And fall thru to the pod-mode block further down - } - } else { - DEBUG > 5 and print "# It's a code-line.\n"; - $code_handler->(map $_, $line, $self->{'line_count'}, $self) - if $code_handler; - # Note: this may cause code to be processed out of order relative - # to pods, but in order relative to cuts. - - # Note also that we haven't yet applied the transcoding to $line - # by time we call $code_handler! - - if( $line =~ m/^#\s*line\s+(\d+)\s*(?:\s"([^"]+)")?\s*$/ ) { - # That RE is from perlsyn, section "Plain Old Comments (Not!)", - #$fname = $2 if defined $2; - #DEBUG > 1 and defined $2 and print "# Setting fname to \"$fname\"\n"; - DEBUG > 1 and print "# Setting nextline to $1\n"; - $self->{'line_count'} = $1 - 1; - } - - next; - } - } - - # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - # Else we're in pod mode: - - # Apply any necessary transcoding: - $self->{'_transcoder'} && $self->{'_transcoder'}->($line); - - # HERE WE CATCH =encoding EARLY! - if( $line =~ m/^=encoding\s+\S+\s*$/s ) { - $line = $self->_handle_encoding_line( $line ); - } - - if($line =~ m/^=cut/s) { - # here ends the pod block, and therefore the previous pod para - DEBUG > 1 and print "Noting =cut at line ${$self}{'line_count'}\n"; - $self->{'in_pod'} = 0; - # ++$self->{'pod_para_count'}; - $self->_ponder_paragraph_buffer(); - # by now it's safe to consider the previous paragraph as done. - $cut_handler->(map $_, $line, $self->{'line_count'}, $self) - if $cut_handler; - - # TODO: add to docs: Note: this may cause cuts to be processed out - # of order relative to pods, but in order relative to code. - - } elsif($line =~ m/^\s*$/s) { # it's a blank line - if(!$self->{'start_of_pod_block'} and @$paras and $paras->[-1][0] eq '~Verbatim') { - DEBUG > 1 and print "Saving blank line at line ${$self}{'line_count'}\n"; - push @{$paras->[-1]}, $line; - } # otherwise it's not interesting - - if(!$self->{'start_of_pod_block'} and !$self->{'last_was_blank'}) { - DEBUG > 1 and print "Noting para ends with blank line at ${$self}{'line_count'}\n"; - } - - $self->{'last_was_blank'} = 1; - - } elsif($self->{'last_was_blank'}) { # A non-blank line starting a new para... - - if($line =~ m/^(=[a-zA-Z][a-zA-Z0-9]*)(?:\s+|$)(.*)/s) { - # THIS IS THE ONE PLACE WHERE WE CONSTRUCT NEW DIRECTIVE OBJECTS - my $new = [$1, {'start_line' => $self->{'line_count'}}, $2]; - # Note that in "=head1 foo", the WS is lost. - # Example: ['=head1', {'start_line' => 123}, ' foo'] - - ++$self->{'pod_para_count'}; - - $self->_ponder_paragraph_buffer(); - # by now it's safe to consider the previous paragraph as done. - - push @$paras, $new; # the new incipient paragraph - DEBUG > 1 and print "Starting new ${$paras}[-1][0] para at line ${$self}{'line_count'}\n"; - - } elsif($line =~ m/^\s/s) { - - if(!$self->{'start_of_pod_block'} and @$paras and $paras->[-1][0] eq '~Verbatim') { - DEBUG > 1 and print "Resuming verbatim para at line ${$self}{'line_count'}\n"; - push @{$paras->[-1]}, $line; - } else { - ++$self->{'pod_para_count'}; - $self->_ponder_paragraph_buffer(); - # by now it's safe to consider the previous paragraph as done. - DEBUG > 1 and print "Starting verbatim para at line ${$self}{'line_count'}\n"; - push @$paras, ['~Verbatim', {'start_line' => $self->{'line_count'}}, $line]; - } - } else { - ++$self->{'pod_para_count'}; - $self->_ponder_paragraph_buffer(); - # by now it's safe to consider the previous paragraph as done. - push @$paras, ['~Para', {'start_line' => $self->{'line_count'}}, $line]; - DEBUG > 1 and print "Starting plain para at line ${$self}{'line_count'}\n"; - } - $self->{'last_was_blank'} = $self->{'start_of_pod_block'} = 0; - - } else { - # It's a non-blank line /continuing/ the current para - if(@$paras) { - DEBUG > 2 and print "Line ${$self}{'line_count'} continues current paragraph\n"; - push @{$paras->[-1]}, $line; - } else { - # Unexpected case! - die "Continuing a paragraph but \@\$paras is empty?"; - } - $self->{'last_was_blank'} = $self->{'start_of_pod_block'} = 0; - } - - } # ends the big while loop - - DEBUG > 1 and print(pretty(@$paras), "\n"); - return $self; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _handle_encoding_line { - my($self, $line) = @_; - - # The point of this routine is to set $self->{'_transcoder'} as indicated. - - return $line unless $line =~ m/^=encoding\s+(\S+)\s*$/s; - DEBUG > 1 and print "Found an encoding line \"=encoding $1\"\n"; - - my $e = $1; - my $orig = $e; - push @{ $self->{'encoding_command_reqs'} }, "=encoding $orig"; - - my $enc_error; - - # Cf. perldoc Encode and perldoc Encode::Supported - - require Pod::Simple::Transcode; - - if( $self->{'encoding'} ) { - my $norm_current = $self->{'encoding'}; - my $norm_e = $e; - foreach my $that ($norm_current, $norm_e) { - $that = lc($that); - $that =~ s/[-_]//g; - } - if($norm_current eq $norm_e) { - DEBUG > 1 and print "The '=encoding $orig' line is ", - "redundant. ($norm_current eq $norm_e). Ignoring.\n"; - $enc_error = ''; - # But that doesn't necessarily mean that the earlier one went okay - } else { - $enc_error = "Encoding is already set to " . $self->{'encoding'}; - DEBUG > 1 and print $enc_error; - } - } elsif ( - # OK, let's turn on the encoding - do { - DEBUG > 1 and print " Setting encoding to $e\n"; - $self->{'encoding'} = $e; - 1; - } - and $e eq 'HACKRAW' - ) { - DEBUG and print " Putting in HACKRAW (no-op) encoding mode.\n"; - - } elsif( Pod::Simple::Transcode::->encoding_is_available($e) ) { - - die($enc_error = "WHAT? _transcoder is already set?!") - if $self->{'_transcoder'}; # should never happen - require Pod::Simple::Transcode; - $self->{'_transcoder'} = Pod::Simple::Transcode::->make_transcoder($e); - eval { - my @x = ('', "abc", "123"); - $self->{'_transcoder'}->(@x); - }; - $@ && die( $enc_error = - "Really unexpected error setting up encoding $e: $@\nAborting" - ); - - } else { - my @supported = Pod::Simple::Transcode::->all_encodings; - - # Note unsupported, and complain - DEBUG and print " Encoding [$e] is unsupported.", - "\nSupporteds: @supported\n"; - my $suggestion = ''; - - # Look for a near match: - my $norm = lc($e); - $norm =~ tr[-_][]d; - my $n; - foreach my $enc (@supported) { - $n = lc($enc); - $n =~ tr[-_][]d; - next unless $n eq $norm; - $suggestion = " (Maybe \"$e\" should be \"$enc\"?)"; - last; - } - my $encmodver = Pod::Simple::Transcode::->encmodver; - $enc_error = join '' => - "This document probably does not appear as it should, because its ", - "\"=encoding $e\" line calls for an unsupported encoding.", - $suggestion, " [$encmodver\'s supported encodings are: @supported]" - ; - - $self->scream( $self->{'line_count'}, $enc_error ); - } - push @{ $self->{'encoding_command_statuses'} }, $enc_error; - - return '=encoding ALREADYDONE'; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _handle_encoding_second_level { - # By time this is called, the encoding (if well formed) will already - # have been acted one. - my($self, $para) = @_; - my @x = @$para; - my $content = join ' ', splice @x, 2; - $content =~ s/^\s+//s; - $content =~ s/\s+$//s; - - DEBUG > 2 and print "Ogling encoding directive: =encoding $content\n"; - - if($content eq 'ALREADYDONE') { - # It's already been handled. Check for errors. - if(! $self->{'encoding_command_statuses'} ) { - DEBUG > 2 and print " CRAZY ERROR: It wasn't really handled?!\n"; - } elsif( $self->{'encoding_command_statuses'}[-1] ) { - $self->whine( $para->[1]{'start_line'}, - sprintf "Couldn't do %s: %s", - $self->{'encoding_command_reqs' }[-1], - $self->{'encoding_command_statuses'}[-1], - ); - } else { - DEBUG > 2 and print " (Yup, it was successfully handled already.)\n"; - } - - } else { - # Otherwise it's a syntax error - $self->whine( $para->[1]{'start_line'}, - "Invalid =encoding syntax: $content" - ); - } - - return; -} - -#~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~` - -{ -my $m = -321; # magic line number - -sub _gen_errata { - my $self = $_[0]; - # Return 0 or more fake-o paragraphs explaining the accumulated - # errors on this document. - - return() unless $self->{'errata'} and keys %{$self->{'errata'}}; - - my @out; - - foreach my $line (sort {$a <=> $b} keys %{$self->{'errata'}}) { - push @out, - ['=item', {'start_line' => $m}, "Around line $line:"], - map( ['~Para', {'start_line' => $m, '~cooked' => 1}, - #['~Top', {'start_line' => $m}, - $_ - #] - ], - @{$self->{'errata'}{$line}} - ) - ; - } - - # TODO: report of unknown entities? unrenderable characters? - - unshift @out, - ['=head1', {'start_line' => $m, 'errata' => 1}, 'POD ERRORS'], - ['~Para', {'start_line' => $m, '~cooked' => 1, 'errata' => 1}, - "Hey! ", - ['B', {}, - 'The above document had some coding errors, which are explained below:' - ] - ], - ['=over', {'start_line' => $m, 'errata' => 1}, ''], - ; - - push @out, - ['=back', {'start_line' => $m, 'errata' => 1}, ''], - ; - - DEBUG and print "\n<<\n", pretty(\@out), "\n>>\n\n"; - - return @out; -} - -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -############################################################################## -## -## stop reading now stop reading now stop reading now stop reading now stop -## -## HERE IT BECOMES REALLY SCARY -## -## stop reading now stop reading now stop reading now stop reading now stop -## -############################################################################## - -sub _ponder_paragraph_buffer { - - # Para-token types as found in the buffer. - # ~Verbatim, ~Para, ~end, =head1..4, =for, =begin, =end, - # =over, =back, =item - # and the null =pod (to be complained about if over one line) - # - # "~data" paragraphs are something we generate at this level, depending on - # a currently open =over region - - # Events fired: Begin and end for: - # directivename (like head1 .. head4), item, extend, - # for (from =begin...=end, =for), - # over-bullet, over-number, over-text, over-block, - # item-bullet, item-number, item-text, - # Document, - # Data, Para, Verbatim - # B, C, longdirname (TODO -- wha?), etc. for all directives - # - - my $self = $_[0]; - my $paras; - return unless @{$paras = $self->{'paras'}}; - my $curr_open = ($self->{'curr_open'} ||= []); - - my $scratch; - - DEBUG > 10 and print "# Paragraph buffer: <<", pretty($paras), ">>\n"; - - # We have something in our buffer. So apparently the document has started. - unless($self->{'doc_has_started'}) { - $self->{'doc_has_started'} = 1; - - my $starting_contentless; - $starting_contentless = - ( - !@$curr_open - and @$paras and ! grep $_->[0] ne '~end', @$paras - # i.e., if the paras is all ~ends - ) - ; - DEBUG and print "# Starting ", - $starting_contentless ? 'contentless' : 'contentful', - " document\n" - ; - - $self->_handle_element_start( - ($scratch = 'Document'), - { - 'start_line' => $paras->[0][1]{'start_line'}, - $starting_contentless ? ( 'contentless' => 1 ) : (), - }, - ); - } - - my($para, $para_type); - while(@$paras) { - last if @$paras == 1 and - ( $paras->[0][0] eq '=over' or $paras->[0][0] eq '~Verbatim' - or $paras->[0][0] eq '=item' ) - ; - # Those're the three kinds of paragraphs that require lookahead. - # Actually, an "=item Foo" inside an <over type=text> region - # and any =item inside an <over type=block> region (rare) - # don't require any lookahead, but all others (bullets - # and numbers) do. - -# TODO: winge about many kinds of directives in non-resolving =for regions? -# TODO: many? like what? =head1 etc? - - $para = shift @$paras; - $para_type = $para->[0]; - - DEBUG > 1 and print "Pondering a $para_type paragraph, given the stack: (", - $self->_dump_curr_open(), ")\n"; - - if($para_type eq '=for') { - next if $self->_ponder_for($para,$curr_open,$paras); - - } elsif($para_type eq '=begin') { - next if $self->_ponder_begin($para,$curr_open,$paras); - - } elsif($para_type eq '=end') { - next if $self->_ponder_end($para,$curr_open,$paras); - - } elsif($para_type eq '~end') { # The virtual end-document signal - next if $self->_ponder_doc_end($para,$curr_open,$paras); - } - - - # ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - #~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - if(grep $_->[1]{'~ignore'}, @$curr_open) { - DEBUG > 1 and - print "Skipping $para_type paragraph because in ignore mode.\n"; - next; - } - #~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - # ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - - if($para_type eq '=pod') { - $self->_ponder_pod($para,$curr_open,$paras); - - } elsif($para_type eq '=over') { - next if $self->_ponder_over($para,$curr_open,$paras); - - } elsif($para_type eq '=back') { - next if $self->_ponder_back($para,$curr_open,$paras); - - } else { - - # All non-magical codes!!! - - # Here we start using $para_type for our own twisted purposes, to - # mean how it should get treated, not as what the element name - # should be. - - DEBUG > 1 and print "Pondering non-magical $para_type\n"; - - my $i; - - # Enforce some =headN discipline - if($para_type =~ m/^=head\d$/s - and ! $self->{'accept_heads_anywhere'} - and @$curr_open - and $curr_open->[-1][0] eq '=over' - ) { - DEBUG > 2 and print "'=$para_type' inside an '=over'!\n"; - $self->whine( - $para->[1]{'start_line'}, - "You forgot a '=back' before '$para_type'" - ); - unshift @$paras, ['=back', {}, ''], $para; # close the =over - next; - } - - - if($para_type eq '=item') { - - my $over; - unless(@$curr_open and ($over = $curr_open->[-1])->[0] eq '=over') { - $self->whine( - $para->[1]{'start_line'}, - "'=item' outside of any '=over'" - ); - unshift @$paras, - ['=over', {'start_line' => $para->[1]{'start_line'}}, ''], - $para - ; - next; - } - - - my $over_type = $over->[1]{'~type'}; - - if(!$over_type) { - # Shouldn't happen1 - die "Typeless over in stack, starting at line " - . $over->[1]{'start_line'}; - - } elsif($over_type eq 'block') { - unless($curr_open->[-1][1]{'~bitched_about'}) { - $curr_open->[-1][1]{'~bitched_about'} = 1; - $self->whine( - $curr_open->[-1][1]{'start_line'}, - "You can't have =items (as at line " - . $para->[1]{'start_line'} - . ") unless the first thing after the =over is an =item" - ); - } - # Just turn it into a paragraph and reconsider it - $para->[0] = '~Para'; - unshift @$paras, $para; - next; - - } elsif($over_type eq 'text') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - if($item_type eq 'text') { - # Nothing special needs doing for 'text' - } elsif($item_type eq 'number' or $item_type eq 'bullet') { - die "Unknown item type $item_type" - unless $item_type eq 'number' or $item_type eq 'bullet'; - # Undo our clobbering: - push @$para, $para->[1]{'~orig_content'}; - delete $para->[1]{'number'}; - # Only a PROPER item-number element is allowed - # to have a number attribute. - } else { - die "Unhandled item type $item_type"; # should never happen - } - - # =item-text thingies don't need any assimilation, it seems. - - } elsif($over_type eq 'number') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - my $expected_value = ++ $curr_open->[-1][1]{'~counter'}; - - if($item_type eq 'bullet') { - # Hm, it's not numeric. Correct for this. - $para->[1]{'number'} = $expected_value; - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item $expected_value'" - ); - push @$para, $para->[1]{'~orig_content'}; - # restore the bullet, blocking the assimilation of next para - - } elsif($item_type eq 'text') { - # Hm, it's not numeric. Correct for this. - $para->[1]{'number'} = $expected_value; - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item $expected_value'" - ); - # Text content will still be there and will block next ~Para - - } elsif($item_type ne 'number') { - die "Unknown item type $item_type"; # should never happen - - } elsif($expected_value == $para->[1]{'number'}) { - DEBUG > 1 and print " Numeric item has the expected value of $expected_value\n"; - - } else { - DEBUG > 1 and print " Numeric item has ", $para->[1]{'number'}, - " instead of the expected value of $expected_value\n"; - $self->whine( - $para->[1]{'start_line'}, - "You have '=item " . $para->[1]{'number'} . - "' instead of the expected '=item $expected_value'" - ); - $para->[1]{'number'} = $expected_value; # correcting!! - } - - if(@$para == 2) { - # For the cases where we /didn't/ push to @$para - if($paras->[0][0] eq '~Para') { - DEBUG and print "Assimilating following ~Para content into $over_type item\n"; - push @$para, splice @{shift @$paras},2; - } else { - DEBUG and print "Can't assimilate following ", $paras->[0][0], "\n"; - push @$para, ''; # Just so it's not contentless - } - } - - - } elsif($over_type eq 'bullet') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - if($item_type eq 'bullet') { - # as expected! - - if( $para->[1]{'~_freaky_para_hack'} ) { - DEBUG and print "Accomodating '=item * Foo' tolerance hack.\n"; - push @$para, delete $para->[1]{'~_freaky_para_hack'}; - } - - } elsif($item_type eq 'number') { - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item *'" - ); - push @$para, $para->[1]{'~orig_content'}; - # and block assimilation of the next paragraph - delete $para->[1]{'number'}; - # Only a PROPER item-number element is allowed - # to have a number attribute. - } elsif($item_type eq 'text') { - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item *'" - ); - # But doesn't need processing. But it'll block assimilation - # of the next para. - } else { - die "Unhandled item type $item_type"; # should never happen - } - - if(@$para == 2) { - # For the cases where we /didn't/ push to @$para - if($paras->[0][0] eq '~Para') { - DEBUG and print "Assimilating following ~Para content into $over_type item\n"; - push @$para, splice @{shift @$paras},2; - } else { - DEBUG and print "Can't assimilate following ", $paras->[0][0], "\n"; - push @$para, ''; # Just so it's not contentless - } - } - - } else { - die "Unhandled =over type \"$over_type\"?"; - # Shouldn't happen! - } - - $para_type = 'Plain'; - $para->[0] .= '-' . $over_type; - # Whew. Now fall thru and process it. - - - } elsif($para_type eq '=extend') { - # Well, might as well implement it here. - $self->_ponder_extend($para); - next; # and skip - } elsif($para_type eq '=encoding') { - # Not actually acted on here, but we catch errors here. - $self->_handle_encoding_second_level($para); - - next; # and skip - } elsif($para_type eq '~Verbatim') { - $para->[0] = 'Verbatim'; - $para_type = '?Verbatim'; - } elsif($para_type eq '~Para') { - $para->[0] = 'Para'; - $para_type = '?Plain'; - } elsif($para_type eq 'Data') { - $para->[0] = 'Data'; - $para_type = '?Data'; - } elsif( $para_type =~ s/^=//s - and defined( $para_type = $self->{'accept_directives'}{$para_type} ) - ) { - DEBUG > 1 and print " Pondering known directive ${$para}[0] as $para_type\n"; - } else { - # An unknown directive! - DEBUG > 1 and printf "Unhandled directive %s (Handled: %s)\n", - $para->[0], join(' ', sort keys %{$self->{'accept_directives'}} ) - ; - $self->whine( - $para->[1]{'start_line'}, - "Unknown directive: $para->[0]" - ); - - # And maybe treat it as text instead of just letting it go? - next; - } - - if($para_type =~ s/^\?//s) { - if(! @$curr_open) { # usual case - DEBUG and print "Treating $para_type paragraph as such because stack is empty.\n"; - } else { - my @fors = grep $_->[0] eq '=for', @$curr_open; - DEBUG > 1 and print "Containing fors: ", - join(',', map $_->[1]{'target'}, @fors), "\n"; - - if(! @fors) { - DEBUG and print "Treating $para_type paragraph as such because stack has no =for's\n"; - - #} elsif(grep $_->[1]{'~resolve'}, @fors) { - #} elsif(not grep !$_->[1]{'~resolve'}, @fors) { - } elsif( $fors[-1][1]{'~resolve'} ) { - # Look to the immediately containing for - - if($para_type eq 'Data') { - DEBUG and print "Treating Data paragraph as Plain/Verbatim because the containing =for ($fors[-1][1]{'target'}) is a resolver\n"; - $para->[0] = 'Para'; - $para_type = 'Plain'; - } else { - DEBUG and print "Treating $para_type paragraph as such because the containing =for ($fors[-1][1]{'target'}) is a resolver\n"; - } - } else { - DEBUG and print "Treating $para_type paragraph as Data because the containing =for ($fors[-1][1]{'target'}) is a non-resolver\n"; - $para->[0] = $para_type = 'Data'; - } - } - } - - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - if($para_type eq 'Plain') { - $self->_ponder_Plain($para); - } elsif($para_type eq 'Verbatim') { - $self->_ponder_Verbatim($para); - } elsif($para_type eq 'Data') { - $self->_ponder_Data($para); - } else { - die "\$para type is $para_type -- how did that happen?"; - # Shouldn't happen. - } - - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - $para->[0] =~ s/^[~=]//s; - - DEBUG and print "\n", pretty($para), "\n"; - - # traverse the treelet (which might well be just one string scalar) - $self->{'content_seen'} ||= 1; - $self->_traverse_treelet_bit(@$para); - } - } - - return; -} - -########################################################################### -# The sub-ponderers... - - - -sub _ponder_for { - my ($self,$para,$curr_open,$paras) = @_; - - # Fake it out as a begin/end - my $target; - - if(grep $_->[1]{'~ignore'}, @$curr_open) { - DEBUG > 1 and print "Ignoring ignorable =for\n"; - return 1; - } - - for(my $i = 2; $i < @$para; ++$i) { - if($para->[$i] =~ s/^\s*(\S+)\s*//s) { - $target = $1; - last; - } - } - unless(defined $target) { - $self->whine( - $para->[1]{'start_line'}, - "=for without a target?" - ); - return 1; - } - DEBUG > 1 and - print "Faking out a =for $target as a =begin $target / =end $target\n"; - - $para->[0] = 'Data'; - - unshift @$paras, - ['=begin', - {'start_line' => $para->[1]{'start_line'}, '~really' => '=for'}, - $target, - ], - $para, - ['=end', - {'start_line' => $para->[1]{'start_line'}, '~really' => '=for'}, - $target, - ], - ; - - return 1; -} - -sub _ponder_begin { - my ($self,$para,$curr_open,$paras) = @_; - my $content = join ' ', splice @$para, 2; - $content =~ s/^\s+//s; - $content =~ s/\s+$//s; - unless(length($content)) { - $self->whine( - $para->[1]{'start_line'}, - "=begin without a target?" - ); - DEBUG and print "Ignoring targetless =begin\n"; - return 1; - } - - unless($content =~ m/^\S+$/s) { # i.e., unless it's one word - $self->whine( - $para->[1]{'start_line'}, - "'=begin' only takes one parameter, not several as in '=begin $content'" - ); - DEBUG and print "Ignoring unintelligible =begin $content\n"; - return 1; - } - - - $para->[1]{'target'} = $content; # without any ':' - - $content =~ s/^:!/!:/s; - my $neg; # whether this is a negation-match - $neg = 1 if $content =~ s/^!//s; - my $to_resolve; # whether to process formatting codes - $to_resolve = 1 if $content =~ s/^://s; - - my $dont_ignore; # whether this target matches us - - foreach my $target_name ( - split(',', $content, -1), - $neg ? () : '*' - ) { - DEBUG > 2 and - print " Considering whether =begin $content matches $target_name\n"; - next unless $self->{'accept_targets'}{$target_name}; - - DEBUG > 2 and - print " It DOES match the acceptable target $target_name!\n"; - $to_resolve = 1 - if $self->{'accept_targets'}{$target_name} eq 'force_resolve'; - $dont_ignore = 1; - $para->[1]{'target_matching'} = $target_name; - last; # stop looking at other target names - } - - if($neg) { - if( $dont_ignore ) { - $dont_ignore = ''; - delete $para->[1]{'target_matching'}; - DEBUG > 2 and print " But the leading ! means that this is a NON-match!\n"; - } else { - $dont_ignore = 1; - $para->[1]{'target_matching'} = '!'; - DEBUG > 2 and print " But the leading ! means that this IS a match!\n"; - } - } - - $para->[0] = '=for'; # Just what we happen to call these, internally - $para->[1]{'~really'} ||= '=begin'; - $para->[1]{'~ignore'} = (! $dont_ignore) || 0; - $para->[1]{'~resolve'} = $to_resolve || 0; - - DEBUG > 1 and print " Making note to ", $dont_ignore ? 'not ' : '', - "ignore contents of this region\n"; - DEBUG > 1 and $dont_ignore and print " Making note to treat contents as ", - ($to_resolve ? 'verbatim/plain' : 'data'), " paragraphs\n"; - DEBUG > 1 and print " (Stack now: ", $self->_dump_curr_open(), ")\n"; - - push @$curr_open, $para; - if(!$dont_ignore or scalar grep $_->[1]{'~ignore'}, @$curr_open) { - DEBUG > 1 and print "Ignoring ignorable =begin\n"; - } else { - $self->{'content_seen'} ||= 1; - $self->_handle_element_start((my $scratch='for'), $para->[1]); - } - - return 1; -} - -sub _ponder_end { - my ($self,$para,$curr_open,$paras) = @_; - my $content = join ' ', splice @$para, 2; - $content =~ s/^\s+//s; - $content =~ s/\s+$//s; - DEBUG and print "Ogling '=end $content' directive\n"; - - unless(length($content)) { - $self->whine( - $para->[1]{'start_line'}, - "'=end' without a target?" . ( - ( @$curr_open and $curr_open->[-1][0] eq '=for' ) - ? ( " (Should be \"=end " . $curr_open->[-1][1]{'target'} . '")' ) - : '' - ) - ); - DEBUG and print "Ignoring targetless =end\n"; - return 1; - } - - unless($content =~ m/^\S+$/) { # i.e., unless it's one word - $self->whine( - $para->[1]{'start_line'}, - "'=end $content' is invalid. (Stack: " - . $self->_dump_curr_open() . ')' - ); - DEBUG and print "Ignoring mistargetted =end $content\n"; - return 1; - } - - unless(@$curr_open and $curr_open->[-1][0] eq '=for') { - $self->whine( - $para->[1]{'start_line'}, - "=end $content without matching =begin. (Stack: " - . $self->_dump_curr_open() . ')' - ); - DEBUG and print "Ignoring mistargetted =end $content\n"; - return 1; - } - - unless($content eq $curr_open->[-1][1]{'target'}) { - $self->whine( - $para->[1]{'start_line'}, - "=end $content doesn't match =begin " - . $curr_open->[-1][1]{'target'} - . ". (Stack: " - . $self->_dump_curr_open() . ')' - ); - DEBUG and print "Ignoring mistargetted =end $content at line $para->[1]{'start_line'}\n"; - return 1; - } - - # Else it's okay to close... - if(grep $_->[1]{'~ignore'}, @$curr_open) { - DEBUG > 1 and print "Not firing any event for this =end $content because in an ignored region\n"; - # And that may be because of this to-be-closed =for region, or some - # other one, but it doesn't matter. - } else { - $curr_open->[-1][1]{'start_line'} = $para->[1]{'start_line'}; - # what's that for? - - $self->{'content_seen'} ||= 1; - $self->_handle_element_end( my $scratch = 'for' ); - } - DEBUG > 1 and print "Popping $curr_open->[-1][0] $curr_open->[-1][1]{'target'} because of =end $content\n"; - pop @$curr_open; - - return 1; -} - -sub _ponder_doc_end { - my ($self,$para,$curr_open,$paras) = @_; - if(@$curr_open) { # Deal with things left open - DEBUG and print "Stack is nonempty at end-document: (", - $self->_dump_curr_open(), ")\n"; - - DEBUG > 9 and print "Stack: ", pretty($curr_open), "\n"; - unshift @$paras, $self->_closers_for_all_curr_open; - # Make sure there is exactly one ~end in the parastack, at the end: - @$paras = grep $_->[0] ne '~end', @$paras; - push @$paras, $para, $para; - # We need two -- once for the next cycle where we - # generate errata, and then another to be at the end - # when that loop back around to process the errata. - return 1; - - } else { - DEBUG and print "Okay, stack is empty now.\n"; - } - - # Try generating errata section, if applicable - unless($self->{'~tried_gen_errata'}) { - $self->{'~tried_gen_errata'} = 1; - my @extras = $self->_gen_errata(); - if(@extras) { - unshift @$paras, @extras; - DEBUG and print "Generated errata... relooping...\n"; - return 1; # I.e., loop around again to process these fake-o paragraphs - } - } - - splice @$paras; # Well, that's that for this paragraph buffer. - DEBUG and print "Throwing end-document event.\n"; - - $self->_handle_element_end( my $scratch = 'Document' ); - return 1; # Hasta la byebye -} - -sub _ponder_pod { - my ($self,$para,$curr_open,$paras) = @_; - $self->whine( - $para->[1]{'start_line'}, - "=pod directives shouldn't be over one line long! Ignoring all " - . (@$para - 2) . " lines of content" - ) if @$para > 3; - # Content is always ignored. - return; -} - -sub _ponder_over { - my ($self,$para,$curr_open,$paras) = @_; - return 1 unless @$paras; - my $list_type; - - if($paras->[0][0] eq '=item') { # most common case - $list_type = $self->_get_initial_item_type($paras->[0]); - - } elsif($paras->[0][0] eq '=back') { - # Ignore empty lists. TODO: make this an option? - shift @$paras; - return 1; - - } elsif($paras->[0][0] eq '~end') { - $self->whine( - $para->[1]{'start_line'}, - "=over is the last thing in the document?!" - ); - return 1; # But feh, ignore it. - } else { - $list_type = 'block'; - } - $para->[1]{'~type'} = $list_type; - push @$curr_open, $para; - # yes, we reuse the paragraph as a stack item - - my $content = join ' ', splice @$para, 2; - my $overness; - if($content =~ m/^\s*$/s) { - $para->[1]{'indent'} = 4; - } elsif($content =~ m/^\s*((?:\d*\.)?\d+)\s*$/s) { - no integer; - $para->[1]{'indent'} = $1; - if($1 == 0) { - $self->whine( - $para->[1]{'start_line'}, - "Can't have a 0 in =over $content" - ); - $para->[1]{'indent'} = 4; - } - } else { - $self->whine( - $para->[1]{'start_line'}, - "=over should be: '=over' or '=over positive_number'" - ); - $para->[1]{'indent'} = 4; - } - DEBUG > 1 and print "=over found of type $list_type\n"; - - $self->{'content_seen'} ||= 1; - $self->_handle_element_start((my $scratch = 'over-' . $list_type), $para->[1]); - - return; -} - -sub _ponder_back { - my ($self,$para,$curr_open,$paras) = @_; - # TODO: fire off </item-number> or </item-bullet> or </item-text> ?? - - my $content = join ' ', splice @$para, 2; - if($content =~ m/\S/) { - $self->whine( - $para->[1]{'start_line'}, - "=back doesn't take any parameters, but you said =back $content" - ); - } - - if(@$curr_open and $curr_open->[-1][0] eq '=over') { - DEBUG > 1 and print "=back happily closes matching =over\n"; - # Expected case: we're closing the most recently opened thing - #my $over = pop @$curr_open; - $self->{'content_seen'} ||= 1; - $self->_handle_element_end( my $scratch = - 'over-' . ( (pop @$curr_open)->[1]{'~type'} ) - ); - } else { - DEBUG > 1 and print "=back found without a matching =over. Stack: (", - join(', ', map $_->[0], @$curr_open), ").\n"; - $self->whine( - $para->[1]{'start_line'}, - '=back without =over' - ); - return 1; # and ignore it - } -} - -sub _ponder_item { - my ($self,$para,$curr_open,$paras) = @_; - my $over; - unless(@$curr_open and ($over = $curr_open->[-1])->[0] eq '=over') { - $self->whine( - $para->[1]{'start_line'}, - "'=item' outside of any '=over'" - ); - unshift @$paras, - ['=over', {'start_line' => $para->[1]{'start_line'}}, ''], - $para - ; - return 1; - } - - - my $over_type = $over->[1]{'~type'}; - - if(!$over_type) { - # Shouldn't happen1 - die "Typeless over in stack, starting at line " - . $over->[1]{'start_line'}; - - } elsif($over_type eq 'block') { - unless($curr_open->[-1][1]{'~bitched_about'}) { - $curr_open->[-1][1]{'~bitched_about'} = 1; - $self->whine( - $curr_open->[-1][1]{'start_line'}, - "You can't have =items (as at line " - . $para->[1]{'start_line'} - . ") unless the first thing after the =over is an =item" - ); - } - # Just turn it into a paragraph and reconsider it - $para->[0] = '~Para'; - unshift @$paras, $para; - return 1; - - } elsif($over_type eq 'text') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - if($item_type eq 'text') { - # Nothing special needs doing for 'text' - } elsif($item_type eq 'number' or $item_type eq 'bullet') { - die "Unknown item type $item_type" - unless $item_type eq 'number' or $item_type eq 'bullet'; - # Undo our clobbering: - push @$para, $para->[1]{'~orig_content'}; - delete $para->[1]{'number'}; - # Only a PROPER item-number element is allowed - # to have a number attribute. - } else { - die "Unhandled item type $item_type"; # should never happen - } - - # =item-text thingies don't need any assimilation, it seems. - - } elsif($over_type eq 'number') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - my $expected_value = ++ $curr_open->[-1][1]{'~counter'}; - - if($item_type eq 'bullet') { - # Hm, it's not numeric. Correct for this. - $para->[1]{'number'} = $expected_value; - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item $expected_value'" - ); - push @$para, $para->[1]{'~orig_content'}; - # restore the bullet, blocking the assimilation of next para - - } elsif($item_type eq 'text') { - # Hm, it's not numeric. Correct for this. - $para->[1]{'number'} = $expected_value; - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item $expected_value'" - ); - # Text content will still be there and will block next ~Para - - } elsif($item_type ne 'number') { - die "Unknown item type $item_type"; # should never happen - - } elsif($expected_value == $para->[1]{'number'}) { - DEBUG > 1 and print " Numeric item has the expected value of $expected_value\n"; - - } else { - DEBUG > 1 and print " Numeric item has ", $para->[1]{'number'}, - " instead of the expected value of $expected_value\n"; - $self->whine( - $para->[1]{'start_line'}, - "You have '=item " . $para->[1]{'number'} . - "' instead of the expected '=item $expected_value'" - ); - $para->[1]{'number'} = $expected_value; # correcting!! - } - - if(@$para == 2) { - # For the cases where we /didn't/ push to @$para - if($paras->[0][0] eq '~Para') { - DEBUG and print "Assimilating following ~Para content into $over_type item\n"; - push @$para, splice @{shift @$paras},2; - } else { - DEBUG and print "Can't assimilate following ", $paras->[0][0], "\n"; - push @$para, ''; # Just so it's not contentless - } - } - - - } elsif($over_type eq 'bullet') { - my $item_type = $self->_get_item_type($para); - # That kills the content of the item if it's a number or bullet. - DEBUG and print " Item is of type ", $para->[0], " under $over_type\n"; - - if($item_type eq 'bullet') { - # as expected! - - if( $para->[1]{'~_freaky_para_hack'} ) { - DEBUG and print "Accomodating '=item * Foo' tolerance hack.\n"; - push @$para, delete $para->[1]{'~_freaky_para_hack'}; - } - - } elsif($item_type eq 'number') { - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item *'" - ); - push @$para, $para->[1]{'~orig_content'}; - # and block assimilation of the next paragraph - delete $para->[1]{'number'}; - # Only a PROPER item-number element is allowed - # to have a number attribute. - } elsif($item_type eq 'text') { - $self->whine( - $para->[1]{'start_line'}, - "Expected '=item *'" - ); - # But doesn't need processing. But it'll block assimilation - # of the next para. - } else { - die "Unhandled item type $item_type"; # should never happen - } - - if(@$para == 2) { - # For the cases where we /didn't/ push to @$para - if($paras->[0][0] eq '~Para') { - DEBUG and print "Assimilating following ~Para content into $over_type item\n"; - push @$para, splice @{shift @$paras},2; - } else { - DEBUG and print "Can't assimilate following ", $paras->[0][0], "\n"; - push @$para, ''; # Just so it's not contentless - } - } - - } else { - die "Unhandled =over type \"$over_type\"?"; - # Shouldn't happen! - } - $para->[0] .= '-' . $over_type; - - return; -} - -sub _ponder_Plain { - my ($self,$para) = @_; - DEBUG and print " giving plain treatment...\n"; - unless( @$para == 2 or ( @$para == 3 and $para->[2] eq '' ) - or $para->[1]{'~cooked'} - ) { - push @$para, - @{$self->_make_treelet( - join("\n", splice(@$para, 2)), - $para->[1]{'start_line'} - )}; - } - # Empty paragraphs don't need a treelet for any reason I can see. - # And precooked paragraphs already have a treelet. - return; -} - -sub _ponder_Verbatim { - my ($self,$para) = @_; - DEBUG and print " giving verbatim treatment...\n"; - - $para->[1]{'xml:space'} = 'preserve'; - for(my $i = 2; $i < @$para; $i++) { - foreach my $line ($para->[$i]) { # just for aliasing - while( $line =~ - # Sort of adapted from Text::Tabs -- yes, it's hardwired in that - # tabs are at every EIGHTH column. For portability, it has to be - # one setting everywhere, and 8th wins. - s/^([^\t]*)(\t+)/$1.(" " x ((length($2)<<3)-(length($1)&7)))/e - ) {} - - # TODO: whinge about (or otherwise treat) unindented or overlong lines - - } - } - - # Now the VerbatimFormatted hoodoo... - if( $self->{'accept_codes'} and - $self->{'accept_codes'}{'VerbatimFormatted'} - ) { - while(@$para > 3 and $para->[-1] !~ m/\S/) { pop @$para } - # Kill any number of terminal newlines - $self->_verbatim_format($para); - } elsif ($self->{'codes_in_verbatim'}) { - push @$para, - @{$self->_make_treelet( - join("\n", splice(@$para, 2)), - $para->[1]{'start_line'}, $para->[1]{'xml:space'} - )}; - $para->[-1] =~ s/\n+$//s; # Kill any number of terminal newlines - } else { - push @$para, join "\n", splice(@$para, 2) if @$para > 3; - $para->[-1] =~ s/\n+$//s; # Kill any number of terminal newlines - } - return; -} - -sub _ponder_Data { - my ($self,$para) = @_; - DEBUG and print " giving data treatment...\n"; - $para->[1]{'xml:space'} = 'preserve'; - push @$para, join "\n", splice(@$para, 2) if @$para > 3; - return; -} - - - - -########################################################################### - -sub _traverse_treelet_bit { # for use only by the routine above - my($self, $name) = splice @_,0,2; - - my $scratch; - $self->_handle_element_start(($scratch=$name), shift @_); - - foreach my $x (@_) { - if(ref($x)) { - &_traverse_treelet_bit($self, @$x); - } else { - $self->_handle_text($x); - } - } - - $self->_handle_element_end($scratch=$name); - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _closers_for_all_curr_open { - my $self = $_[0]; - my @closers; - foreach my $still_open (@{ $self->{'curr_open'} || return }) { - my @copy = @$still_open; - $copy[1] = {%{ $copy[1] }}; - #$copy[1]{'start_line'} = -1; - if($copy[0] eq '=for') { - $copy[0] = '=end'; - } elsif($copy[0] eq '=over') { - $copy[0] = '=back'; - } else { - die "I don't know how to auto-close an open $copy[0] region"; - } - - unless( @copy > 2 ) { - push @copy, $copy[1]{'target'}; - $copy[-1] = '' unless defined $copy[-1]; - # since =over's don't have targets - } - - DEBUG and print "Queuing up fake-o event: ", pretty(\@copy), "\n"; - unshift @closers, \@copy; - } - return @closers; -} - -#-------------------------------------------------------------------------- - -sub _verbatim_format { - my($it, $p) = @_; - - my $formatting; - - for(my $i = 2; $i < @$p; $i++) { # work backwards over the lines - DEBUG and print "_verbatim_format appends a newline to $i: $p->[$i]\n"; - $p->[$i] .= "\n"; - # Unlike with simple Verbatim blocks, we don't end up just doing - # a join("\n", ...) on the contents, so we have to append a - # newline to ever line, and then nix the last one later. - } - - if( DEBUG > 4 ) { - print "<<\n"; - for(my $i = $#$p; $i >= 2; $i--) { # work backwards over the lines - print "_verbatim_format $i: $p->[$i]"; - } - print ">>\n"; - } - - for(my $i = $#$p; $i > 2; $i--) { - # work backwards over the lines, except the first (#2) - - #next unless $p->[$i] =~ m{^#:([ \^\/\%]*)\n?$}s - # and $p->[$i-1] !~ m{^#:[ \^\/\%]*\n?$}s; - # look at a formatty line preceding a nonformatty one - DEBUG > 5 and print "Scrutinizing line $i: $$p[$i]\n"; - if($p->[$i] =~ m{^#:([ \^\/\%]*)\n?$}s) { - DEBUG > 5 and print " It's a formatty line. ", - "Peeking at previous line ", $i-1, ": $$p[$i-1]: \n"; - - if( $p->[$i-1] =~ m{^#:[ \^\/\%]*\n?$}s ) { - DEBUG > 5 and print " Previous line is formatty! Skipping this one.\n"; - next; - } else { - DEBUG > 5 and print " Previous line is non-formatty! Yay!\n"; - } - } else { - DEBUG > 5 and print " It's not a formatty line. Ignoring\n"; - next; - } - - # A formatty line has to have #: in the first two columns, and uses - # "^" to mean bold, "/" to mean underline, and "%" to mean bold italic. - # Example: - # What do you want? i like pie. [or whatever] - # #:^^^^^^^^^^^^^^^^^ ///////////// - - - DEBUG > 4 and print "_verbatim_format considers:\n<$p->[$i-1]>\n<$p->[$i]>\n"; - - $formatting = ' ' . $1; - $formatting =~ s/\s+$//s; # nix trailing whitespace - unless(length $formatting and $p->[$i-1] =~ m/\S/) { # no-op - splice @$p,$i,1; # remove this line - $i--; # don't consider next line - next; - } - - if( length($formatting) >= length($p->[$i-1]) ) { - $formatting = substr($formatting, 0, length($p->[$i-1]) - 1) . ' '; - } else { - $formatting .= ' ' x (length($p->[$i-1]) - length($formatting)); - } - # Make $formatting and the previous line be exactly the same length, - # with $formatting having a " " as the last character. - - DEBUG > 4 and print "Formatting <$formatting> on <", $p->[$i-1], ">\n"; - - - my @new_line; - while( $formatting =~ m{\G(( +)|(\^+)|(\/+)|(\%+))}g ) { - #print "Format matches $1\n"; - - if($2) { - #print "SKIPPING <$2>\n"; - push @new_line, - substr($p->[$i-1], pos($formatting)-length($1), length($1)); - } else { - #print "SNARING $+\n"; - push @new_line, [ - ( - $3 ? 'VerbatimB' : - $4 ? 'VerbatimI' : - $5 ? 'VerbatimBI' : die("Should never get called") - ), {}, - substr($p->[$i-1], pos($formatting)-length($1), length($1)) - ]; - #print "Formatting <$new_line[-1][-1]> as $new_line[-1][0]\n"; - } - } - my @nixed = - splice @$p, $i-1, 2, @new_line; # replace myself and the next line - DEBUG > 10 and print "Nixed count: ", scalar(@nixed), "\n"; - - DEBUG > 6 and print "New version of the above line is these tokens (", - scalar(@new_line), "):", - map( ref($_)?"<@$_> ":"<$_>", @new_line ), "\n"; - $i--; # So the next line we scrutinize is the line before the one - # that we just went and formatted - } - - $p->[0] = 'VerbatimFormatted'; - - # Collapse adjacent text nodes, just for kicks. - for( my $i = 2; $i > $#$p; $i++ ) { # work forwards over the tokens except for the last - if( !ref($p->[$i]) and !ref($p->[$i + 1]) ) { - DEBUG > 5 and print "_verbatim_format merges {$p->[$i]} and {$p->[$i+1]}\n"; - $p->[$i] .= splice @$p, $i+1, 1; # merge - --$i; # and back up - } - } - - # Now look for the last text token, and remove the terminal newline - for( my $i = $#$p; $i >= 2; $i-- ) { - # work backwards over the tokens, even the first - if( !ref($p->[$i]) ) { - if($p->[$i] =~ s/\n$//s) { - DEBUG > 5 and print "_verbatim_format killed the terminal newline on #$i: {$p->[$i]}, after {$p->[$i-1]}\n"; - } else { - DEBUG > 5 and print - "No terminal newline on #$i: {$p->[$i]}, after {$p->[$i-1]} !?\n"; - } - last; # we only want the next one - } - } - - return; -} - - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - - -sub _treelet_from_formatting_codes { - # Given a paragraph, returns a treelet. Full of scary tokenizing code. - # Like [ '~Top', {'start_line' => $start_line}, - # "I like ", - # [ 'B', {}, "pie" ], - # "!" - # ] - - my($self, $para, $start_line, $preserve_space) = @_; - - my $treelet = ['~Top', {'start_line' => $start_line},]; - - unless ($preserve_space || $self->{'preserve_whitespace'}) { - $para =~ s/\. /\.\xA0 /g if $self->{'fullstop_space_harden'}; - - $para =~ s/\s+/ /g; # collapse and trim all whitespace first. - $para =~ s/ $//; - $para =~ s/^ //; - } - - # Only apparent problem the above code is that N<< >> turns into - # N<< >>. But then, word wrapping does that too! So don't do that! - - my @stack; - my @lineage = ($treelet); - - DEBUG > 4 and print "Paragraph:\n$para\n\n"; - - # Here begins our frightening tokenizer RE. The following regex matches - # text in four main parts: - # - # * Start-codes. The first alternative matches C< or C<<, the latter - # followed by some whitespace. $1 will hold the entire start code - # (including any space following a multiple-angle-bracket delimiter), - # and $2 will hold only the additional brackets past the first in a - # multiple-bracket delimiter. length($2) + 1 will be the number of - # closing brackets we have to find. - # - # * Closing brackets. Match some amount of whitespace followed by - # multiple close brackets. The logic to see if this closes anything - # is down below. Note that in order to parse C<< >> correctly, we - # have to use look-behind (?<=\s\s), since the match of the starting - # code will have consumed the whitespace. - # - # * A single closing bracket, to close a simple code like C<>. - # - # * Something that isn't a start or end code. We have to be careful - # about accepting whitespace, since perlpodspec says that any whitespace - # before a multiple-bracket closing delimiter should be ignored. - # - while($para =~ - m/\G - (?: - # Match starting codes, including the whitespace following a - # multiple-delimiter start code. $1 gets the whole start code and - # $2 gets all but one of the <s in the multiple-bracket case. - ([A-Z]<(?:(<+)\s+)?) - | - # Match multiple-bracket end codes. $3 gets the whitespace that - # should be discarded before an end bracket but kept in other cases - # and $4 gets the end brackets themselves. - (\s+|(?<=\s\s))(>{2,}) - | - (\s?>) # $5: simple end-codes - | - ( # $6: stuff containing no start-codes or end-codes - (?: - [^A-Z\s>] - | - (?: - [A-Z](?!<) - ) - | - (?: - \s(?!\s*>) - ) - )+ - ) - ) - /xgo - ) { - DEBUG > 4 and print "\nParagraphic tokenstack = (@stack)\n"; - if(defined $1) { - if(defined $2) { - DEBUG > 3 and print "Found complex start-text code \"$1\"\n"; - push @stack, length($2) + 1; - # length of the necessary complex end-code string - } else { - DEBUG > 3 and print "Found simple start-text code \"$1\"\n"; - push @stack, 0; # signal that we're looking for simple - } - push @lineage, [ substr($1,0,1), {}, ]; # new node object - push @{ $lineage[-2] }, $lineage[-1]; - - } elsif(defined $4) { - DEBUG > 3 and print "Found apparent complex end-text code \"$3$4\"\n"; - # This is where it gets messy... - if(! @stack) { - # We saw " >>>>" but needed nothing. This is ALL just stuff then. - DEBUG > 4 and print " But it's really just stuff.\n"; - push @{ $lineage[-1] }, $3, $4; - next; - } elsif(!$stack[-1]) { - # We saw " >>>>" but needed only ">". Back pos up. - DEBUG > 4 and print " And that's more than we needed to close simple.\n"; - push @{ $lineage[-1] }, $3; # That was a for-real space, too. - pos($para) = pos($para) - length($4) + 1; - } elsif($stack[-1] == length($4)) { - # We found " >>>>", and it was exactly what we needed. Commonest case. - DEBUG > 4 and print " And that's exactly what we needed to close complex.\n"; - } elsif($stack[-1] < length($4)) { - # We saw " >>>>" but needed only " >>". Back pos up. - DEBUG > 4 and print " And that's more than we needed to close complex.\n"; - pos($para) = pos($para) - length($4) + $stack[-1]; - } else { - # We saw " >>>>" but needed " >>>>>>". So this is all just stuff! - DEBUG > 4 and print " But it's really just stuff, because we needed more.\n"; - push @{ $lineage[-1] }, $3, $4; - next; - } - #print "\nHOOBOY ", scalar(@{$lineage[-1]}), "!!!\n"; - - push @{ $lineage[-1] }, '' if 2 == @{ $lineage[-1] }; - # Keep the element from being childless - - pop @stack; - pop @lineage; - - } elsif(defined $5) { - DEBUG > 3 and print "Found apparent simple end-text code \"$4\"\n"; - - if(@stack and ! $stack[-1]) { - # We're indeed expecting a simple end-code - DEBUG > 4 and print " It's indeed an end-code.\n"; - - if(length($5) == 2) { # There was a space there: " >" - push @{ $lineage[-1] }, ' '; - } elsif( 2 == @{ $lineage[-1] } ) { # Closing a childless element - push @{ $lineage[-1] }, ''; # keep it from being really childless - } - - pop @stack; - pop @lineage; - } else { - DEBUG > 4 and print " It's just stuff.\n"; - push @{ $lineage[-1] }, $5; - } - - } elsif(defined $6) { - DEBUG > 3 and print "Found stuff \"$6\"\n"; - push @{ $lineage[-1] }, $6; - - } else { - # should never ever ever ever happen - DEBUG and print "AYYAYAAAAA at line ", __LINE__, "\n"; - die "SPORK 512512!"; - } - } - - if(@stack) { # Uhoh, some sequences weren't closed. - my $x= "..."; - while(@stack) { - push @{ $lineage[-1] }, '' if 2 == @{ $lineage[-1] }; - # Hmmmmm! - - my $code = (pop @lineage)->[0]; - my $ender_length = pop @stack; - if($ender_length) { - --$ender_length; - $x = $code . ("<" x $ender_length) . " $x " . (">" x $ender_length); - } else { - $x = $code . "<$x>"; - } - } - DEBUG > 1 and print "Unterminated $x sequence\n"; - $self->whine($start_line, - "Unterminated $x sequence", - ); - } - - return $treelet; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub text_content_of_treelet { # method: $parser->text_content_of_treelet($lol) - return stringify_lol($_[1]); -} - -sub stringify_lol { # function: stringify_lol($lol) - my $string_form = ''; - _stringify_lol( $_[0] => \$string_form ); - return $string_form; -} - -sub _stringify_lol { # the real recursor - my($lol, $to) = @_; - use UNIVERSAL (); - for(my $i = 2; $i < @$lol; ++$i) { - if( ref($lol->[$i] || '') and UNIVERSAL::isa($lol->[$i], 'ARRAY') ) { - _stringify_lol( $lol->[$i], $to); # recurse! - } else { - $$to .= $lol->[$i]; - } - } - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _dump_curr_open { # return a string representation of the stack - my $curr_open = $_[0]{'curr_open'}; - - return '[empty]' unless @$curr_open; - return join '; ', - map {; - ($_->[0] eq '=for') - ? ( ($_->[1]{'~really'} || '=over') - . ' ' . $_->[1]{'target'}) - : $_->[0] - } - @$curr_open - ; -} - -########################################################################### -my %pretty_form = ( - "\a" => '\a', # ding! - "\b" => '\b', # BS - "\e" => '\e', # ESC - "\f" => '\f', # FF - "\t" => '\t', # tab - "\cm" => '\cm', - "\cj" => '\cj', - "\n" => '\n', # probably overrides one of either \cm or \cj - '"' => '\"', - '\\' => '\\\\', - '$' => '\\$', - '@' => '\\@', - '%' => '\\%', - '#' => '\\#', -); - -sub pretty { # adopted from Class::Classless - # Not the most brilliant routine, but passable. - # Don't give it a cyclic data structure! - my @stuff = @_; # copy - my $x; - my $out = - # join ",\n" . - join ", ", - map {; - if(!defined($_)) { - "undef"; - } elsif(ref($_) eq 'ARRAY' or ref($_) eq 'Pod::Simple::LinkSection') { - $x = "[ " . pretty(@$_) . " ]" ; - $x; - } elsif(ref($_) eq 'SCALAR') { - $x = "\\" . pretty($$_) ; - $x; - } elsif(ref($_) eq 'HASH') { - my $hr = $_; - $x = "{" . join(", ", - map(pretty($_) . '=>' . pretty($hr->{$_}), - sort keys %$hr ) ) . "}" ; - $x; - } elsif(!length($_)) { q{''} # empty string - } elsif( - $_ eq '0' # very common case - or( - m/^-?(?:[123456789]\d*|0)(?:\.\d+)?$/s - and $_ ne '-0' # the strange case that that RE lets thru - ) - ) { $_; - } else { - if( chr(65) eq 'A' ) { - s<([^\x20\x21\x23\x27-\x3F\x41-\x5B\x5D-\x7E])> - #<$pretty_form{$1} || '\\x'.(unpack("H2",$1))>eg; - <$pretty_form{$1} || '\\x{'.sprintf("%x", ord($1)).'}'>eg; - } else { - # We're in some crazy non-ASCII world! - s<([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])> - #<$pretty_form{$1} || '\\x'.(unpack("H2",$1))>eg; - <$pretty_form{$1} || '\\x{'.sprintf("%x", ord($1)).'}'>eg; - } - qq{"$_"}; - } - } @stuff; - # $out =~ s/\n */ /g if length($out) < 75; - return $out; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -# A rather unsubtle method of blowing away all the state information -# from a parser object so it can be reused. Provided as a utility for -# backward compatibilty in Pod::Man, etc. but not recommended for -# general use. - -sub reinit { - my $self = shift; - foreach (qw(source_dead source_filename doc_has_started -start_of_pod_block content_seen last_was_blank paras curr_open -line_count pod_para_count in_pod ~tried_gen_errata errata errors_seen -Title)) { - - delete $self->{$_}; - } -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - diff --git a/web/bin/lib/Pod/Simple/Checker.pm b/web/bin/lib/Pod/Simple/Checker.pm deleted file mode 100644 index 0d01f50..0000000 --- a/web/bin/lib/Pod/Simple/Checker.pm +++ /dev/null @@ -1,171 +0,0 @@ - -# A quite dimwitted pod2plaintext that need only know how to format whatever -# text comes out of Pod::BlackBox's _gen_errata - -require 5; -package Pod::Simple::Checker; -use strict; -use Carp (); -use Pod::Simple::Methody (); -use Pod::Simple (); -use vars qw( @ISA $VERSION ); -$VERSION = '2.02'; -@ISA = ('Pod::Simple::Methody'); -BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) - ? \&Pod::Simple::DEBUG - : sub() {0} - } - -use Text::Wrap 98.112902 (); # was 2001.0131, but I don't think we need that -$Text::Wrap::wrap = 'overflow'; -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub any_errata_seen { # read-only accessor - return $_[1]->{'Errata_seen'}; -} - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - $new->nix_X_codes(1); - $new->nbsp_for_S(1); - $new->{'Thispara'} = ''; - $new->{'Indent'} = 0; - $new->{'Indentstring'} = ' '; - $new->{'Errata_seen'} = 0; - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub handle_text { $_[0]{'Errata_seen'} and $_[0]{'Thispara'} .= $_[1] } - -sub start_Para { $_[0]{'Thispara'} = '' } - -sub start_head1 { - if($_[0]{'Errata_seen'}) { - $_[0]{'Thispara'} = ''; - } else { - if($_[1]{'errata'}) { # start of errata! - $_[0]{'Errata_seen'} = 1; - $_[0]{'Thispara'} = $_[0]{'source_filename'} ? - "$_[0]{'source_filename'} -- " : '' - } - } -} -sub start_head2 { $_[0]{'Thispara'} = '' } -sub start_head3 { $_[0]{'Thispara'} = '' } -sub start_head4 { $_[0]{'Thispara'} = '' } - -sub start_Verbatim { $_[0]{'Thispara'} = '' } -sub start_item_bullet { $_[0]{'Thispara'} = '* ' } -sub start_item_number { $_[0]{'Thispara'} = "$_[1]{'number'}. " } -sub start_item_text { $_[0]{'Thispara'} = '' } - -sub start_over_bullet { ++$_[0]{'Indent'} } -sub start_over_number { ++$_[0]{'Indent'} } -sub start_over_text { ++$_[0]{'Indent'} } -sub start_over_block { ++$_[0]{'Indent'} } - -sub end_over_bullet { --$_[0]{'Indent'} } -sub end_over_number { --$_[0]{'Indent'} } -sub end_over_text { --$_[0]{'Indent'} } -sub end_over_block { --$_[0]{'Indent'} } - - -# . . . . . Now the actual formatters: - -sub end_head1 { $_[0]->emit_par(-4) } -sub end_head2 { $_[0]->emit_par(-3) } -sub end_head3 { $_[0]->emit_par(-2) } -sub end_head4 { $_[0]->emit_par(-1) } -sub end_Para { $_[0]->emit_par( 0) } -sub end_item_bullet { $_[0]->emit_par( 0) } -sub end_item_number { $_[0]->emit_par( 0) } -sub end_item_text { $_[0]->emit_par(-2) } - -sub emit_par { - return unless $_[0]{'Errata_seen'}; - my($self, $tweak_indent) = splice(@_,0,2); - my $indent = ' ' x ( 2 * $self->{'Indent'} + ($tweak_indent||0) ); - # Yes, 'STRING' x NEGATIVE gives '', same as 'STRING' x 0 - - $self->{'Thispara'} =~ tr{\xAD}{}d if Pod::Simple::ASCII; - my $out = Text::Wrap::wrap($indent, $indent, $self->{'Thispara'} .= "\n"); - $out =~ tr{\xA0}{ } if Pod::Simple::ASCII; - print {$self->{'output_fh'}} $out, - #"\n" - ; - $self->{'Thispara'} = ''; - - return; -} - -# . . . . . . . . . . And then off by its lonesome: - -sub end_Verbatim { - return unless $_[0]{'Errata_seen'}; - my $self = shift; - if(Pod::Simple::ASCII) { - $self->{'Thispara'} =~ tr{\xA0}{ }; - $self->{'Thispara'} =~ tr{\xAD}{}d; - } - - my $i = ' ' x ( 2 * $self->{'Indent'} + 4); - - $self->{'Thispara'} =~ s/^/$i/mg; - - print { $self->{'output_fh'} } '', - $self->{'Thispara'}, - "\n\n" - ; - $self->{'Thispara'} = ''; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - -__END__ - -=head1 NAME - -Pod::Simple::Checker -- check the Pod syntax of a document - -=head1 SYNOPSIS - - perl -MPod::Simple::Checker -e \ - "exit Pod::Simple::Checker->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -This class is for checking the syntactic validity of Pod. -It works by basically acting like a simple-minded version of -L<Pod::Simple::Text> that formats only the "Pod Errors" section -(if Pod::Simple even generates one for the given document). - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::Text>, L<Pod::Checker> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/Debug.pm b/web/bin/lib/Pod/Simple/Debug.pm deleted file mode 100644 index b00e58d..0000000 --- a/web/bin/lib/Pod/Simple/Debug.pm +++ /dev/null @@ -1,151 +0,0 @@ - -require 5; -package Pod::Simple::Debug; -use strict; - -sub import { - my($value,$variable); - - if(@_ == 2) { - $value = $_[1]; - } elsif(@_ == 3) { - ($variable, $value) = @_[1,2]; - - ($variable, $value) = ($value, $variable) - if defined $value and ref($value) eq 'SCALAR' - and not(defined $variable and ref($variable) eq 'SCALAR') - ; # tolerate getting it backwards - - unless( defined $variable and ref($variable) eq 'SCALAR') { - require Carp; - Carp::croak("Usage:\n use Pod::Simple::Debug (NUMVAL)\nor" - . "\n use Pod::Simple::Debug (\\\$var, STARTNUMVAL)\nAborting"); - } - } else { - require Carp; - Carp::croak("Usage:\n use Pod::Simple::Debug (NUMVAL)\nor" - . "\n use Pod::Simple::Debug (\\\$var, STARTNUMVAL)\nAborting"); - } - - if( defined &Pod::Simple::DEBUG ) { - require Carp; - Carp::croak("It's too late to call Pod::Simple::Debug -- " - . "Pod::Simple has already loaded\nAborting"); - } - - $value = 0 unless defined $value; - - unless($value =~ m/^-?\d+$/) { - require Carp; - Carp::croak( "$value isn't a numeric value." - . "\nUsage:\n use Pod::Simple::Debug (NUMVAL)\nor" - . "\n use Pod::Simple::Debug (\\\$var, STARTNUMVAL)\nAborting"); - } - - if( defined $variable ) { - # make a not-really-constant - *Pod::Simple::DEBUG = sub () { $$variable } ; - $$variable = $value; - print "# Starting Pod::Simple::DEBUG = non-constant $variable with val $value\n"; - } else { - *Pod::Simple::DEBUG = eval " sub () { $value } "; - print "# Starting Pod::Simple::DEBUG = $value\n"; - } - - require Pod::Simple; - return; -} - -1; - - -__END__ - -=head1 NAME - -Pod::Simple::Debug -- put Pod::Simple into trace/debug mode - -=head1 SYNOPSIS - - use Pod::Simple::Debug (5); # or some integer - -Or: - - my $debuglevel; - use Pod::Simple::Debug (\$debuglevel, 0); - ...some stuff that uses Pod::Simple to do stuff, but which - you don't want debug output from... - - $debug_level = 4; - ...some stuff that uses Pod::Simple to do stuff, but which - you DO want debug output from... - - $debug_level = 0; - -=head1 DESCRIPTION - -This is an internal module for controlling the debug level (a.k.a. trace -level) of Pod::Simple. This is of interest only to Pod::Simple -developers. - - -=head1 CAVEATS - -Note that you should load this module I<before> loading Pod::Simple (or -any Pod::Simple-based class). If you try loading Pod::Simple::Debug -after &Pod::Simple::DEBUG is already defined, Pod::Simple::Debug will -throw a fatal error to the effect that -"it's s too late to call Pod::Simple::Debug". - -Note that the C<use Pod::Simple::Debug (\$x, I<somenum>)> mode will make -Pod::Simple (et al) run rather slower, since &Pod::Simple::DEBUG won't -be a constant sub anymore, and so Pod::Simple (et al) won't compile with -constant-folding. - - -=head1 GUTS - -Doing this: - - use Pod::Simple::Debug (5); # or some integer - -is basically equivalent to: - - BEGIN { sub Pod::Simple::DEBUG () {5} } # or some integer - use Pod::Simple (); - -And this: - - use Pod::Simple::Debug (\$debug_level,0); # or some integer - -is basically equivalent to this: - - my $debug_level; - BEGIN { $debug_level = 0 } - BEGIN { sub Pod::Simple::DEBUG () { $debug_level } - use Pod::Simple (); - -=head1 SEE ALSO - -L<Pod::Simple> - -The article "Constants in Perl", in I<The Perl Journal> issue -21. See L<http://www.sysadminmag.com/tpj/issues/vol5_5/> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/DumpAsText.pm b/web/bin/lib/Pod/Simple/DumpAsText.pm deleted file mode 100644 index e678e42..0000000 --- a/web/bin/lib/Pod/Simple/DumpAsText.pm +++ /dev/null @@ -1,130 +0,0 @@ - -require 5; -package Pod::Simple::DumpAsText; -$VERSION = '2.02'; -use Pod::Simple (); -BEGIN {@ISA = ('Pod::Simple')} - -use strict; - -use Carp (); - -BEGIN { *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG } - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - $new->accept_codes('VerbatimFormatted'); - return $new; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _handle_element_start { - # ($self, $element_name, $attr_hash_r) - my $fh = $_[0]{'output_fh'}; - my($key, $value); - DEBUG and print "++ $_[1]\n"; - - print $fh ' ' x ($_[0]{'indent'} || 0), "++", $_[1], "\n"; - $_[0]{'indent'}++; - while(($key,$value) = each %{$_[2]}) { - unless($key =~ m/^~/s) { - next if $key eq 'start_line' and $_[0]{'hide_line_numbers'}; - _perly_escape($key); - _perly_escape($value); - printf $fh qq{%s \\ "%s" => "%s"\n}, - ' ' x ($_[0]{'indent'} || 0), $key, $value; - } - } - return; -} - -sub _handle_text { - DEBUG and print "== \"$_[1]\"\n"; - - if(length $_[1]) { - my $indent = ' ' x $_[0]{'indent'}; - my $text = $_[1]; - _perly_escape($text); - $text =~ # A not-totally-brilliant wrapping algorithm: - s/( - [^\n]{55} # Snare some characters from a line - [^\n\ ]{0,50} # and finish any current word - ) - \x20{1,10}(?!\n) # capture some spaces not at line-end - /$1"\n$indent . "/gx # => line-break here - ; - - print {$_[0]{'output_fh'}} $indent, '* "', $text, "\"\n"; - } - return; -} - -sub _handle_element_end { - DEBUG and print "-- $_[1]\n"; - print {$_[0]{'output_fh'}} - ' ' x --$_[0]{'indent'}, "--", $_[1], "\n"; - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub _perly_escape { - foreach my $x (@_) { - $x =~ s/([^\x00-\xFF])/sprintf'\x{%X}',ord($1)/eg; - # Escape things very cautiously: - $x =~ s/([^-\n\t \&\<\>\'!\#\%\(\)\*\+,\.\/\:\;=\?\~\[\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf'\x%02X',ord($1)/eg; - } - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - - -__END__ - -=head1 NAME - -Pod::Simple::DumpAsText -- dump Pod-parsing events as text - -=head1 SYNOPSIS - - perl -MPod::Simple::DumpAsText -e \ - "exit Pod::Simple::DumpAsText->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -This class is for dumping, as text, the events gotten from parsing a Pod -document. This class is of interest to people writing Pod formatters -based on Pod::Simple. It is useful for seeing exactly what events you -get out of some Pod that you feed in. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -=head1 SEE ALSO - -L<Pod::Simple::DumpAsXML> - -L<Pod::Simple> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/DumpAsXML.pm b/web/bin/lib/Pod/Simple/DumpAsXML.pm deleted file mode 100644 index fe0c166..0000000 --- a/web/bin/lib/Pod/Simple/DumpAsXML.pm +++ /dev/null @@ -1,146 +0,0 @@ - -require 5; -package Pod::Simple::DumpAsXML; -$VERSION = '2.02'; -use Pod::Simple (); -BEGIN {@ISA = ('Pod::Simple')} - -use strict; - -use Carp (); - -BEGIN { *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG } - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - $new->accept_codes('VerbatimFormatted'); - return $new; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _handle_element_start { - # ($self, $element_name, $attr_hash_r) - my $fh = $_[0]{'output_fh'}; - my($key, $value); - DEBUG and print "++ $_[1]\n"; - - print $fh ' ' x ($_[0]{'indent'} || 0), "<", $_[1]; - - foreach my $key (sort keys %{$_[2]}) { - unless($key =~ m/^~/s) { - next if $key eq 'start_line' and $_[0]{'hide_line_numbers'}; - _xml_escape($value = $_[2]{$key}); - print $fh ' ', $key, '="', $value, '"'; - } - } - - - print $fh ">\n"; - $_[0]{'indent'}++; - return; -} - -sub _handle_text { - DEBUG and print "== \"$_[1]\"\n"; - if(length $_[1]) { - my $indent = ' ' x $_[0]{'indent'}; - my $text = $_[1]; - _xml_escape($text); - $text =~ # A not-totally-brilliant wrapping algorithm: - s/( - [^\n]{55} # Snare some characters from a line - [^\n\ ]{0,50} # and finish any current word - ) - \x20{1,10}(?!\n) # capture some spaces not at line-end - /$1\n$indent/gx # => line-break here - ; - - print {$_[0]{'output_fh'}} $indent, $text, "\n"; - } - return; -} - -sub _handle_element_end { - DEBUG and print "-- $_[1]\n"; - print {$_[0]{'output_fh'}} - ' ' x --$_[0]{'indent'}, "</", $_[1], ">\n"; - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub _xml_escape { - foreach my $x (@_) { - # Escape things very cautiously: - $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg; - # Yes, stipulate the list without a range, so that this can work right on - # all charsets that this module happens to run under. - # Altho, hmm, what about that ord? Presumably that won't work right - # under non-ASCII charsets. Something should be done about that. - } - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - -__END__ - -=head1 NAME - -Pod::Simple::DumpAsXML -- turn Pod into XML - -=head1 SYNOPSIS - - perl -MPod::Simple::DumpAsXML -e \ - "exit Pod::Simple::DumpAsXML->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -Pod::Simple::DumpAsXML is a subclass of L<Pod::Simple> that parses Pod -and turns it into indented and wrapped XML. This class is of -interest to people writing Pod formatters based on Pod::Simple. - -Pod::Simple::DumpAsXML inherits methods from -L<Pod::Simple>. - - -=head1 SEE ALSO - -L<Pod::Simple::XMLOutStream> is rather like this class. -Pod::Simple::XMLOutStream's output is space-padded in a way -that's better for sending to an XML processor (that is, it has -no ignoreable whitespace). But -Pod::Simple::DumpAsXML's output is much more human-readable, being -(more-or-less) one token per line, with line-wrapping. - -L<Pod::Simple::DumpAsText> is rather like this class, -except that it doesn't dump with XML syntax. Try them and see -which one you like best! - -L<Pod::Simple>, L<Pod::Simple::DumpAsXML> - -The older libraries L<Pod::PXML>, L<Pod::XML>, L<Pod::SAX> - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/HTML.pm b/web/bin/lib/Pod/Simple/HTML.pm deleted file mode 100644 index 11a569f..0000000 --- a/web/bin/lib/Pod/Simple/HTML.pm +++ /dev/null @@ -1,893 +0,0 @@ - -require 5; -package Pod::Simple::HTML; -use strict; -use Pod::Simple::PullParser (); -use vars qw( - @ISA %Tagmap $Computerese $LamePad $Linearization_Limit $VERSION - $Perldoc_URL_Prefix $Perldoc_URL_Postfix - $Title_Prefix $Title_Postfix $HTML_EXTENSION %ToIndex - $Doctype_decl $Content_decl -); -@ISA = ('Pod::Simple::PullParser'); -$VERSION = '3.03'; - -use UNIVERSAL (); -BEGIN { - if(defined &DEBUG) { } # no-op - elsif( defined &Pod::Simple::DEBUG ) { *DEBUG = \&Pod::Simple::DEBUG } - else { *DEBUG = sub () {0}; } -} - -$Doctype_decl ||= ''; # No. Just No. Don't even ask me for it. - # qq{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - # "http://www.w3.org/TR/html4/loose.dtd">\n}; - -$Content_decl ||= - q{<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >}; - -$HTML_EXTENSION = '.html' unless defined $HTML_EXTENSION; -$Computerese = "" unless defined $Computerese; -$LamePad = '' unless defined $LamePad; - -$Linearization_Limit = 120 unless defined $Linearization_Limit; - # headings/items longer than that won't get an <a id="..."> -$Perldoc_URL_Prefix = 'http://search.cpan.org/perldoc?' - unless defined $Perldoc_URL_Prefix; -$Perldoc_URL_Postfix = '' - unless defined $Perldoc_URL_Postfix; - -$Title_Prefix = '' unless defined $Title_Prefix; -$Title_Postfix = '' unless defined $Title_Postfix; -%ToIndex = map {; $_ => 1 } qw(head1 head2 head3 head4 ); # item-text - # 'item-text' stuff in the index doesn't quite work, and may - # not be a good idea anyhow. - - -__PACKAGE__->_accessorize( - 'perldoc_url_prefix', - # In turning L<Foo::Bar> into http://whatever/Foo%3a%3aBar, what - # to put before the "Foo%3a%3aBar". - # (for singleton mode only?) - 'perldoc_url_postfix', - # what to put after "Foo%3a%3aBar" in the URL. Normally "". - - 'batch_mode', # whether we're in batch mode - 'batch_mode_current_level', - # When in batch mode, how deep the current module is: 1 for "LWP", - # 2 for "LWP::Procotol", 3 for "LWP::Protocol::GHTTP", etc - - 'title_prefix', 'title_postfix', - # What to put before and after the title in the head. - # Should already be &-escaped - - 'html_header_before_title', - 'html_header_after_title', - 'html_footer', - - 'index', # whether to add an index at the top of each page - # (actually it's a table-of-contents, but we'll call it an index, - # out of apparently longstanding habit) - - 'html_css', # URL of CSS file to point to - 'html_javascript', # URL of CSS file to point to - - 'force_title', # should already be &-escaped - 'default_title', # should already be &-escaped -); - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -my @_to_accept; - -%Tagmap = ( - 'Verbatim' => "\n<pre$Computerese>", - '/Verbatim' => "</pre>\n", - 'VerbatimFormatted' => "\n<pre$Computerese>", - '/VerbatimFormatted' => "</pre>\n", - 'VerbatimB' => "<b>", - '/VerbatimB' => "</b>", - 'VerbatimI' => "<i>", - '/VerbatimI' => "</i>", - 'VerbatimBI' => "<b><i>", - '/VerbatimBI' => "</i></b>", - - - 'Data' => "\n", - '/Data' => "\n", - - 'head1' => "\n<h1>", # And also stick in an <a id="..."> - 'head2' => "\n<h2>", # '' - 'head3' => "\n<h3>", # '' - 'head4' => "\n<h4>", # '' - '/head1' => "</a></h1>\n", - '/head2' => "</a></h2>\n", - '/head3' => "</a></h3>\n", - '/head4' => "</a></h4>\n", - - 'X' => "<!--\n\tINDEX: ", - '/X' => "\n-->", - - changes(qw( - Para=p - B=b I=i - over-bullet=ul - over-number=ol - over-text=dl - over-block=blockquote - item-bullet=li - item-number=li - item-text=dt - )), - changes2( - map {; m/^([-a-z]+)/s && push @_to_accept, $1; $_ } - qw[ - sample=samp - definition=dfn - kbd=keyboard - variable=var - citation=cite - abbreviation=abbr - acronym=acronym - subscript=sub - superscript=sup - big=big - small=small - underline=u - strikethrough=s - ] # no point in providing a way to get <q>...</q>, I think - ), - - '/item-bullet' => "</li>$LamePad\n", - '/item-number' => "</li>$LamePad\n", - '/item-text' => "</a></dt>$LamePad\n", - 'item-body' => "\n<dd>", - '/item-body' => "</dd>\n", - - - 'B' => "<b>", '/B' => "</b>", - 'I' => "<i>", '/I' => "</i>", - 'F' => "<em$Computerese>", '/F' => "</em>", - 'C' => "<code$Computerese>", '/C' => "</code>", - 'L' => "<a href='YOU_SHOULD_NEVER_SEE_THIS'>", # ideally never used! - '/L' => "</a>", -); - -sub changes { - return map {; m/^([-_:0-9a-zA-Z]+)=([-_:0-9a-zA-Z]+)$/s - ? ( $1, => "\n<$2>", "/$1", => "</$2>\n" ) : die "Funky $_" - } @_; -} -sub changes2 { - return map {; m/^([-_:0-9a-zA-Z]+)=([-_:0-9a-zA-Z]+)$/s - ? ( $1, => "<$2>", "/$1", => "</$2>" ) : die "Funky $_" - } @_; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub go { exit Pod::Simple::HTML->parse_from_file(@ARGV) } - # Just so we can run from the command line. No options. - # For that, use perldoc! -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub new { - my $new = shift->SUPER::new(@_); - #$new->nix_X_codes(1); - $new->nbsp_for_S(1); - $new->accept_targets( 'html', 'HTML' ); - $new->accept_codes('VerbatimFormatted'); - $new->accept_codes(@_to_accept); - DEBUG > 2 and print "To accept: ", join(' ',@_to_accept), "\n"; - - $new->perldoc_url_prefix( $Perldoc_URL_Prefix ); - $new->perldoc_url_postfix( $Perldoc_URL_Postfix ); - $new->title_prefix( $Title_Prefix ); - $new->title_postfix( $Title_Postfix ); - - $new->html_header_before_title( - qq[$Doctype_decl<html><head><title>] - ); - $new->html_header_after_title( join "\n" => - "</title>", - $Content_decl, - "</head>\n<body class='pod'>", - $new->version_tag_comment, - "<!-- start doc -->\n", - ); - $new->html_footer( qq[\n<!-- end doc -->\n\n</body></html>\n] ); - - $new->{'Tagmap'} = {%Tagmap}; - return $new; -} - -sub batch_mode_page_object_init { - my($self, $batchconvobj, $module, $infile, $outfile, $depth) = @_; - DEBUG and print "Initting $self\n for $module\n", - " in $infile\n out $outfile\n depth $depth\n"; - $self->batch_mode(1); - $self->batch_mode_current_level($depth); - return $self; -} - -sub run { - my $self = $_[0]; - return $self->do_middle if $self->bare_output; - return - $self->do_beginning && $self->do_middle && $self->do_end; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub do_beginning { - my $self = $_[0]; - - my $title; - - if(defined $self->force_title) { - $title = $self->force_title; - DEBUG and print "Forcing title to be $title\n"; - } else { - # Actually try looking for the title in the document: - $title = $self->get_short_title(); - unless($self->content_seen) { - DEBUG and print "No content seen in search for title.\n"; - return; - } - $self->{'Title'} = $title; - - if(defined $title and $title =~ m/\S/) { - $title = $self->title_prefix . esc($title) . $self->title_postfix; - } else { - $title = $self->default_title; - $title = '' unless defined $title; - DEBUG and print "Title defaults to $title\n"; - } - } - - - my $after = $self->html_header_after_title || ''; - if($self->html_css) { - my $link = - $self->html_css =~ m/</ - ? $self->html_css # It's a big blob of markup, let's drop it in - : sprintf( # It's just a URL, so let's wrap it up - qq[<link rel="stylesheet" type="text/css" title="pod_stylesheet" href="%s">\n], - $self->html_css, - ); - $after =~ s{(</head>)}{$link\n$1}i; # otherwise nevermind - } - $self->_add_top_anchor(\$after); - - if($self->html_javascript) { - my $link = - $self->html_javascript =~ m/</ - ? $self->html_javascript # It's a big blob of markup, let's drop it in - : sprintf( # It's just a URL, so let's wrap it up - qq[<script type="text/javascript" src="%s"></script>\n], - $self->html_javascript, - ); - $after =~ s{(</head>)}{$link\n$1}i; # otherwise nevermind - } - - print {$self->{'output_fh'}} - $self->html_header_before_title || '', - $title, # already escaped - $after, - ; - - DEBUG and print "Returning from do_beginning...\n"; - return 1; -} - -sub _add_top_anchor { - my($self, $text_r) = @_; - unless($$text_r and $$text_r =~ m/id=['"]___top['"]/) { # a hack - $$text_r .= "<a id='___top' class='dummyTopAnchor' ></a>\n"; - } - return; -} - -sub version_tag_comment { - my $self = shift; - return sprintf - "<!--\n generated by %s v%s,\n using %s v%s,\n under Perl v%s at %s GMT.\n\n %s\n\n-->\n", - esc( - ref($self), $self->VERSION(), $ISA[0], $ISA[0]->VERSION(), - $], scalar(gmtime), - ), $self->_modnote(), - ; -} - -sub _modnote { - my $class = ref($_[0]) || $_[0]; - return join "\n " => grep m/\S/, split "\n", - -qq{ -If you want to change this HTML document, you probably shouldn't do that -by changing it directly. Instead, see about changing the calling options -to $class, and/or subclassing $class, -then reconverting this document from the Pod source. -When in doubt, email the author of $class for advice. -See 'perldoc $class' for more info. -}; - -} - -sub do_end { - my $self = $_[0]; - print {$self->{'output_fh'}} $self->html_footer || ''; - return 1; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Normally this would just be a call to _do_middle_main_loop -- but we -# have to do some elaborate things to emit all the content and then -# summarize it and output it /before/ the content that it's a summary of. - -sub do_middle { - my $self = $_[0]; - return $self->_do_middle_main_loop unless $self->index; - - if( $self->output_string ) { - # An efficiency hack - my $out = $self->output_string; #it's a reference to it - my $sneakytag = "\f\f\e\e\b\bIndex Here\e\e\b\b\f\f\n"; - $$out .= $sneakytag; - $self->_do_middle_main_loop; - $sneakytag = quotemeta($sneakytag); - my $index = $self->index_as_html(); - if( $$out =~ s/$sneakytag/$index/s ) { - # Expected case - DEBUG and print "Inserted ", length($index), " bytes of index HTML into $out.\n"; - } else { - DEBUG and print "Odd, couldn't find where to insert the index in the output!\n"; - # I don't think this should ever happen. - } - return 1; - } - - unless( $self->output_fh ) { - require Carp; - Carp::confess("Parser object \$p doesn't seem to have any output object! I don't know how to deal with that."); - } - - # If we get here, we're outputting to a FH. So we need to do some magic. - # Namely, divert all content to a string, which we output after the index. - my $fh = $self->output_fh; - my $content = ''; - { - # Our horrible bait and switch: - $self->output_string( \$content ); - $self->_do_middle_main_loop; - $self->abandon_output_string(); - $self->output_fh($fh); - } - print $fh $self->index_as_html(); - print $fh $content; - - return 1; -} - -########################################################################### - -sub index_as_html { - my $self = $_[0]; - # This is meant to be called AFTER the input document has been parsed! - - my $points = $self->{'PSHTML_index_points'} || []; - - @$points > 1 or return qq[<div class='indexgroupEmpty'></div>\n]; - # There's no point in having a 0-item or 1-item index, I dare say. - - my(@out) = qq{\n<div class='indexgroup'>}; - my $level = 0; - - my( $target_level, $previous_tagname, $tagname, $text, $anchorname, $indent); - foreach my $p (@$points, ['head0', '(end)']) { - ($tagname, $text) = @$p; - $anchorname = $self->section_escape($text); - if( $tagname =~ m{^head(\d+)$} ) { - $target_level = 0 + $1; - } else { # must be some kinda list item - if($previous_tagname =~ m{^head\d+$} ) { - $target_level = $level + 1; - } else { - $target_level = $level; # no change needed - } - } - - # Get to target_level by opening or closing ULs - while($level > $target_level) - { --$level; push @out, (" " x $level) . "</ul>"; } - while($level < $target_level) - { ++$level; push @out, (" " x ($level-1)) - . "<ul class='indexList indexList$level'>"; } - - $previous_tagname = $tagname; - next unless $level; - - $indent = ' ' x $level; - push @out, sprintf - "%s<li class='indexItem indexItem%s'><a href='#%s'>%s</a>", - $indent, $level, $anchorname, esc($text) - ; - } - push @out, "</div>\n"; - return join "\n", @out; -} - -########################################################################### - -sub _do_middle_main_loop { - my $self = $_[0]; - my $fh = $self->{'output_fh'}; - my $tagmap = $self->{'Tagmap'}; - - my($token, $type, $tagname, $linkto, $linktype); - my @stack; - my $dont_wrap = 0; - my %id_dup; - while($token = $self->get_token) { - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if( ($type = $token->type) eq 'start' ) { - if(($tagname = $token->tagname) eq 'L') { - $linktype = $token->attr('type') || 'insane'; - - $linkto = $self->do_link($token); - - if(defined $linkto and length $linkto) { - esc($linkto); - # (Yes, SGML-escaping applies on top of %-escaping! - # But it's rarely noticeable in practice.) - print $fh qq{<a href="$linkto" class="podlink$linktype"\n>}; - } else { - print $fh "<a>"; # Yes, an 'a' element with no attributes! - } - - } elsif ($tagname eq 'item-text' or $tagname =~ m/^head\d$/s) { - print $fh $tagmap->{$tagname} || next; - - my @to_unget; - while(1) { - push @to_unget, $self->get_token; - last if $to_unget[-1]->is_end - and $to_unget[-1]->tagname eq $tagname; - - # TODO: support for X<...>'s found in here? (maybe hack into linearize_tokens) - } - - my $name = $self->linearize_tokens(@to_unget); - - print $fh "<a "; - print $fh "class='u' href='#___top' title='click to go to top of document'\n" - if $tagname =~ m/^head\d$/s; - - if(defined $name) { - my $esc = esc( $self->section_name_tidy( $name ) ); - if (not $id_dup{$esc}){ - print $fh qq[id="I$esc"]; - $id_dup{$esc}=1; - } - DEBUG and print "Linearized ", scalar(@to_unget), - " tokens as \"$name\".\n"; - - push @{ $self->{'PSHTML_index_points'} }, [$tagname, $name] - if $ToIndex{ $tagname }; - # Obviously, this discards all formatting codes (saving - # just their content), but ahwell. - - } else { # ludicrously long, so nevermind - DEBUG and print "Linearized ", scalar(@to_unget), - " tokens, but it was too long, so nevermind.\n"; - } - print $fh "\n>"; - $self->unget_token(@to_unget); - - } elsif ($tagname eq 'Data') { - my $next = $self->get_token; - next unless defined $next; - unless( $next->type eq 'text' ) { - $self->unget_token($next); - next; - } - DEBUG and print " raw text ", $next->text, "\n"; - printf $fh "\n" . $next->text . "\n"; - next; - - } else { - if( $tagname =~ m/^over-/s ) { - push @stack, ''; - } elsif( $tagname =~ m/^item-/s and @stack and $stack[-1] ) { - print $fh $stack[-1]; - $stack[-1] = ''; - } - print $fh $tagmap->{$tagname} || next; - ++$dont_wrap if $tagname eq 'Verbatim' or $tagname eq "VerbatimFormatted" - or $tagname eq 'X'; - } - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } elsif( $type eq 'end' ) { - if( ($tagname = $token->tagname) =~ m/^over-/s ) { - if( my $end = pop @stack ) { - print $fh $end; - } - } elsif( $tagname =~ m/^item-/s and @stack) { - $stack[-1] = $tagmap->{"/$tagname"}; - if( $tagname eq 'item-text' and defined(my $next = $self->get_token) ) { - $self->unget_token($next); - if( $next->type eq 'start' and $next->tagname !~ m/^item-/s ) { - print $fh $tagmap->{"/item-text"},$tagmap->{"item-body"}; - $stack[-1] = $tagmap->{"/item-body"}; - } - } - next; - } - print $fh $tagmap->{"/$tagname"} || next; - --$dont_wrap if $tagname eq 'Verbatim' or $tagname eq 'X'; - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } elsif( $type eq 'text' ) { - esc($type = $token->text); # reuse $type, why not - $type =~ s/([\?\!\"\'\.\,]) /$1\n/g unless $dont_wrap; - print $fh $type; - } - - } - return 1; -} - -########################################################################### -# - -sub do_link { - my($self, $token) = @_; - my $type = $token->attr('type'); - if(!defined $type) { - $self->whine("Typeless L!?", $token->attr('start_line')); - } elsif( $type eq 'pod') { return $self->do_pod_link($token); - } elsif( $type eq 'url') { return $self->do_url_link($token); - } elsif( $type eq 'man') { return $self->do_man_link($token); - } else { - $self->whine("L of unknown type $type!?", $token->attr('start_line')); - } - return 'FNORG'; # should never get called -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub do_url_link { return $_[1]->attr('to') } - -sub do_man_link { return undef } - # But subclasses are welcome to override this if they have man - # pages somewhere URL-accessible. - - -sub do_pod_link { - # And now things get really messy... - my($self, $link) = @_; - my $to = $link->attr('to'); - my $section = $link->attr('section'); - return undef unless( # should never happen - (defined $to and length $to) or - (defined $section and length $section) - ); - - $section = $self->section_escape($section) - if defined $section and length($section .= ''); # (stringify) - - DEBUG and printf "Resolving \"%s\" \"%s\"...\n", - $to || "(nil)", $section || "(nil)"; - - { - # An early hack: - my $complete_url = $self->resolve_pod_link_by_table($to, $section); - if( $complete_url ) { - DEBUG > 1 and print "resolve_pod_link_by_table(T,S) gives ", - $complete_url, "\n (Returning that.)\n"; - return $complete_url; - } else { - DEBUG > 4 and print " resolve_pod_link_by_table(T,S)", - " didn't return anything interesting.\n"; - } - } - - if(defined $to and length $to) { - # Give this routine first hack again - my $there = $self->resolve_pod_link_by_table($to); - if(defined $there and length $there) { - DEBUG > 1 - and print "resolve_pod_link_by_table(T) gives $there\n"; - } else { - $there = - $self->resolve_pod_page_link($to, $section); - # (I pass it the section value, but I don't see a - # particular reason it'd use it.) - DEBUG > 1 and print "resolve_pod_page_link gives ", $to || "(nil)", "\n"; - unless( defined $there and length $there ) { - DEBUG and print "Can't resolve $to\n"; - return undef; - } - # resolve_pod_page_link returning undef is how it - # can signal that it gives up on making a link - } - $to = $there; - } - - #DEBUG and print "So far [", $to||'nil', "] [", $section||'nil', "]\n"; - - my $out = (defined $to and length $to) ? $to : ''; - $out .= "#" . $section if defined $section and length $section; - - unless(length $out) { # sanity check - DEBUG and printf "Oddly, couldn't resolve \"%s\" \"%s\"...\n", - $to || "(nil)", $section || "(nil)"; - return undef; - } - - DEBUG and print "Resolved to $out\n"; - return $out; -} - - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - -sub section_escape { - my($self, $section) = @_; - return $self->section_url_escape( - $self->section_name_tidy($section) - ); -} - -sub section_name_tidy { - my($self, $section) = @_; - $section =~ tr/ /_/; - $section =~ s/[^0-9a-z]/_/ig; # drop crazy characters -# $section = $self->unicode_escape_url($section); - $section = '_' unless length $section; - return $section; -} - -sub section_url_escape { shift->general_url_escape(@_) } -sub pagepath_url_escape { shift->general_url_escape(@_) } - -sub general_url_escape { - my($self, $string) = @_; - - $string =~ s/([^\x00-\xFF])/join '', map sprintf('%%%02X',$_), unpack 'C*', $1/eg; - # express Unicode things as urlencode(utf(orig)). - - # A pretty conservative escaping, behoovey even for query components - # of a URL (see RFC 2396) - - $string =~ s/([^-_\.!~*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf('%%%02X',ord($1))/eg; - # Yes, stipulate the list without a range, so that this can work right on - # all charsets that this module happens to run under. - # Altho, hmm, what about that ord? Presumably that won't work right - # under non-ASCII charsets. Something should be done - # about that, I guess? - - return $string; -} - -#-------------------------------------------------------------------------- -# -# Oh look, a yawning portal to Hell! Let's play touch football right by it! -# - -sub resolve_pod_page_link { - # resolve_pod_page_link must return a properly escaped URL - my $self = shift; - return $self->batch_mode() - ? $self->resolve_pod_page_link_batch_mode(@_) - : $self->resolve_pod_page_link_singleton_mode(@_) - ; -} - -sub resolve_pod_page_link_singleton_mode { - my($self, $it) = @_; - return undef unless defined $it and length $it; - my $url = $self->pagepath_url_escape($it); - - $url =~ s{::$}{}s; # probably never comes up anyway - $url =~ s{::}{/}g unless $self->perldoc_url_prefix =~ m/\?/s; # sane DWIM? - - return undef unless length $url; - return $self->perldoc_url_prefix . $url . $self->perldoc_url_postfix; -} - -sub resolve_pod_page_link_batch_mode { - my($self, $to) = @_; - DEBUG > 1 and print " During batch mode, resolving $to ...\n"; - my @path = grep length($_), split m/::/s, $to, -1; - unless( @path ) { # sanity - DEBUG and print "Very odd! Splitting $to gives (nil)!\n"; - return undef; - } - $self->batch_mode_rectify_path(\@path); - my $out = join('/', map $self->pagepath_url_escape($_), @path) - . $HTML_EXTENSION; - DEBUG > 1 and print " => $out\n"; - return $out; -} - -sub batch_mode_rectify_path { - my($self, $pathbits) = @_; - my $level = $self->batch_mode_current_level; - $level--; # how many levels up to go to get to the root - if($level < 1) { - unshift @$pathbits, '.'; # just to be pretty - } else { - unshift @$pathbits, ('..') x $level; - } - return; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub resolve_pod_link_by_table { - # A crazy hack to allow specifying custom L<foo> => URL mappings - - return unless $_[0]->{'podhtml_LOT'}; # An optimizy shortcut - - my($self, $to, $section) = @_; - - # TODO: add a method that actually populates podhtml_LOT from a file? - - if(defined $section) { - $to = '' unless defined $to and length $to; - return $self->{'podhtml_LOT'}{"$to#$section"}; # quite possibly undef! - } else { - return $self->{'podhtml_LOT'}{$to}; # quite possibly undef! - } - return; -} - -########################################################################### - -sub linearize_tokens { # self, tokens - my $self = shift; - my $out = ''; - - my $t; - while($t = shift @_) { - if(!ref $t or !UNIVERSAL::can($t, 'is_text')) { - $out .= $t; # a string, or some insane thing - } elsif($t->is_text) { - $out .= $t->text; - } elsif($t->is_start and $t->tag eq 'X') { - # Ignore until the end of this X<...> sequence: - my $x_open = 1; - while($x_open) { - next if( ($t = shift @_)->is_text ); - if( $t->is_start and $t->tag eq 'X') { ++$x_open } - elsif($t->is_end and $t->tag eq 'X') { --$x_open } - } - } - } - return undef if length $out > $Linearization_Limit; - return $out; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub unicode_escape_url { - my($self, $string) = @_; - $string =~ s/([^\x00-\xFF])/'('.ord($1).')'/eg; - # Turn char 1234 into "(1234)" - return $string; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub esc { # a function. - if(defined wantarray) { - if(wantarray) { - @_ = splice @_; # break aliasing - } else { - my $x = shift; - $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg; - return $x; - } - } - foreach my $x (@_) { - # Escape things very cautiously: - $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg - if defined $x; - # Leave out "- so that "--" won't make it thru in X-generated comments - # with text in them. - - # Yes, stipulate the list without a range, so that this can work right on - # all charsets that this module happens to run under. - # Altho, hmm, what about that ord? Presumably that won't work right - # under non-ASCII charsets. Something should be done about that. - } - return @_; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1; -__END__ - -=head1 NAME - -Pod::Simple::HTML - convert Pod to HTML - -=head1 SYNOPSIS - - perl -MPod::Simple::HTML -e Pod::Simple::HTML::go thingy.pod - - -=head1 DESCRIPTION - -This class is for making an HTML rendering of a Pod document. - -This is a subclass of L<Pod::Simple::PullParser> and inherits all its -methods (and options). - -Note that if you want to do a batch conversion of a lot of Pod -documents to HTML, you should see the module L<Pod::Simple::HTMLBatch>. - - - -=head1 CALLING FROM THE COMMAND LINE - -TODO - - perl -MPod::Simple::HTML -e Pod::Simple::HTML::go Thing.pod Thing.html - - - -=head1 CALLING FROM PERL - -TODO make a new object, set any options, and use parse_from_file - - -=head1 METHODS - -TODO -all (most?) accessorized methods - - -=head1 SUBCLASSING - -TODO - - can just set any of: html_css html_javascript title_prefix - 'html_header_before_title', - 'html_header_after_title', - 'html_footer', - -maybe override do_pod_link - -maybe override do_beginning do_end - - - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::HTMLBatch> - - -TODO: a corpus of sample Pod input and HTML output? Or common -idioms? - - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002-2004 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/HTMLBatch.pm b/web/bin/lib/Pod/Simple/HTMLBatch.pm deleted file mode 100644 index bce0a44..0000000 --- a/web/bin/lib/Pod/Simple/HTMLBatch.pm +++ /dev/null @@ -1,1342 +0,0 @@ - -require 5; -package Pod::Simple::HTMLBatch; -use strict; -use vars qw( $VERSION $HTML_RENDER_CLASS $HTML_EXTENSION - $CSS $JAVASCRIPT $SLEEPY $SEARCH_CLASS @ISA -); -$VERSION = '3.02'; -@ISA = (); # Yup, we're NOT a subclass of Pod::Simple::HTML! - -# TODO: nocontents stylesheets. Strike some of the color variations? - -use Pod::Simple::HTML (); -BEGIN {*esc = \&Pod::Simple::HTML::esc } -use File::Spec (); -use UNIVERSAL (); - # "Isn't the Universe an amazing place? I wouldn't live anywhere else!" - -use Pod::Simple::Search; -$SEARCH_CLASS ||= 'Pod::Simple::Search'; - -BEGIN { - if(defined &DEBUG) { } # no-op - elsif( defined &Pod::Simple::DEBUG ) { *DEBUG = \&Pod::Simple::DEBUG } - else { *DEBUG = sub () {0}; } -} - -$SLEEPY = 1 if !defined $SLEEPY and $^O =~ /mswin|mac/i; -# flag to occasionally sleep for $SLEEPY - 1 seconds. - -$HTML_RENDER_CLASS ||= "Pod::Simple::HTML"; - -# -# Methods beginning with "_" are particularly internal and possibly ugly. -# - -Pod::Simple::_accessorize( __PACKAGE__, - 'verbose', # how verbose to be during batch conversion - 'html_render_class', # what class to use to render - 'contents_file', # If set, should be the name of a file (in current directory) - # to write the list of all modules to - 'index', # will set $htmlpage->index(...) to this (true or false) - 'progress', # progress object - 'contents_page_start', 'contents_page_end', - - 'css_flurry', '_css_wad', 'javascript_flurry', '_javascript_wad', - 'no_contents_links', # set to true to suppress automatic adding of << links. - '_contents', -); - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Just so we can run from the command line more easily -sub go { - @ARGV == 2 or die sprintf( - "Usage: perl -M%s -e %s:go indirs outdir\n (or use \"\@INC\" for indirs)\n", - __PACKAGE__, __PACKAGE__, - ); - - if(defined($ARGV[1]) and length($ARGV[1])) { - my $d = $ARGV[1]; - -e $d or die "I see no output directory named \"$d\"\nAborting"; - -d $d or die "But \"$d\" isn't a directory!\nAborting"; - -w $d or die "Directory \"$d\" isn't writeable!\nAborting"; - } - - __PACKAGE__->batch_convert(@ARGV); -} -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub new { - my $new = bless {}, ref($_[0]) || $_[0]; - $new->html_render_class($HTML_RENDER_CLASS); - $new->verbose(1 + DEBUG); - $new->_contents([]); - - $new->index(1); - - $new-> _css_wad([]); $new->css_flurry(1); - $new->_javascript_wad([]); $new->javascript_flurry(1); - - $new->contents_file( - 'index' . ($HTML_EXTENSION || $Pod::Simple::HTML::HTML_EXTENSION) - ); - - $new->contents_page_start( join "\n", grep $_, - $Pod::Simple::HTML::Doctype_decl, - "<html><head>", - "<title>Perl Documentation</title>", - $Pod::Simple::HTML::Content_decl, - "</head>", - "\n<body class='contentspage'>\n<h1>Perl Documentation</h1>\n" - ); # override if you need a different title - - - $new->contents_page_end( sprintf( - "\n\n<p class='contentsfooty'>Generated by %s v%s under Perl v%s\n<br >At %s GMT, which is %s local time.</p>\n\n</body></html>\n", - esc( - ref($new), - eval {$new->VERSION} || $VERSION, - $], scalar(gmtime), scalar(localtime), - ))); - - return $new; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub muse { - my $self = shift; - if($self->verbose) { - print 'T+', int(time() - $self->{'_batch_start_time'}), "s: ", @_, "\n"; - } - return 1; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub batch_convert { - my($self, $dirs, $outdir) = @_; - $self ||= __PACKAGE__; # tolerate being called as an optionless function - $self = $self->new unless ref $self; # tolerate being used as a class method - - if(!defined($dirs) or $dirs eq '' or $dirs eq '@INC' ) { - $dirs = ''; - } elsif(ref $dirs) { - # OK, it's an explicit set of dirs to scan, specified as an arrayref. - } else { - # OK, it's an explicit set of dirs to scan, specified as a - # string like "/thing:/also:/whatever/perl" (":"-delim, as usual) - # or, under MSWin, like "c:/thing;d:/also;c:/whatever/perl" (";"-delim!) - require Config; - my $ps = quotemeta( $Config::Config{'path_sep'} || ":" ); - $dirs = [ grep length($_), split qr/$ps/, $dirs ]; - } - - $outdir = $self->filespecsys->curdir - unless defined $outdir and length $outdir; - - $self->_batch_convert_main($dirs, $outdir); -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _batch_convert_main { - my($self, $dirs, $outdir) = @_; - # $dirs is either false, or an arrayref. - # $outdir is a pathspec. - - $self->{'_batch_start_time'} ||= time(); - - $self->muse( "= ", scalar(localtime) ); - $self->muse( "Starting batch conversion to \"$outdir\"" ); - - my $progress = $self->progress; - if(!$progress and $self->verbose > 0 and $self->verbose() <= 5) { - require Pod::Simple::Progress; - $progress = Pod::Simple::Progress->new( - ($self->verbose < 2) ? () # Default omission-delay - : ($self->verbose == 2) ? 1 # Reduce the omission-delay - : 0 # Eliminate the omission-delay - ); - $self->progress($progress); - } - - if($dirs) { - $self->muse(scalar(@$dirs), " dirs to scan: @$dirs"); - } else { - $self->muse("Scanning \@INC. This could take a minute or two."); - } - my $mod2path = $self->find_all_pods($dirs ? $dirs : ()); - $self->muse("Done scanning."); - - my $total = keys %$mod2path; - unless($total) { - $self->muse("No pod found. Aborting batch conversion.\n"); - return $self; - } - - $progress and $progress->goal($total); - $self->muse("Now converting pod files to HTML.", - ($total > 25) ? " This will take a while more." : () - ); - - $self->_spray_css( $outdir ); - $self->_spray_javascript( $outdir ); - - $self->_do_all_batch_conversions($mod2path, $outdir); - - $progress and $progress->done(sprintf ( - "Done converting %d files.", $self->{"__batch_conv_page_count"} - )); - return $self->_batch_convert_finish($outdir); - return $self; -} - - -sub _do_all_batch_conversions { - my($self, $mod2path, $outdir) = @_; - $self->{"__batch_conv_page_count"} = 0; - - foreach my $module (sort {lc($a) cmp lc($b)} keys %$mod2path) { - $self->_do_one_batch_conversion($module, $mod2path, $outdir); - sleep($SLEEPY - 1) if $SLEEPY; - } - - return; -} - -sub _batch_convert_finish { - my($self, $outdir) = @_; - $self->write_contents_file($outdir); - $self->muse("Done with batch conversion. $$self{'__batch_conv_page_count'} files done."); - $self->muse( "= ", scalar(localtime) ); - $self->progress and $self->progress->done("All done!"); - return; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _do_one_batch_conversion { - my($self, $module, $mod2path, $outdir, $outfile) = @_; - - my $retval; - my $total = scalar keys %$mod2path; - my $infile = $mod2path->{$module}; - my @namelets = grep m/\S/, split "::", $module; - # this can stick around in the contents LoL - my $depth = scalar @namelets; - die "Contentless thingie?! $module $infile" unless @namelets; #sanity - - $outfile ||= do { - my @n = @namelets; - $n[-1] .= $HTML_EXTENSION || $Pod::Simple::HTML::HTML_EXTENSION; - $self->filespecsys->catfile( $outdir, @n ); - }; - - my $progress = $self->progress; - - my $page = $self->html_render_class->new; - if(DEBUG > 5) { - $self->muse($self->{"__batch_conv_page_count"} + 1, "/$total: ", - ref($page), " render ($depth) $module => $outfile"); - } elsif(DEBUG > 2) { - $self->muse($self->{"__batch_conv_page_count"} + 1, "/$total: $module => $outfile") - } - - # Give each class a chance to init the converter: - - $page->batch_mode_page_object_init($self, $module, $infile, $outfile, $depth) - if $page->can('batch_mode_page_object_init'); - $self->batch_mode_page_object_init($page, $module, $infile, $outfile, $depth) - if $self->can('batch_mode_page_object_init'); - - # Now get busy... - $self->makepath($outdir => \@namelets); - - $progress and $progress->reach($self->{"__batch_conv_page_count"}, "Rendering $module"); - - if( $retval = $page->parse_from_file($infile, $outfile) ) { - ++ $self->{"__batch_conv_page_count"} ; - $self->note_for_contents_file( \@namelets, $infile, $outfile ); - } else { - $self->muse("Odd, parse_from_file(\"$infile\", \"$outfile\") returned false."); - } - - $page->batch_mode_page_object_kill($self, $module, $infile, $outfile, $depth) - if $page->can('batch_mode_page_object_kill'); - # The following isn't a typo. Note that it switches $self and $page. - $self->batch_mode_page_object_kill($page, $module, $infile, $outfile, $depth) - if $self->can('batch_mode_page_object_kill'); - - DEBUG > 4 and printf "%s %sb < $infile %s %sb\n", - $outfile, -s $outfile, $infile, -s $infile - ; - - undef($page); - return $retval; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub filespecsys { $_[0]{'_filespecsys'} || 'File::Spec' } - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub note_for_contents_file { - my($self, $namelets, $infile, $outfile) = @_; - - # I think the infile and outfile parts are never used. -- SMB - # But it's handy to have them around for debugging. - - if( $self->contents_file ) { - my $c = $self->_contents(); - push @$c, - [ join("::", @$namelets), $infile, $outfile, $namelets ] - # 0 1 2 3 - ; - DEBUG > 3 and print "Noting @$c[-1]\n"; - } - return; -} - -#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - -sub write_contents_file { - my($self, $outdir) = @_; - my $outfile = $self->_contents_filespec($outdir) || return; - - $self->muse("Preparing list of modules for ToC"); - - my($toplevel, # maps toplevelbit => [all submodules] - $toplevel_form_freq, # ends up being 'foo' => 'Foo' - ) = $self->_prep_contents_breakdown; - - my $Contents = eval { $self->_wopen($outfile) }; - if( $Contents ) { - $self->muse( "Writing contents file $outfile" ); - } else { - warn "Couldn't write-open contents file $outfile: $!\nAbort writing to $outfile at all"; - return; - } - - $self->_write_contents_start( $Contents, $outfile, ); - $self->_write_contents_middle( $Contents, $outfile, $toplevel, $toplevel_form_freq ); - $self->_write_contents_end( $Contents, $outfile, ); - return $outfile; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _write_contents_start { - my($self, $Contents, $outfile) = @_; - my $starter = $self->contents_page_start || ''; - - { - my $css_wad = $self->_css_wad_to_markup(1); - if( $css_wad ) { - $starter =~ s{(</head>)}{\n$css_wad\n$1}i; # otherwise nevermind - } - - my $javascript_wad = $self->_javascript_wad_to_markup(1); - if( $javascript_wad ) { - $starter =~ s{(</head>)}{\n$javascript_wad\n$1}i; # otherwise nevermind - } - } - - unless(print $Contents $starter, "<dl class='superindex'>\n" ) { - warn "Couldn't print to $outfile: $!\nAbort writing to $outfile at all"; - close($Contents); - return 0; - } - return 1; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _write_contents_middle { - my($self, $Contents, $outfile, $toplevel2submodules, $toplevel_form_freq) = @_; - - foreach my $t (sort keys %$toplevel2submodules) { - my @downlines = sort {$a->[-1] cmp $b->[-1]} - @{ $toplevel2submodules->{$t} }; - - printf $Contents qq[<dt><a name="%s">%s</a></dt>\n<dd>\n], - esc( $t, $toplevel_form_freq->{$t} ) - ; - - my($path, $name); - foreach my $e (@downlines) { - $name = $e->[0]; - $path = join( "/", '.', esc( @{$e->[3]} ) ) - . ($HTML_EXTENSION || $Pod::Simple::HTML::HTML_EXTENSION); - print $Contents qq{ <a href="$path">}, esc($name), "</a> \n"; - } - print $Contents "</dd>\n\n"; - } - return 1; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _write_contents_end { - my($self, $Contents, $outfile) = @_; - unless( - print $Contents "</dl>\n", - $self->contents_page_end || '', - ) { - warn "Couldn't write to $outfile: $!"; - } - close($Contents) or warn "Couldn't close $outfile: $!"; - return 1; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _prep_contents_breakdown { - my($self) = @_; - my $contents = $self->_contents; - my %toplevel; # maps lctoplevelbit => [all submodules] - my %toplevel_form_freq; # ends up being 'foo' => 'Foo' - # (mapping anycase forms to most freq form) - - foreach my $entry (@$contents) { - my $toplevel = - $entry->[0] =~ m/^perl\w*$/ ? 'perl_core_docs' - # group all the perlwhatever docs together - : $entry->[3][0] # normal case - ; - ++$toplevel_form_freq{ lc $toplevel }{ $toplevel }; - push @{ $toplevel{ lc $toplevel } }, $entry; - push @$entry, lc($entry->[0]); # add a sort-order key to the end - } - - foreach my $toplevel (sort keys %toplevel) { - my $fgroup = $toplevel_form_freq{$toplevel}; - $toplevel_form_freq{$toplevel} = - ( - sort { $fgroup->{$b} <=> $fgroup->{$a} or $a cmp $b } - keys %$fgroup - # This hash is extremely unlikely to have more than 4 members, so this - # sort isn't so very wasteful - )[0]; - } - - return(\%toplevel, \%toplevel_form_freq) if wantarray; - return \%toplevel; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _contents_filespec { - my($self, $outdir) = @_; - my $outfile = $self->contents_file; - return unless $outfile; - return $self->filespecsys->catfile( $outdir, $outfile ); -} - -#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - -sub makepath { - my($self, $outdir, $namelets) = @_; - return unless @$namelets > 1; - for my $i (0 .. ($#$namelets - 1)) { - my $dir = $self->filespecsys->catdir( $outdir, @$namelets[0 .. $i] ); - if(-e $dir) { - die "$dir exists but not as a directory!?" unless -d $dir; - next; - } - DEBUG > 3 and print " Making $dir\n"; - mkdir $dir, 0777 - or die "Can't mkdir $dir: $!\nAborting" - ; - } - return; -} - -#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - -sub batch_mode_page_object_init { - my $self = shift; - my($page, $module, $infile, $outfile, $depth) = @_; - - # TODO: any further options to percolate onto this new object here? - - $page->default_title($module); - $page->index( $self->index ); - - $page->html_css( $self-> _css_wad_to_markup($depth) ); - $page->html_javascript( $self->_javascript_wad_to_markup($depth) ); - - $self->add_header_backlink($page, $module, $infile, $outfile, $depth); - $self->add_footer_backlink($page, $module, $infile, $outfile, $depth); - - - return $self; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub add_header_backlink { - my $self = shift; - return if $self->no_contents_links; - my($page, $module, $infile, $outfile, $depth) = @_; - $page->html_header_after_title( join '', - $page->html_header_after_title || '', - - qq[<p class="backlinktop"><b><a name="___top" href="], - $self->url_up_to_contents($depth), - qq[" accesskey="1" title="All Documents"><<</a></b></p>\n], - ) - if $self->contents_file - ; - return; -} - -sub add_footer_backlink { - my $self = shift; - return if $self->no_contents_links; - my($page, $module, $infile, $outfile, $depth) = @_; - $page->html_footer( join '', - qq[<p class="backlinkbottom"><b><a name="___bottom" href="], - $self->url_up_to_contents($depth), - qq[" title="All Documents"><<</a></b></p>\n], - - $page->html_footer || '', - ) - if $self->contents_file - ; - return; -} - -sub url_up_to_contents { - my($self, $depth) = @_; - --$depth; - return join '/', ('..') x $depth, esc($self->contents_file); -} - -#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - -sub find_all_pods { - my($self, $dirs) = @_; - # You can override find_all_pods in a subclass if you want to - # do extra filtering or whatnot. But for the moment, we just - # pass to modnames2paths: - return $self->modnames2paths($dirs); -} - -#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- - -sub modnames2paths { # return a hashref mapping modulenames => paths - my($self, $dirs) = @_; - - my $m2p; - { - my $search = $SEARCH_CLASS->new; - DEBUG and print "Searching via $search\n"; - $search->verbose(1) if DEBUG > 10; - $search->progress( $self->progress->copy->goal(0) ) if $self->progress; - $search->shadows(0); # don't bother noting shadowed files - $search->inc( $dirs ? 0 : 1 ); - $search->survey( $dirs ? @$dirs : () ); - $m2p = $search->name2path; - die "What, no name2path?!" unless $m2p; - } - - $self->muse("That's odd... no modules found!") unless keys %$m2p; - if( DEBUG > 4 ) { - print "Modules found (name => path):\n"; - foreach my $m (sort {lc($a) cmp lc($b)} keys %$m2p) { - print " $m $$m2p{$m}\n"; - } - print "(total ", scalar(keys %$m2p), ")\n\n"; - } elsif( DEBUG ) { - print "Found ", scalar(keys %$m2p), " modules.\n"; - } - $self->muse( "Found ", scalar(keys %$m2p), " modules." ); - - # return the Foo::Bar => /whatever/Foo/Bar.pod|pm hashref - return $m2p; -} - -#=========================================================================== - -sub _wopen { - # this is abstracted out so that the daemon class can override it - my($self, $outpath) = @_; - require Symbol; - my $out_fh = Symbol::gensym(); - DEBUG > 5 and print "Write-opening to $outpath\n"; - return $out_fh if open($out_fh, "> $outpath"); - require Carp; - Carp::croak("Can't write-open $outpath: $!"); -} - -#========================================================================== - -sub add_css { - my($self, $url, $is_default, $name, $content_type, $media, $_code) = @_; - return unless $url; - unless($name) { - # cook up a reasonable name based on the URL - $name = $url; - if( $name !~ m/\?/ and $name =~ m{([^/]+)$}s ) { - $name = $1; - $name =~ s/\.css//i; - } - } - $media ||= 'all'; - $content_type ||= 'text/css'; - - my $bunch = [$url, $name, $content_type, $media, $_code]; - if($is_default) { unshift @{ $self->_css_wad }, $bunch } - else { push @{ $self->_css_wad }, $bunch } - return; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _spray_css { - my($self, $outdir) = @_; - - return unless $self->css_flurry(); - $self->_gen_css_wad(); - - my $lol = $self->_css_wad; - foreach my $chunk (@$lol) { - my $url = $chunk->[0]; - my $outfile; - if( ref($chunk->[-1]) and $url =~ m{^(_[-a-z0-9_]+\.css$)} ) { - $outfile = $self->filespecsys->catfile( $outdir, $1 ); - DEBUG > 5 and print "Noting $$chunk[0] as a file I'll create.\n"; - } else { - DEBUG > 5 and print "OK, noting $$chunk[0] as an external CSS.\n"; - # Requires no further attention. - next; - } - - #$self->muse( "Writing autogenerated CSS file $outfile" ); - my $Cssout = $self->_wopen($outfile); - print $Cssout ${$chunk->[-1]} - or warn "Couldn't print to $outfile: $!\nAbort writing to $outfile at all"; - close($Cssout); - DEBUG > 5 and print "Wrote $outfile\n"; - } - - return; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _css_wad_to_markup { - my($self, $depth) = @_; - - my @css = @{ $self->_css_wad || return '' }; - return '' unless @css; - - my $rel = 'stylesheet'; - my $out = ''; - - --$depth; - my $uplink = $depth ? ('../' x $depth) : ''; - - foreach my $chunk (@css) { - next unless $chunk and @$chunk; - - my( $url1, $url2, $title, $type, $media) = ( - $self->_maybe_uplink( $chunk->[0], $uplink ), - esc(grep !ref($_), @$chunk) - ); - - $out .= qq{<link rel="$rel" title="$title" type="$type" href="$url1$url2" media="$media" >\n}; - - $rel = 'alternate stylesheet'; # alternates = all non-first iterations - } - return $out; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _maybe_uplink { - # if the given URL looks relative, return the given uplink string -- - # otherwise return emptystring - my($self, $url, $uplink) = @_; - ($url =~ m{^\./} or $url !~ m{[/\:]} ) - ? $uplink - : '' - # qualify it, if/as needed -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub _gen_css_wad { - my $self = $_[0]; - my $css_template = $self->_css_template; - foreach my $variation ( - - # Commented out for sake of concision: - # - # 011n=black_with_red_on_white - # 001n=black_with_yellow_on_white - # 101n=black_with_green_on_white - # 110=white_with_yellow_on_black - # 010=white_with_green_on_black - # 011=white_with_blue_on_black - # 100=white_with_red_on_black - - qw[ - 110n=black_with_blue_on_white - 010n=black_with_magenta_on_white - 100n=black_with_cyan_on_white - - 101=white_with_purple_on_black - 001=white_with_navy_blue_on_black - - 010a=grey_with_green_on_black - 010b=white_with_green_on_grey - 101an=black_with_green_on_grey - 101bn=grey_with_green_on_white - ]) { - - my $outname = $variation; - my($flipmode, @swap) = ( ($4 || ''), $1,$2,$3) - if $outname =~ s/^([012])([012])([[012])([a-z]*)=?//s; - @swap = () if '010' eq join '', @swap; # 010 is a swop-no-op! - - my $this_css = - "/* This file is autogenerated. Do not edit. $variation */\n\n" - . $css_template; - - # Only look at three-digitty colors, for now at least. - if( $flipmode =~ m/n/ ) { - $this_css =~ s/(#[0-9a-fA-F]{3})\b/_color_negate($1)/eg; - $this_css =~ s/\bthin\b/medium/g; - } - $this_css =~ s<#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])\b> - < join '', '#', ($1,$2,$3)[@swap] >eg if @swap; - - if( $flipmode =~ m/a/) - { $this_css =~ s/#fff\b/#999/gi } # black -> dark grey - elsif($flipmode =~ m/b/) - { $this_css =~ s/#000\b/#666/gi } # white -> light grey - - my $name = $outname; - $name =~ tr/-_/ /; - $self->add_css( "_$outname.css", 0, $name, 0, 0, \$this_css); - } - - # Now a few indexless variations: - foreach my $variation (qw[ - black_with_blue_on_white white_with_purple_on_black - white_with_green_on_grey grey_with_green_on_white - ]) { - my $outname = "indexless_$variation"; - my $this_css = join "\n", - "/* This file is autogenerated. Do not edit. $outname */\n", - "\@import url(\"./_$variation.css\");", - ".indexgroup { display: none; }", - "\n", - ; - my $name = $outname; - $name =~ tr/-_/ /; - $self->add_css( "_$outname.css", 0, $name, 0, 0, \$this_css); - } - - return; -} - -sub _color_negate { - my $x = lc $_[0]; - $x =~ tr[0123456789abcdef] - [fedcba9876543210]; - return $x; -} - -#=========================================================================== - -sub add_javascript { - my($self, $url, $content_type, $_code) = @_; - return unless $url; - push @{ $self->_javascript_wad }, [ - $url, $content_type || 'text/javascript', $_code - ]; - return; -} - -sub _spray_javascript { - my($self, $outdir) = @_; - return unless $self->javascript_flurry(); - $self->_gen_javascript_wad(); - - my $lol = $self->_javascript_wad; - foreach my $script (@$lol) { - my $url = $script->[0]; - my $outfile; - - if( ref($script->[-1]) and $url =~ m{^(_[-a-z0-9_]+\.js$)} ) { - $outfile = $self->filespecsys->catfile( $outdir, $1 ); - DEBUG > 5 and print "Noting $$script[0] as a file I'll create.\n"; - } else { - DEBUG > 5 and print "OK, noting $$script[0] as an external JavaScript.\n"; - next; - } - - #$self->muse( "Writing JavaScript file $outfile" ); - my $Jsout = $self->_wopen($outfile); - - print $Jsout ${$script->[-1]} - or warn "Couldn't print to $outfile: $!\nAbort writing to $outfile at all"; - close($Jsout); - DEBUG > 5 and print "Wrote $outfile\n"; - } - - return; -} - -sub _gen_javascript_wad { - my $self = $_[0]; - my $js_code = $self->_javascript || return; - $self->add_javascript( "_podly.js", 0, \$js_code); - return; -} - -sub _javascript_wad_to_markup { - my($self, $depth) = @_; - - my @scripts = @{ $self->_javascript_wad || return '' }; - return '' unless @scripts; - - my $out = ''; - - --$depth; - my $uplink = $depth ? ('../' x $depth) : ''; - - foreach my $s (@scripts) { - next unless $s and @$s; - - my( $url1, $url2, $type, $media) = ( - $self->_maybe_uplink( $s->[0], $uplink ), - esc(grep !ref($_), @$s) - ); - - $out .= qq{<script type="$type" src="$url1$url2"></script>\n}; - } - return $out; -} - -#=========================================================================== - -sub _css_template { return $CSS } -sub _javascript { return $JAVASCRIPT } - -$CSS = <<'EOCSS'; -/* For accessibility reasons, never specify text sizes in px/pt/pc/in/cm/mm */ - -@media all { .hide { display: none; } } - -@media print { - .noprint, div.indexgroup, .backlinktop, .backlinkbottom { display: none } - - * { - border-color: black !important; - color: black !important; - background-color: transparent !important; - background-image: none !important; - } - - dl.superindex > dd { - word-spacing: .6em; - } -} - -@media aural, braille, embossed { - div.indexgroup { display: none; } /* Too noisy, don't you think? */ - dl.superindex > dt:before { content: "Group "; } - dl.superindex > dt:after { content: " contains:"; } - .backlinktop a:before { content: "Back to contents"; } - .backlinkbottom a:before { content: "Back to contents"; } -} - -@media aural { - dl.superindex > dt { pause-before: 600ms; } -} - -@media screen, tty, tv, projection { - .noscreen { display: none; } - - a:link { color: #7070ff; text-decoration: underline; } - a:visited { color: #e030ff; text-decoration: underline; } - a:active { color: #800000; text-decoration: underline; } - body.contentspage a { text-decoration: none; } - a.u { color: #fff !important; text-decoration: none; } - - body.pod { - margin: 0 5px; - color: #fff; - background-color: #000; - } - - body.pod h1, body.pod h2, body.pod h3, body.pod h4 { - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - font-weight: normal; - margin-top: 1.2em; - margin-bottom: .1em; - border-top: thin solid transparent; - /* margin-left: -5px; border-left: 2px #7070ff solid; padding-left: 3px; */ - } - - body.pod h1 { border-top-color: #0a0; } - body.pod h2 { border-top-color: #080; } - body.pod h3 { border-top-color: #040; } - body.pod h4 { border-top-color: #010; } - - p.backlinktop + h1 { border-top: none; margin-top: 0em; } - p.backlinktop + h2 { border-top: none; margin-top: 0em; } - p.backlinktop + h3 { border-top: none; margin-top: 0em; } - p.backlinktop + h4 { border-top: none; margin-top: 0em; } - - body.pod dt { - font-size: 105%; /* just a wee bit more than normal */ - } - - .indexgroup { font-size: 80%; } - - .backlinktop, .backlinkbottom { - margin-left: -5px; - margin-right: -5px; - background-color: #040; - border-top: thin solid #050; - border-bottom: thin solid #050; - } - - .backlinktop a, .backlinkbottom a { - text-decoration: none; - color: #080; - background-color: #000; - border: thin solid #0d0; - } - .backlinkbottom { margin-bottom: 0; padding-bottom: 0; } - .backlinktop { margin-top: 0; padding-top: 0; } - - body.contentspage { - color: #fff; - background-color: #000; - } - - body.contentspage h1 { - color: #0d0; - margin-left: 1em; - margin-right: 1em; - text-indent: -.9em; - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - font-weight: normal; - border-top: thin solid #fff; - border-bottom: thin solid #fff; - text-align: center; - } - - dl.superindex > dt { - font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; - font-weight: normal; - font-size: 90%; - margin-top: .45em; - /* margin-bottom: -.15em; */ - } - dl.superindex > dd { - word-spacing: .6em; /* most important rule here! */ - } - dl.superindex > a:link { - text-decoration: none; - color: #fff; - } - - .contentsfooty { - border-top: thin solid #999; - font-size: 90%; - } - -} - -/* The End */ - -EOCSS - -#========================================================================== - -$JAVASCRIPT = <<'EOJAVASCRIPT'; - -// From http://www.alistapart.com/articles/alternate/ - -function setActiveStyleSheet(title) { - var i, a, main; - for(i=0 ; (a = document.getElementsByTagName("link")[i]) ; i++) { - if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { - a.disabled = true; - if(a.getAttribute("title") == title) a.disabled = false; - } - } -} - -function getActiveStyleSheet() { - var i, a; - for(i=0 ; (a = document.getElementsByTagName("link")[i]) ; i++) { - if( a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("title") - && !a.disabled - ) return a.getAttribute("title"); - } - return null; -} - -function getPreferredStyleSheet() { - var i, a; - for(i=0 ; (a = document.getElementsByTagName("link")[i]) ; i++) { - if( a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("rel").indexOf("alt") == -1 - && a.getAttribute("title") - ) return a.getAttribute("title"); - } - return null; -} - -function createCookie(name,value,days) { - if (days) { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - var expires = "; expires="+date.toGMTString(); - } - else expires = ""; - document.cookie = name+"="+value+expires+"; path=/"; -} - -function readCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for(var i=0 ; i < ca.length ; i++) { - var c = ca[i]; - while (c.charAt(0)==' ') c = c.substring(1,c.length); - if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); - } - return null; -} - -window.onload = function(e) { - var cookie = readCookie("style"); - var title = cookie ? cookie : getPreferredStyleSheet(); - setActiveStyleSheet(title); -} - -window.onunload = function(e) { - var title = getActiveStyleSheet(); - createCookie("style", title, 365); -} - -var cookie = readCookie("style"); -var title = cookie ? cookie : getPreferredStyleSheet(); -setActiveStyleSheet(title); - -// The End - -EOJAVASCRIPT - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1; -__END__ - - -=head1 NAME - -Pod::Simple::HTMLBatch - convert several Pod files to several HTML files - -=head1 SYNOPSIS - - perl -MPod::Simple::HTMLBatch -e 'Pod::Simple::HTMLBatch::go' in out - - -=head1 DESCRIPTION - -This module is used for running batch-conversions of a lot of HTML -documents - -This class is NOT a subclass of Pod::Simple::HTML -(nor of bad old Pod::Html) -- although it uses -Pod::Simple::HTML for doing the conversion of each document. - -The normal use of this class is like so: - - use Pod::Simple::HTMLBatch; - my $batchconv = Pod::Simple::HTMLBatch->new; - $batchconv->some_option( some_value ); - $batchconv->some_other_option( some_other_value ); - $batchconv->batch_convert( \@search_dirs, $output_dir ); - -=head2 FROM THE COMMAND LINE - -Note that this class also provides -(but does not export) the function Pod::Simple::HTMLBatch::go. -This is basically just a shortcut for C<< -Pod::Simple::HTMLBatch->batch_convert(@ARGV) >>. -It's meant to be handy for calling from the command line. - -However, the shortcut requires that you specify exactly two command-line -arguments, C<indirs> and C<outdir>. - -Example: - - % mkdir out_html - % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go @INC out_html - (to convert the pod from Perl's @INC - files under the directory ../htmlversion) - -(Note that the command line there contains a literal atsign-I-N-C. This -is handled as a special case by batch_convert, in order to save you having -to enter the odd-looking "" as the first command-line parameter when you -mean "just use whatever's in @INC".) - -Example: - - % mkdir ../seekrut - % chmod og-rx ../seekrut - % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go . ../htmlversion - (to convert the pod under the current dir into HTML - files under the directory ../htmlversion) - -Example: - - % perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go happydocs . - (to convert all pod from happydocs into the current directory) - - - -=head1 MAIN METHODS - -=over - -=item $batchconv = Pod::Simple::HTMLBatch->new; - -This TODO - - -=item $batchconv->batch_convert( I<indirs>, I<outdir> ); - -this TODO - -=item $batchconv->batch_convert( undef , ...); - -=item $batchconv->batch_convert( q{@INC}, ...); - -These two values for I<indirs> specify that the normal Perl @INC - -=item $batchconv->batch_convert( \@dirs , ...); - -This specifies that the input directories are the items in -the arrayref C<\@dirs>. - -=item $batchconv->batch_convert( "somedir" , ...); - -This specifies that the director "somedir" is the input. -(This can be an absolute or relative path, it doesn't matter.) - -A common value you might want would be just "." for the current -directory: - - $batchconv->batch_convert( "." , ...); - - -=item $batchconv->batch_convert( 'somedir:someother:also' , ...); - -This specifies that you want the dirs "somedir", "somother", and "also" -scanned, just as if you'd passed the arrayref -C<[qw( somedir someother also)]>. Note that a ":"-separator is normal -under Unix, but Under MSWin, you'll need C<'somedir;someother;also'> -instead, since the pathsep on MSWin is ";" instead of ":". (And -I<that> is because ":" often comes up in paths, like -C<"c:/perl/lib">.) - -(Exactly what separator character should be used, is gotten from -C<$Config::Config{'path_sep'}>, via the L<Config> module.) - -=item $batchconv->batch_convert( ... , undef ); - -This specifies that you want the HTML output to go into the current -directory. - -(Note that a missing or undefined value means a different thing in -the first slot than in the second. That's so that C<batch_convert()> -with no arguments (or undef arguments) means "go from @INC, into -the current directory.) - -=item $batchconv->batch_convert( ... , 'somedir' ); - -This specifies that you want the HTML output to go into the -directory 'somedir'. -(This can be an absolute or relative path, it doesn't matter.) - -=back - - -Note that you can also call C<batch_convert> as a class method, -like so: - - Pod::Simple::HTMLBatch->batch_convert( ... ); - -That is just short for this: - - Pod::Simple::HTMLBatch-> new-> batch_convert(...); - -That is, it runs a conversion with default options, for -whatever inputdirs and output dir you specify. - - -=head2 ACCESSOR METHODS - -The following are all accessor methods -- that is, they don't do anything -on their own, but just alter the contents of the conversion object, -which comprises the options for this particular batch conversion. - -We show the "put" form of the accessors below (i.e., the syntax you use -for setting the accessor to a specific value). But you can also -call each method with no parameters to get its current value. For -example, C<< $self->contents_file() >> returns the current value of -the contents_file attribute. - -=over - - -=item $batchconv->verbose( I<nonnegative_integer> ); - -This controls how verbose to be during batch conversion, as far as -notes to STDOUT (or whatever is C<select>'d) about how the conversion -is going. If 0, no progress information is printed. -If 1 (the default value), some progress information is printed. -Higher values print more information. - - -=item $batchconv->index( I<true-or-false> ); - -This controls whether or not each HTML page is liable to have a little -table of contents at the top (which we call an "index" for historical -reasons). This is true by default. - - -=item $batchconv->contents_file( I<filename> ); - -If set, should be the name of a file (in the output directory) -to write the HTML index to. The default value is "index.html". -If you set this to a false value, no contents file will be written. - -=item $batchconv->contents_page_start( I<HTML_string> ); - -This specifies what string should be put at the beginning of -the contents page. -The default is a string more or less like this: - - <html> - <head><title>Perl Documentation</title></head> - <body class='contentspage'> - <h1>Perl Documentation</h1> - -=item $batchconv->contents_page_end( I<HTML_string> ); - -This specifies what string should be put at the end of the contents page. -The default is a string more or less like this: - - <p class='contentsfooty'>Generated by - Pod::Simple::HTMLBatch v3.01 under Perl v5.008 - <br >At Fri May 14 22:26:42 2004 GMT, - which is Fri May 14 14:26:42 2004 local time.</p> - - - -=item $batchconv->add_css( $url ); - -TODO - -=item $batchconv->add_javascript( $url ); - -TODO - -=item $batchconv->css_flurry( I<true-or-false> ); - -If true (the default value), we autogenerate some CSS files in the -output directory, and set our HTML files to use those. -TODO: continue - -=item $batchconv->javascript_flurry( I<true-or-false> ); - -If true (the default value), we autogenerate a JavaScript in the -output directory, and set our HTML files to use it. Currently, -the JavaScript is used only to get the browser to remember what -stylesheet it prefers. -TODO: continue - -=item $batchconv->no_contents_links( I<true-or-false> ); - -TODO - -=item $batchconv->html_render_class( I<classname> ); - -This sets what class is used for rendering the files. -The default is "Pod::Simple::Search". If you set it to something else, -it should probably be a subclass of Pod::Simple::Search, and you should -C<require> or C<use> that class so that's it's loaded before -Pod::Simple::HTMLBatch tries loading it. - -=back - - - - -=head1 NOTES ON CUSTOMIZATION - -TODO - - call add_css($someurl) to add stylesheet as alternate - call add_css($someurl,1) to add as primary stylesheet - - call add_javascript - - subclass Pod::Simple::HTML and set $batchconv->html_render_class to - that classname - and maybe override - $page->batch_mode_page_object_init($self, $module, $infile, $outfile, $depth) - or maybe override - $batchconv->batch_mode_page_object_init($page, $module, $infile, $outfile, $depth) - - - -=head1 ASK ME! - -If you want to do some kind of big pod-to-HTML version with some -particular kind of option that you don't see how to achieve using this -module, email me (C<sburke@cpan.org>) and I'll probably have a good idea -how to do it. For reasons of concision and energetic laziness, some -methods and options in this module (and the dozen modules it depends on) -are undocumented; but one of those undocumented bits might be just what -you're looking for. - - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::HTMLBatch>, L<perlpod>, L<perlpodspec> - - - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2004 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - - - diff --git a/web/bin/lib/Pod/Simple/HTMLLegacy.pm b/web/bin/lib/Pod/Simple/HTMLLegacy.pm deleted file mode 100644 index f78de90..0000000 --- a/web/bin/lib/Pod/Simple/HTMLLegacy.pm +++ /dev/null @@ -1,104 +0,0 @@ - -require 5; -package Pod::Simple::HTMLLegacy; -use strict; - -use vars qw($VERSION); -use Getopt::Long; - -$VERSION = "5.01"; - -#-------------------------------------------------------------------------- -# -# This class is meant to thinly emulate bad old Pod::Html -# -# TODO: some basic docs - -sub pod2html { - my @args = (@_); - - my( $verbose, $infile, $outfile, $title ); - my $index = 1; - - { - my($help); - - my($netscape); # dummy - local @ARGV = @args; - GetOptions( - "help" => \$help, - "verbose!" => \$verbose, - "infile=s" => \$infile, - "outfile=s" => \$outfile, - "title=s" => \$title, - "index!" => \$index, - - "netscape!" => \$netscape, - ) or return bad_opts(@args); - bad_opts(@args) if @ARGV; # it should be all switches! - return help_message() if $help; - } - - for($infile, $outfile) { $_ = undef unless defined and length } - - if($verbose) { - warn sprintf "%s version %s\n", __PACKAGE__, $VERSION; - warn "OK, processed args [@args] ...\n"; - warn sprintf - " Verbose: %s\n Index: %s\n Infile: %s\n Outfile: %s\n Title: %s\n", - map defined($_) ? $_ : "(nil)", - $verbose, $index, $infile, $outfile, $title, - ; - *Pod::Simple::HTML::DEBUG = sub(){1}; - } - require Pod::Simple::HTML; - Pod::Simple::HTML->VERSION(3); - - die "No such input file as $infile\n" - if defined $infile and ! -e $infile; - - - my $pod = Pod::Simple::HTML->new; - $pod->force_title($title) if defined $title; - $pod->index($index); - return $pod->parse_from_file($infile, $outfile); -} - -#-------------------------------------------------------------------------- - -sub bad_opts { die _help_message(); } -sub help_message { print STDOUT _help_message() } - -#-------------------------------------------------------------------------- - -sub _help_message { - - join '', - -"[", __PACKAGE__, " version ", $VERSION, qq~] -Usage: pod2html --help --infile=<name> --outfile=<name> - --verbose --index --noindex - -Options: - --help - prints this message. - --[no]index - generate an index at the top of the resulting html - (default behavior). - --infile - filename for the pod to convert (input taken from stdin - by default). - --outfile - filename for the resulting html file (output sent to - stdout by default). - --title - title that will appear in resulting html file. - --[no]verbose - self-explanatory (off by default). - -Note that pod2html is DEPRECATED, and this version implements only - some of the options known to older versions. -For more information, see 'perldoc pod2html'. -~; - -} - -1; -__END__ - -OVER the underpass! UNDER the overpass! Around the FUTURE and BEYOND REPAIR!! - diff --git a/web/bin/lib/Pod/Simple/LinkSection.pm b/web/bin/lib/Pod/Simple/LinkSection.pm deleted file mode 100644 index 14c3ba8..0000000 --- a/web/bin/lib/Pod/Simple/LinkSection.pm +++ /dev/null @@ -1,145 +0,0 @@ - -require 5; -package Pod::Simple::LinkSection; - # Based somewhat dimly on Array::Autojoin - -use strict; -use Pod::Simple::BlackBox; - -use overload( # So it'll stringify nice - '""' => \&Pod::Simple::BlackBox::stringify_lol, - 'bool' => \&Pod::Simple::BlackBox::stringify_lol, - # '.=' => \&tack_on, # grudgingly support - - 'fallback' => 1, # turn on cleverness -); - -sub tack_on { - $_[0] = ['', {}, "$_[0]" ]; - return $_[0][2] .= $_[1]; -} - -sub as_string { - goto &Pod::Simple::BlackBox::stringify_lol; -} -sub stringify { - goto &Pod::Simple::BlackBox::stringify_lol; -} - -sub new { - my $class = shift; - $class = ref($class) || $class; - my $new; - if(@_ == 1) { - if (!ref($_[0] || '')) { # most common case: one bare string - return bless ['', {}, $_[0] ], $class; - } elsif( ref($_[0] || '') eq 'ARRAY') { - $new = [ @{ $_[0] } ]; - } else { - Carp::croak( "$class new() doesn't know to clone $new" ); - } - } else { # misc stuff - $new = [ '', {}, @_ ]; - } - - # By now it's a treelet: [ 'foo', {}, ... ] - foreach my $x (@$new) { - if(ref($x || '') eq 'ARRAY') { - $x = $class->new($x); # recurse - } elsif(ref($x || '') eq 'HASH') { - $x = { %$x }; - } - # otherwise leave it. - } - - return bless $new, $class; -} - -# Not much in this class is likely to be link-section specific -- -# but it just so happens that link-sections are about the only treelets -# that are exposed to the user. - -1; - -__END__ - -# TODO: let it be an option whether a given subclass even wants little treelets? - - -__END__ - -=head1 NAME - -Pod::Simple::LinkSection -- represent "section" attributes of L codes - -=head1 SYNOPSIS - - # a long story - -=head1 DESCRIPTION - -This class is not of interest to general users. - -Pod::Simple uses this class for representing the value of the -"section" attribute of "L" start-element events. Most applications -can just use the normal stringification of objects of this class; -they stringify to just the text content of the section, -such as "foo" for -C<< LZ<><Stuff/foo> >>, and "bar" for -C<< LZ<><Stuff/bIZ<><ar>> >>. - -However, anyone particularly interested in getting the full value of -the treelet, can just traverse the content of the treeleet -@$treelet_object. To wit: - - - % perl -MData::Dumper -e - "use base qw(Pod::Simple::Methody); - sub start_L { print Dumper($_[1]{'section'} ) } - __PACKAGE__->new->parse_string_document('=head1 L<Foo/bI<ar>baz>>') - " -Output: - $VAR1 = bless( [ - '', - {}, - 'b', - bless( [ - 'I', - {}, - 'ar' - ], 'Pod::Simple::LinkSection' ), - 'baz' - ], 'Pod::Simple::LinkSection' ); - -But stringify it and you get just the text content: - - % perl -MData::Dumper -e - "use base qw(Pod::Simple::Methody); - sub start_L { print Dumper( '' . $_[1]{'section'} ) } - __PACKAGE__->new->parse_string_document('=head1 L<Foo/bI<ar>baz>>') - " -Output: - $VAR1 = 'barbaz'; - - -=head1 SEE ALSO - -L<Pod::Simple> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/Methody.pm b/web/bin/lib/Pod/Simple/Methody.pm deleted file mode 100644 index 2ad607e..0000000 --- a/web/bin/lib/Pod/Simple/Methody.pm +++ /dev/null @@ -1,127 +0,0 @@ - -require 5; -package Pod::Simple::Methody; -use strict; -use Pod::Simple (); -use vars qw(@ISA $VERSION); -$VERSION = '2.02'; -@ISA = ('Pod::Simple'); - -# Yes, we could use named variables, but I want this to be impose -# as little an additional performance hit as possible. - -sub _handle_element_start { - $_[1] =~ tr/-:./__/; - ( $_[0]->can( 'start_' . $_[1] ) - || return - )->( - $_[0], $_[2] - ); -} - -sub _handle_text { - ( $_[0]->can( 'handle_text' ) - || return - )->( - @_ - ); -} - -sub _handle_element_end { - $_[1] =~ tr/-:./__/; - ( $_[0]->can( 'end_' . $_[1] ) - || return - )->( - $_[0] - ); -} - -1; - - -__END__ - -=head1 NAME - -Pod::Simple::Methody -- turn Pod::Simple events into method calls - -=head1 SYNOPSIS - - require 5; - use strict; - package SomePodFormatter; - use base qw(Pod::Simple::Methody); - - sub handle_text { - my($self, $text) = @_; - ... - } - - sub start_head1 { - my($self, $attrs) = @_; - ... - } - sub end_head1 { - my($self) = @_; - ... - } - -...and start_/end_ methods for whatever other events you want to catch. - -=head1 DESCRIPTION - -This class is of -interest to people writing Pod formatters based on Pod::Simple. - -This class (which is very small -- read the source) overrides -Pod::Simple's _handle_element_start, _handle_text, and -_handle_element_end methods so that parser events are turned into method -calls. (Otherwise, this is a subclass of L<Pod::Simple> and inherits all -its methods.) - -You can use this class as the base class for a Pod formatter/processor. - -=head1 METHOD CALLING - -When Pod::Simple sees a "=head1 Hi there", for example, it basically does -this: - - $parser->_handle_element_start( "head1", \%attributes ); - $parser->_handle_text( "Hi there" ); - $parser->_handle_element_end( "head1" ); - -But if you subclass Pod::Simple::Methody, it will instead do this -when it sees a "=head1 Hi there": - - $parser->start_head1( \%attributes ) if $parser->can('start_head1'); - $parser->handle_text( "Hi there" ) if $parser->can('handle_text'); - $parser->end_head1() if $parser->can('end_head1'); - -If Pod::Simple sends an event where the element name has a dash, -period, or colon, the corresponding method name will have a underscore -in its place. For example, "foo.bar:baz" becomes start_foo_bar_baz -and end_foo_bar_baz. - -See the source for Pod::Simple::Text for an example of using this class. - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::Subclassing> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/Progress.pm b/web/bin/lib/Pod/Simple/Progress.pm deleted file mode 100644 index bc42a95..0000000 --- a/web/bin/lib/Pod/Simple/Progress.pm +++ /dev/null @@ -1,93 +0,0 @@ - -require 5; -package Pod::Simple::Progress; -$VERSION = "1.01"; -use strict; - -# Objects of this class are used for noting progress of an -# operation every so often. Messages delivered more often than that -# are suppressed. -# -# There's actually nothing in here that's specific to Pod processing; -# but it's ad-hoc enough that I'm not willing to give it a name that -# implies that it's generally useful, like "IO::Progress" or something. -# -# -- sburke -# -#-------------------------------------------------------------------------- - -sub new { - my($class,$delay) = @_; - my $self = bless {'quiet_until' => 1}, ref($class) || $class; - $self->to(*STDOUT{IO}); - $self->delay(defined($delay) ? $delay : 5); - return $self; -} - -sub copy { - my $orig = shift; - bless {%$orig, 'quiet_until' => 1}, ref($orig); -} -#-------------------------------------------------------------------------- - -sub reach { - my($self, $point, $note) = @_; - if( (my $now = time) >= $self->{'quiet_until'}) { - my $goal; - my $to = $self->{'to'}; - print $to join('', - ($self->{'quiet_until'} == 1) ? () : '... ', - (defined $point) ? ( - '#', - ($goal = $self->{'goal'}) ? ( - ' ' x (length($goal) - length($point)), - $point, '/', $goal, - ) : $point, - $note ? ': ' : (), - ) : (), - $note || '', - "\n" - ); - $self->{'quiet_until'} = $now + $self->{'delay'}; - } - return $self; -} - -#-------------------------------------------------------------------------- - -sub done { - my($self, $note) = @_; - $self->{'quiet_until'} = 1; - return $self->reach( undef, $note ); -} - -#-------------------------------------------------------------------------- -# Simple accessors: - -sub delay { - return $_[0]{'delay'} if @_ == 1; $_[0]{'delay'} = $_[1]; return $_[0] } -sub goal { - return $_[0]{'goal' } if @_ == 1; $_[0]{'goal' } = $_[1]; return $_[0] } -sub to { - return $_[0]{'to' } if @_ == 1; $_[0]{'to' } = $_[1]; return $_[0] } - -#-------------------------------------------------------------------------- - -unless(caller) { # Simple self-test: - my $p = __PACKAGE__->new->goal(5); - $p->reach(1, "Primus!"); - sleep 1; - $p->reach(2, "Secundus!"); - sleep 3; - $p->reach(3, "Tertius!"); - sleep 5; - $p->reach(4); - $p->reach(5, "Quintus!"); - sleep 1; - $p->done("All done"); -} - -#-------------------------------------------------------------------------- -1; -__END__ - diff --git a/web/bin/lib/Pod/Simple/PullParser.pm b/web/bin/lib/Pod/Simple/PullParser.pm deleted file mode 100644 index 15d9731..0000000 --- a/web/bin/lib/Pod/Simple/PullParser.pm +++ /dev/null @@ -1,795 +0,0 @@ - -require 5; -package Pod::Simple::PullParser; -$VERSION = '2.02'; -use Pod::Simple (); -BEGIN {@ISA = ('Pod::Simple')} - -use strict; -use Carp (); - -use Pod::Simple::PullParserStartToken; -use Pod::Simple::PullParserEndToken; -use Pod::Simple::PullParserTextToken; - -BEGIN { *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG } - -__PACKAGE__->_accessorize( - 'source_fh', # the filehandle we're reading from - 'source_scalar_ref', # the scalarref we're reading from - 'source_arrayref', # the arrayref we're reading from -); - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# -# And here is how we implement a pull-parser on top of a push-parser... - -sub filter { - my($self, $source) = @_; - $self = $self->new unless ref $self; - - $source = *STDIN{IO} unless defined $source; - $self->set_source($source); - $self->output_fh(*STDOUT{IO}); - - $self->run; # define run() in a subclass if you want to use filter()! - return $self; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub parse_string_document { - my $this = shift; - $this->set_source(\ $_[0]); - $this->run; -} - -sub parse_file { - my($this, $filename) = @_; - $this->set_source($filename); - $this->run; -} - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# In case anyone tries to use them: - -sub run { - use Carp (); - if( __PACKAGE__ eq ref($_[0]) || $_[0]) { # I'm not being subclassed! - Carp::croak "You can call run() only on subclasses of " - . __PACKAGE__; - } else { - Carp::croak join '', - "You can't call run() because ", - ref($_[0]) || $_[0], " didn't define a run() method"; - } -} - -sub parse_lines { - use Carp (); - Carp::croak "Use set_source with ", __PACKAGE__, - " and subclasses, not parse_lines"; -} - -sub parse_line { - use Carp (); - Carp::croak "Use set_source with ", __PACKAGE__, - " and subclasses, not parse_line"; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub new { - my $class = shift; - my $self = $class->SUPER::new(@_); - die "Couldn't construct for $class" unless $self; - - $self->{'token_buffer'} ||= []; - $self->{'start_token_class'} ||= 'Pod::Simple::PullParserStartToken'; - $self->{'text_token_class'} ||= 'Pod::Simple::PullParserTextToken'; - $self->{'end_token_class'} ||= 'Pod::Simple::PullParserEndToken'; - - DEBUG > 1 and print "New pullparser object: $self\n"; - - return $self; -} - -# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - -sub get_token { - my $self = shift; - DEBUG > 1 and print "\nget_token starting up on $self.\n"; - DEBUG > 2 and print " Items in token-buffer (", - scalar( @{ $self->{'token_buffer'} } ) , - ") :\n", map( - " " . $_->dump . "\n", @{ $self->{'token_buffer'} } - ), - @{ $self->{'token_buffer'} } ? '' : ' (no tokens)', - "\n" - ; - - until( @{ $self->{'token_buffer'} } ) { - DEBUG > 3 and print "I need to get something into my empty token buffer...\n"; - if($self->{'source_dead'}) { - DEBUG and print "$self 's source is dead.\n"; - push @{ $self->{'token_buffer'} }, undef; - } elsif(exists $self->{'source_fh'}) { - my @lines; - my $fh = $self->{'source_fh'} - || Carp::croak('You have to call set_source before you can call get_token'); - - DEBUG and print "$self 's source is filehandle $fh.\n"; - # Read those many lines at a time - for(my $i = Pod::Simple::MANY_LINES; $i--;) { - DEBUG > 3 and print " Fetching a line from source filehandle $fh...\n"; - local $/ = $Pod::Simple::NL; - push @lines, scalar(<$fh>); # readline - DEBUG > 3 and print " Line is: ", - defined($lines[-1]) ? $lines[-1] : "<undef>\n"; - unless( defined $lines[-1] ) { - DEBUG and print "That's it for that source fh! Killing.\n"; - delete $self->{'source_fh'}; # so it can be GC'd - last; - } - # but pass thru the undef, which will set source_dead to true - - # TODO: look to see if $lines[-1] is =encoding, and if so, - # do horribly magic things - - } - - if(DEBUG > 8) { - print "* I've gotten ", scalar(@lines), " lines:\n"; - foreach my $l (@lines) { - if(defined $l) { - print " line {$l}\n"; - } else { - print " line undef\n"; - } - } - print "* end of ", scalar(@lines), " lines\n"; - } - - $self->SUPER::parse_lines(@lines); - - } elsif(exists $self->{'source_arrayref'}) { - DEBUG and print "$self 's source is arrayref $self->{'source_arrayref'}, with ", - scalar(@{$self->{'source_arrayref'}}), " items left in it.\n"; - - DEBUG > 3 and print " Fetching ", Pod::Simple::MANY_LINES, " lines.\n"; - $self->SUPER::parse_lines( - splice @{ $self->{'source_arrayref'} }, - 0, - Pod::Simple::MANY_LINES - ); - unless( @{ $self->{'source_arrayref'} } ) { - DEBUG and print "That's it for that source arrayref! Killing.\n"; - $self->SUPER::parse_lines(undef); - delete $self->{'source_arrayref'}; # so it can be GC'd - } - # to make sure that an undef is always sent to signal end-of-stream - - } elsif(exists $self->{'source_scalar_ref'}) { - - DEBUG and print "$self 's source is scalarref $self->{'source_scalar_ref'}, with ", - length(${ $self->{'source_scalar_ref'} }) - - (pos(${ $self->{'source_scalar_ref'} }) || 0), - " characters left to parse.\n"; - - DEBUG > 3 and print " Fetching a line from source-string...\n"; - if( ${ $self->{'source_scalar_ref'} } =~ - m/([^\n\r]*)((?:\r?\n)?)/g - ) { - #print(">> $1\n"), - $self->SUPER::parse_lines($1) - if length($1) or length($2) - or pos( ${ $self->{'source_scalar_ref'} }) - != length( ${ $self->{'source_scalar_ref'} }); - # I.e., unless it's a zero-length "empty line" at the very - # end of "foo\nbar\n" (i.e., between the \n and the EOS). - } else { # that's the end. Byebye - $self->SUPER::parse_lines(undef); - delete $self->{'source_scalar_ref'}; - DEBUG and print "That's it for that source scalarref! Killing.\n"; - } - - - } else { - die "What source??"; - } - } - DEBUG and print "get_token about to return ", - Pod::Simple::pretty( @{$self->{'token_buffer'}} - ? $self->{'token_buffer'}[-1] : undef - ), "\n"; - return shift @{$self->{'token_buffer'}}; # that's an undef if empty -} - -use UNIVERSAL (); -sub unget_token { - my $self = shift; - DEBUG and print "Ungetting ", scalar(@_), " tokens: ", - @_ ? "@_\n" : "().\n"; - foreach my $t (@_) { - Carp::croak "Can't unget that, because it's not a token -- it's undef!" - unless defined $t; - Carp::croak "Can't unget $t, because it's not a token -- it's a string!" - unless ref $t; - Carp::croak "Can't unget $t, because it's not a token object!" - unless UNIVERSAL::can($t, 'type'); - } - - unshift @{$self->{'token_buffer'}}, @_; - DEBUG > 1 and print "Token buffer now has ", - scalar(@{$self->{'token_buffer'}}), " items in it.\n"; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -# $self->{'source_filename'} = $source; - -sub set_source { - my $self = shift @_; - return $self->{'source_fh'} unless @_; - my $handle; - if(!defined $_[0]) { - Carp::croak("Can't use empty-string as a source for set_source"); - } elsif(ref(\( $_[0] )) eq 'GLOB') { - $self->{'source_filename'} = '' . ($handle = $_[0]); - DEBUG and print "$self 's source is glob $_[0]\n"; - # and fall thru - } elsif(ref( $_[0] ) eq 'SCALAR') { - $self->{'source_scalar_ref'} = $_[0]; - DEBUG and print "$self 's source is scalar ref $_[0]\n"; - return; - } elsif(ref( $_[0] ) eq 'ARRAY') { - $self->{'source_arrayref'} = $_[0]; - DEBUG and print "$self 's source is array ref $_[0]\n"; - return; - } elsif(ref $_[0]) { - $self->{'source_filename'} = '' . ($handle = $_[0]); - DEBUG and print "$self 's source is fh-obj $_[0]\n"; - } elsif(!length $_[0]) { - Carp::croak("Can't use empty-string as a source for set_source"); - } else { # It's a filename! - DEBUG and print "$self 's source is filename $_[0]\n"; - { - local *PODSOURCE; - open(PODSOURCE, "<$_[0]") || Carp::croak "Can't open $_[0]: $!"; - $handle = *PODSOURCE{IO}; - } - $self->{'source_filename'} = $_[0]; - DEBUG and print " Its name is $_[0].\n"; - - # TODO: file-discipline things here! - } - - $self->{'source_fh'} = $handle; - DEBUG and print " Its handle is $handle\n"; - return 1; -} - -# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ - -sub get_title_short { shift->get_short_title(@_) } # alias - -sub get_short_title { - my $title = shift->get_title(@_); - $title = $1 if $title =~ m/^(\S{1,60})\s+--?\s+./s; - # turn "Foo::Bar -- bars for your foo" into "Foo::Bar" - return $title; -} - -sub get_title { shift->_get_titled_section( - 'NAME', max_token => 50, desperate => 1, @_) -} -sub get_version { shift->_get_titled_section( - 'VERSION', - max_token => 400, - accept_verbatim => 1, - max_content_length => 3_000, - @_, - ); -} -sub get_description { shift->_get_titled_section( - 'DESCRIPTION', - max_token => 400, - max_content_length => 3_000, - @_, -) } - -sub get_authors { shift->get_author(@_) } # a harmless alias - -sub get_author { - my $this = shift; - # Max_token is so high because these are - # typically at the end of the document: - $this->_get_titled_section('AUTHOR' , max_token => 10_000, @_) || - $this->_get_titled_section('AUTHORS', max_token => 10_000, @_); -} - -#-------------------------------------------------------------------------- - -sub _get_titled_section { - # Based on a get_title originally contributed by Graham Barr - my($self, $titlename, %options) = (@_); - - my $max_token = delete $options{'max_token'}; - my $desperate_for_title = delete $options{'desperate'}; - my $accept_verbatim = delete $options{'accept_verbatim'}; - my $max_content_length = delete $options{'max_content_length'}; - $max_content_length = 120 unless defined $max_content_length; - - Carp::croak( "Unknown " . ((1 == keys %options) ? "option: " : "options: ") - . join " ", map "[$_]", sort keys %options - ) - if keys %options; - - my %content_containers; - $content_containers{'Para'} = 1; - if($accept_verbatim) { - $content_containers{'Verbatim'} = 1; - $content_containers{'VerbatimFormatted'} = 1; - } - - my $token_count = 0; - my $title; - my @to_unget; - my $state = 0; - my $depth = 0; - - Carp::croak "What kind of titlename is \"$titlename\"?!" unless - defined $titlename and $titlename =~ m/^[A-Z ]{1,60}$/s; #sanity - my $titlename_re = quotemeta($titlename); - - my $head1_text_content; - my $para_text_content; - - while( - ++$token_count <= ($max_token || 1_000_000) - and defined(my $token = $self->get_token) - ) { - push @to_unget, $token; - - if ($state == 0) { # seeking =head1 - if( $token->is_start and $token->tagname eq 'head1' ) { - DEBUG and print " Found head1. Seeking content...\n"; - ++$state; - $head1_text_content = ''; - } - } - - elsif($state == 1) { # accumulating text until end of head1 - if( $token->is_text ) { - DEBUG and print " Adding \"", $token->text, "\" to head1-content.\n"; - $head1_text_content .= $token->text; - } elsif( $token->is_end and $token->tagname eq 'head1' ) { - DEBUG and print " Found end of head1. Considering content...\n"; - if($head1_text_content eq $titlename - or $head1_text_content =~ m/\($titlename_re\)/s - # We accept "=head1 Nomen Modularis (NAME)" for sake of i18n - ) { - DEBUG and print " Yup, it was $titlename. Seeking next para-content...\n"; - ++$state; - } elsif( - $desperate_for_title - # if we're so desperate we'll take the first - # =head1's content as a title - and $head1_text_content =~ m/\S/ - and $head1_text_content !~ m/^[ A-Z]+$/s - and $head1_text_content !~ - m/\((?: - NAME | TITLE | VERSION | AUTHORS? | DESCRIPTION | SYNOPSIS - | COPYRIGHT | LICENSE | NOTES? | FUNCTIONS? | METHODS? - | CAVEATS? | BUGS? | SEE\ ALSO | SWITCHES | ENVIRONMENT - )\)/sx - # avoid accepting things like =head1 Thingy Thongy (DESCRIPTION) - and ($max_content_length - ? (length($head1_text_content) <= $max_content_length) # sanity - : 1) - ) { - DEBUG and print " It looks titular: \"$head1_text_content\".\n", - "\n Using that.\n"; - $title = $head1_text_content; - last; - } else { - --$state; - DEBUG and print " Didn't look titular ($head1_text_content).\n", - "\n Dropping back to seeking-head1-content mode...\n"; - } - } - } - - elsif($state == 2) { - # seeking start of para (which must immediately follow) - if($token->is_start and $content_containers{ $token->tagname }) { - DEBUG and print " Found start of Para. Accumulating content...\n"; - $para_text_content = ''; - ++$state; - } else { - DEBUG and print - " Didn't see an immediately subsequent start-Para. Reseeking H1\n"; - $state = 0; - } - } - - elsif($state == 3) { - # accumulating text until end of Para - if( $token->is_text ) { - DEBUG and print " Adding \"", $token->text, "\" to para-content.\n"; - $para_text_content .= $token->text; - # and keep looking - - } elsif( $token->is_end and $content_containers{ $token->tagname } ) { - DEBUG and print " Found end of Para. Considering content: ", - $para_text_content, "\n"; - - if( $para_text_content =~ m/\S/ - and ($max_content_length - ? (length($para_text_content) <= $max_content_length) - : 1) - ) { - # Some minimal sanity constraints, I think. - DEBUG and print " It looks contentworthy, I guess. Using it.\n"; - $title = $para_text_content; - last; - } else { - DEBUG and print " Doesn't look at all contentworthy!\n Giving up.\n"; - undef $title; - last; - } - } - } - - else { - die "IMPOSSIBLE STATE $state!\n"; # should never happen - } - - } - - # Put it all back! - $self->unget_token(@to_unget); - - if(DEBUG) { - if(defined $title) { print " Returing title <$title>\n" } - else { print "Returning title <>\n" } - } - - return '' unless defined $title; - $title =~ s/^\s+//; - return $title; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -# -# Methods that actually do work at parse-time: - -sub _handle_element_start { - my $self = shift; # leaving ($element_name, $attr_hash_r) - DEBUG > 2 and print "++ $_[0] (", map("<$_> ", %{$_[1]}), ")\n"; - - push @{ $self->{'token_buffer'} }, - $self->{'start_token_class'}->new(@_); - return; -} - -sub _handle_text { - my $self = shift; # leaving ($text) - DEBUG > 2 and print "== $_[0]\n"; - push @{ $self->{'token_buffer'} }, - $self->{'text_token_class'}->new(@_); - return; -} - -sub _handle_element_end { - my $self = shift; # leaving ($element_name); - DEBUG > 2 and print "-- $_[0]\n"; - push @{ $self->{'token_buffer'} }, - $self->{'end_token_class'}->new(@_); - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -1; - - -__END__ - -=head1 NAME - -Pod::Simple::PullParser -- a pull-parser interface to parsing Pod - -=head1 SYNOPSIS - - my $parser = SomePodProcessor->new; - $parser->set_source( "whatever.pod" ); - $parser->run; - -Or: - - my $parser = SomePodProcessor->new; - $parser->set_source( $some_filehandle_object ); - $parser->run; - -Or: - - my $parser = SomePodProcessor->new; - $parser->set_source( \$document_source ); - $parser->run; - -Or: - - my $parser = SomePodProcessor->new; - $parser->set_source( \@document_lines ); - $parser->run; - -And elsewhere: - - require 5; - package SomePodProcessor; - use strict; - use base qw(Pod::Simple::PullParser); - - sub run { - my $self = shift; - Token: - while(my $token = $self->get_token) { - ...process each token... - } - } - -=head1 DESCRIPTION - -This class is for using Pod::Simple to build a Pod processor -- but -one that uses an interface based on a stream of token objects, -instead of based on events. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -A subclass of Pod::Simple::PullParser should define a C<run> method -that calls C<< $token = $parser->get_token >> to pull tokens. - -See the source for Pod::Simple::RTF for an example of a formatter -that uses Pod::Simple::PullParser. - -=head1 METHODS - -=over - -=item my $token = $parser->get_token - -This returns the next token object (which will be of a subclass of -L<Pod::Simple::PullParserToken>), or undef if the parser-stream has hit -the end of the document. - -=item $parser->unget_token( $token ) - -=item $parser->unget_token( $token1, $token2, ... ) - -This restores the token object(s) to the front of the parser stream. - -=back - -The source has to be set before you can parse anything. The lowest-level -way is to call C<set_source>: - -=over - -=item $parser->set_source( $filename ) - -=item $parser->set_source( $filehandle_object ) - -=item $parser->set_source( \$document_source ) - -=item $parser->set_source( \@document_lines ) - -=back - -Or you can call these methods, which Pod::Simple::PullParser has defined -to work just like Pod::Simple's same-named methods: - -=over - -=item $parser->parse_file(...) - -=item $parser->parse_string_document(...) - -=item $parser->filter(...) - -=item $parser->parse_from_file(...) - -=back - -For those to work, the Pod-processing subclass of -Pod::Simple::PullParser has to have defined a $parser->run method -- -so it is advised that all Pod::Simple::PullParser subclasses do so. -See the Synopsis above, or the source for Pod::Simple::RTF. - -Authors of formatter subclasses might find these methods useful to -call on a parser object that you haven't started pulling tokens -from yet: - -=over - -=item my $title_string = $parser->get_title - -This tries to get the title string out of $parser, by getting some tokens, -and scanning them for the title, and then ungetting them so that you can -process the token-stream from the beginning. - -For example, suppose you have a document that starts out: - - =head1 NAME - - Hoo::Boy::Wowza -- Stuff B<wow> yeah! - -$parser->get_title on that document will return "Hoo::Boy::Wowza -- -Stuff wow yeah!". - -In cases where get_title can't find the title, it will return empty-string -(""). - -=item my $title_string = $parser->get_short_title - -This is just like get_title, except that it returns just the modulename, if -the title seems to be of the form "SomeModuleName -- description". - -For example, suppose you have a document that starts out: - - =head1 NAME - - Hoo::Boy::Wowza -- Stuff B<wow> yeah! - -then $parser->get_short_title on that document will return -"Hoo::Boy::Wowza". - -But if the document starts out: - - =head1 NAME - - Hooboy, stuff B<wow> yeah! - -then $parser->get_short_title on that document will return "Hooboy, -stuff wow yeah!". - -If the title can't be found, then get_short_title returns empty-string -(""). - -=item $author_name = $parser->get_author - -This works like get_title except that it returns the contents of the -"=head1 AUTHOR\n\nParagraph...\n" section, assuming that that section -isn't terribly long. - -(This method tolerates "AUTHORS" instead of "AUTHOR" too.) - -=item $description_name = $parser->get_description - -This works like get_title except that it returns the contents of the -"=head1 PARAGRAPH\n\nParagraph...\n" section, assuming that that section -isn't terribly long. - -=item $version_block = $parser->get_version - -This works like get_title except that it returns the contents of -the "=head1 VERSION\n\n[BIG BLOCK]\n" block. Note that this does NOT -return the module's C<$VERSION>!! - - -=back - -=head1 NOTE - -You don't actually I<have> to define a C<run> method. If you're -writing a Pod-formatter class, you should define a C<run> just so -that users can call C<parse_file> etc, but you don't I<have> to. - -And if you're not writing a formatter class, but are instead just -writing a program that does something simple with a Pod::PullParser -object (and not an object of a subclass), then there's no reason to -bother subclassing to add a C<run> method. - -=head1 SEE ALSO - -L<Pod::Simple> - -L<Pod::Simple::PullParserToken> -- and its subclasses -L<Pod::Simple::PullParserStartToken>, -L<Pod::Simple::PullParserTextToken>, and -L<Pod::Simple::PullParserEndToken>. - -L<HTML::TokeParser>, which inspired this. - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - - - -JUNK: - -sub _old_get_title { # some witchery in here - my $self = $_[0]; - my $title; - my @to_unget; - - while(1) { - push @to_unget, $self->get_token; - unless(defined $to_unget[-1]) { # whoops, short doc! - pop @to_unget; - last; - } - - DEBUG and print "-Got token ", $to_unget[-1]->dump, "\n"; - - (DEBUG and print "Too much in the buffer.\n"), - last if @to_unget > 25; # sanity - - my $pattern = ''; - if( #$to_unget[-1]->type eq 'end' - #and $to_unget[-1]->tagname eq 'Para' - #and - ($pattern = join('', - map {; - ($_->type eq 'start') ? ("<" . $_->tagname .">") - : ($_->type eq 'end' ) ? ("</". $_->tagname .">") - : ($_->type eq 'text' ) ? ($_->text =~ m<^([A-Z]+)$>s ? $1 : 'X') - : "BLORP" - } @to_unget - )) =~ m{<head1>NAME</head1><Para>(X|</?[BCIFLS]>)+</Para>$}s - ) { - # Whee, it fits the pattern - DEBUG and print "Seems to match =head1 NAME pattern.\n"; - $title = ''; - foreach my $t (reverse @to_unget) { - last if $t->type eq 'start' and $t->tagname eq 'Para'; - $title = $t->text . $title if $t->type eq 'text'; - } - undef $title if $title =~ m<^\s*$>; # make sure it's contentful! - last; - - } elsif ($pattern =~ m{<head(\d)>(.+)</head\d>$} - and !( $1 eq '1' and $2 eq 'NAME' ) - ) { - # Well, it fits a fallback pattern - DEBUG and print "Seems to match NAMEless pattern.\n"; - $title = ''; - foreach my $t (reverse @to_unget) { - last if $t->type eq 'start' and $t->tagname =~ m/^head\d$/s; - $title = $t->text . $title if $t->type eq 'text'; - } - undef $title if $title =~ m<^\s*$>; # make sure it's contentful! - last; - - } else { - DEBUG and $pattern and print "Leading pattern: $pattern\n"; - } - } - - # Put it all back: - $self->unget_token(@to_unget); - - if(DEBUG) { - if(defined $title) { print " Returing title <$title>\n" } - else { print "Returning title <>\n" } - } - - return '' unless defined $title; - return $title; -} - diff --git a/web/bin/lib/Pod/Simple/PullParserEndToken.pm b/web/bin/lib/Pod/Simple/PullParserEndToken.pm deleted file mode 100644 index 7b219f8..0000000 --- a/web/bin/lib/Pod/Simple/PullParserEndToken.pm +++ /dev/null @@ -1,93 +0,0 @@ - -require 5; -package Pod::Simple::PullParserEndToken; -use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); -use strict; - -sub new { # Class->new(tagname); - my $class = shift; - return bless ['end', @_], ref($class) || $class; -} - -# Purely accessors: - -sub tagname { (@_ == 2) ? ($_[0][1] = $_[1]) : $_[0][1] } -sub tag { shift->tagname(@_) } - -# shortcut: -sub is_tagname { $_[0][1] eq $_[1] } -sub is_tag { shift->is_tagname(@_) } - -1; - - -__END__ - -=head1 NAME - -Pod::Simple::PullParserEndToken -- end-tokens from Pod::Simple::PullParser - -=head1 SYNOPSIS - -(See L<Pod::Simple::PullParser>) - -=head1 DESCRIPTION - -When you do $parser->get_token on a L<Pod::Simple::PullParser>, you might -get an object of this class. - -This is a subclass of L<Pod::Simple::PullParserToken> and inherits all its methods, -and adds these methods: - -=over - -=item $token->tagname - -This returns the tagname for this end-token object. -For example, parsing a "=head1 ..." line will give you -a start-token with the tagname of "head1", token(s) for its -content, and then an end-token with the tagname of "head1". - -=item $token->tagname(I<somestring>) - -This changes the tagname for this end-token object. -You probably won't need to do this. - -=item $token->tag(...) - -A shortcut for $token->tagname(...) - -=item $token->is_tag(I<somestring>) or $token->is_tagname(I<somestring>) - -These are shortcuts for C<< $token->tag() eq I<somestring> >> - -=back - -You're unlikely to ever need to construct an object of this class for -yourself, but if you want to, call -C<< -Pod::Simple::PullParserEndToken->new( I<tagname> ) ->> - -=head1 SEE ALSO - -L<Pod::Simple::PullParserToken>, L<Pod::Simple>, L<Pod::Simple::Subclassing> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/PullParserStartToken.pm b/web/bin/lib/Pod/Simple/PullParserStartToken.pm deleted file mode 100644 index 9ead50d..0000000 --- a/web/bin/lib/Pod/Simple/PullParserStartToken.pm +++ /dev/null @@ -1,130 +0,0 @@ - -require 5; -package Pod::Simple::PullParserStartToken; -use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); -use strict; - -sub new { # Class->new(tagname, optional_attrhash); - my $class = shift; - return bless ['start', @_], ref($class) || $class; -} - -# Purely accessors: - -sub tagname { (@_ == 2) ? ($_[0][1] = $_[1]) : $_[0][1] } -sub tag { shift->tagname(@_) } - -sub is_tagname { $_[0][1] eq $_[1] } -sub is_tag { shift->is_tagname(@_) } - - -sub attr_hash { $_[0][2] ||= {} } - -sub attr { - if(@_ == 2) { # Reading: $token->attr('attrname') - ${$_[0][2] || return undef}{ $_[1] }; - } elsif(@_ > 2) { # Writing: $token->attr('attrname', 'newval') - ${$_[0][2] ||= {}}{ $_[1] } = $_[2]; - } else { - require Carp; - Carp::croak( - 'usage: $object->attr("val") or $object->attr("key", "newval")'); - return undef; - } -} - -1; - - -__END__ - -=head1 NAME - -Pod::Simple::PullParserStartToken -- start-tokens from Pod::Simple::PullParser - -=head1 SYNOPSIS - -(See L<Pod::Simple::PullParser>) - -=head1 DESCRIPTION - -When you do $parser->get_token on a L<Pod::Simple::PullParser> object, you might -get an object of this class. - -This is a subclass of L<Pod::Simple::PullParserToken> and inherits all its methods, -and adds these methods: - -=over - -=item $token->tagname - -This returns the tagname for this start-token object. -For example, parsing a "=head1 ..." line will give you -a start-token with the tagname of "head1", token(s) for its -content, and then an end-token with the tagname of "head1". - -=item $token->tagname(I<somestring>) - -This changes the tagname for this start-token object. -You probably won't need -to do this. - -=item $token->tag(...) - -A shortcut for $token->tagname(...) - -=item $token->is_tag(I<somestring>) or $token->is_tagname(I<somestring>) - -These are shortcuts for C<< $token->tag() eq I<somestring> >> - -=item $token->attr(I<attrname>) - -This returns the value of the I<attrname> attribute for this start-token -object, or undef. - -For example, parsing a LZ<><Foo/"Bar"> link will produce a start-token -with a "to" attribute with the value "Foo", a "type" attribute with the -value "pod", and a "section" attribute with the value "Bar". - -=item $token->attr(I<attrname>, I<newvalue>) - -This sets the I<attrname> attribute for this start-token object to -I<newvalue>. You probably won't need to do this. - -=item $token->attr_hash - -This returns the hashref that is the attribute set for this start-token. -This is useful if (for example) you want to ask what all the attributes -are -- you can just do C<< keys %{$token->attr_hash} >> - -=back - - -You're unlikely to ever need to construct an object of this class for -yourself, but if you want to, call -C<< -Pod::Simple::PullParserStartToken->new( I<tagname>, I<attrhash> ) ->> - -=head1 SEE ALSO - -L<Pod::Simple::PullParserToken>, L<Pod::Simple>, L<Pod::Simple::Subclassing> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/PullParserTextToken.pm b/web/bin/lib/Pod/Simple/PullParserTextToken.pm deleted file mode 100644 index 2d1a1d7..0000000 --- a/web/bin/lib/Pod/Simple/PullParserTextToken.pm +++ /dev/null @@ -1,101 +0,0 @@ - -require 5; -package Pod::Simple::PullParserTextToken; -use Pod::Simple::PullParserToken (); -@ISA = ('Pod::Simple::PullParserToken'); -use strict; - -sub new { # Class->new(text); - my $class = shift; - return bless ['text', @_], ref($class) || $class; -} - -# Purely accessors: - -sub text { (@_ == 2) ? ($_[0][1] = $_[1]) : $_[0][1] } - -sub text_r { \ $_[0][1] } - -1; - -__END__ - -=head1 NAME - -Pod::Simple::PullParserTextToken -- text-tokens from Pod::Simple::PullParser - -=head1 SYNOPSIS - -(See L<Pod::Simple::PullParser>) - -=head1 DESCRIPTION - -When you do $parser->get_token on a L<Pod::Simple::PullParser>, you might -get an object of this class. - -This is a subclass of L<Pod::Simple::PullParserToken> and inherits all its methods, -and adds these methods: - -=over - -=item $token->text - -This returns the text that this token holds. For example, parsing -CZ<><foo> will return a C start-token, a text-token, and a C end-token. And -if you want to get the "foo" out of the text-token, call C<< $token->text >> - -=item $token->text(I<somestring>) - -This changes the string that this token holds. You probably won't need -to do this. - -=item $token->text_r() - -This returns a scalar reference to the string that this token holds. -This can be useful if you don't want to memory-copy the potentially -large text value (well, as large as a paragraph or a verbatim block) -as calling $token->text would do. - -Or, if you want to alter the value, you can even do things like this: - - for ( ${ $token->text_r } ) { # Aliases it with $_ !! - - s/ The / the /g; # just for example - - if( 'A' eq chr(65) ) { # (if in an ASCII world) - tr/\xA0/ /; - tr/\xAD//d; - } - - ...or however you want to alter the value... - } - -=back - -You're unlikely to ever need to construct an object of this class for -yourself, but if you want to, call -C<< -Pod::Simple::PullParserTextToken->new( I<text> ) ->> - -=head1 SEE ALSO - -L<Pod::Simple::PullParserToken>, L<Pod::Simple>, L<Pod::Simple::Subclassing> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/PullParserToken.pm b/web/bin/lib/Pod/Simple/PullParserToken.pm deleted file mode 100644 index 9ec3659..0000000 --- a/web/bin/lib/Pod/Simple/PullParserToken.pm +++ /dev/null @@ -1,138 +0,0 @@ - -require 5; -package Pod::Simple::PullParserToken; - # Base class for tokens gotten from Pod::Simple::PullParser's $parser->get_token -@ISA = (); -$VERSION = '2.02'; -use strict; - -sub new { # Class->new('type', stuff...); ## Overridden in derived classes anyway - my $class = shift; - return bless [@_], ref($class) || $class; -} - -sub type { $_[0][0] } # Can't change the type of an object -sub dump { Pod::Simple::pretty( [ @{ $_[0] } ] ) } - -sub is_start { $_[0][0] eq 'start' } -sub is_end { $_[0][0] eq 'end' } -sub is_text { $_[0][0] eq 'text' } - -1; -__END__ - -sub dump { '[' . _esc( @{ $_[0] } ) . ']' } - -# JUNK: - -sub _esc { - return '' unless @_; - my @out; - foreach my $in (@_) { - push @out, '"' . $in . '"'; - $out[-1] =~ s/([^- \:\:\.\,\'\>\<\"\/\=\?\+\|\[\]\{\}\_a-zA-Z0-9_\`\~\!\#\%\^\&\*\(\)])/ - sprintf( (ord($1) < 256) ? "\\x%02X" : "\\x{%X}", ord($1)) - /eg; - } - return join ', ', @out; -} - - -__END__ - -=head1 NAME - -Pod::Simple::PullParserToken -- tokens from Pod::Simple::PullParser - -=head1 SYNOPSIS - -Given a $parser that's an object of class Pod::Simple::PullParser -(or a subclass)... - - while(my $token = $parser->get_token) { - $DEBUG and print "Token: ", $token->dump, "\n"; - if($token->is_start) { - ...access $token->tagname, $token->attr, etc... - - } elsif($token->is_text) { - ...access $token->text, $token->text_r, etc... - - } elsif($token->is_end) { - ...access $token->tagname... - - } - } - -(Also see L<Pod::Simple::PullParser>) - -=head1 DESCRIPTION - -When you do $parser->get_token on a L<Pod::Simple::PullParser>, you should -get an object of a subclass of Pod::Simple::PullParserToken. - -Subclasses will add methods, and will also inherit these methods: - -=over - -=item $token->type - -This returns the type of the token. This will be either the string -"start", the string "text", or the string "end". - -Once you know what the type of an object is, you then know what -subclass it belongs to, and therefore what methods it supports. - -Yes, you could probably do the same thing with code like -$token->isa('Pod::Simple::PullParserEndToken'), but that's not so -pretty as using just $token->type, or even the following shortcuts: - -=item $token->is_start - -This is a shortcut for C<< $token->type() eq "start" >> - -=item $token->is_text - -This is a shortcut for C<< $token->type() eq "text" >> - -=item $token->is_end - -This is a shortcut for C<< $token->type() eq "end" >> - -=item $token->dump - -This returns a handy stringified value of this object. This -is useful for debugging, as in: - - while(my $token = $parser->get_token) { - $DEBUG and print "Token: ", $token->dump, "\n"; - ... - } - -=back - -=head1 SEE ALSO - -My subclasses: -L<Pod::Simple::PullParserStartToken>, -L<Pod::Simple::PullParserTextToken>, and -L<Pod::Simple::PullParserEndToken>. - -L<Pod::Simple::PullParser> and L<Pod::Simple> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/RTF.pm b/web/bin/lib/Pod/Simple/RTF.pm deleted file mode 100644 index de2a7b3..0000000 --- a/web/bin/lib/Pod/Simple/RTF.pm +++ /dev/null @@ -1,674 +0,0 @@ - -require 5; -package Pod::Simple::RTF; - -#sub DEBUG () {4}; -#sub Pod::Simple::DEBUG () {4}; -#sub Pod::Simple::PullParser::DEBUG () {4}; - -use strict; -use vars qw($VERSION @ISA %Escape $WRAP %Tagmap); -$VERSION = '2.02'; -use Pod::Simple::PullParser (); -BEGIN {@ISA = ('Pod::Simple::PullParser')} - -use Carp (); -BEGIN { *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG } - -$WRAP = 1 unless defined $WRAP; - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub _openclose { - return map {; - m/^([-A-Za-z]+)=(\w[^\=]*)$/s or die "what's <$_>?"; - ( $1, "{\\$2\n", "/$1", "}" ); - } @_; -} - -my @_to_accept; - -%Tagmap = ( - # 'foo=bar' means ('foo' => '{\bar'."\n", '/foo' => '}') - _openclose( - 'B=cs18\b', - 'I=cs16\i', - 'C=cs19\f1\lang1024\noproof', - 'F=cs17\i\lang1024\noproof', - - 'VerbatimI=cs26\i', - 'VerbatimB=cs27\b', - 'VerbatimBI=cs28\b\i', - - map {; m/^([-a-z]+)/s && push @_to_accept, $1; $_ } - qw[ - underline=ul smallcaps=scaps shadow=shad - superscript=super subscript=sub strikethrough=strike - outline=outl emboss=embo engrave=impr - dotted-underline=uld dash-underline=uldash - dot-dash-underline=uldashd dot-dot-dash-underline=uldashdd - double-underline=uldb thick-underline=ulth - word-underline=ulw wave-underline=ulwave - ] - # But no double-strikethrough, because MSWord can't agree with the - # RTF spec on whether it's supposed to be \strikedl or \striked1 (!!!) - ), - - # Bit of a hack here: - 'L=pod' => '{\cs22\i'."\n", - 'L=url' => '{\cs23\i'."\n", - 'L=man' => '{\cs24\i'."\n", - '/L' => '}', - - 'Data' => "\n", - '/Data' => "\n", - - 'Verbatim' => "\n{\\pard\\li#rtfindent##rtfkeep#\\plain\\s20\\sa180\\f1\\fs18\\lang1024\\noproof\n", - '/Verbatim' => "\n\\par}\n", - 'VerbatimFormatted' => "\n{\\pard\\li#rtfindent##rtfkeep#\\plain\\s20\\sa180\\f1\\fs18\\lang1024\\noproof\n", - '/VerbatimFormatted' => "\n\\par}\n", - 'Para' => "\n{\\pard\\li#rtfindent#\\sa180\n", - '/Para' => "\n\\par}\n", - 'head1' => "\n{\\pard\\li#rtfindent#\\s31\\keepn\\sb90\\sa180\\f2\\fs#head1_halfpoint_size#\\ul{\n", - '/head1' => "\n}\\par}\n", - 'head2' => "\n{\\pard\\li#rtfindent#\\s32\\keepn\\sb90\\sa180\\f2\\fs#head2_halfpoint_size#\\ul{\n", - '/head2' => "\n}\\par}\n", - 'head3' => "\n{\\pard\\li#rtfindent#\\s33\\keepn\\sb90\\sa180\\f2\\fs#head3_halfpoint_size#\\ul{\n", - '/head3' => "\n}\\par}\n", - 'head4' => "\n{\\pard\\li#rtfindent#\\s34\\keepn\\sb90\\sa180\\f2\\fs#head4_halfpoint_size#\\ul{\n", - '/head4' => "\n}\\par}\n", - # wordpad borks on \tc\tcl1, or I'd put that in =head1 and =head2 - - 'item-bullet' => "\n{\\pard\\li#rtfindent##rtfitemkeepn#\\sb60\\sa150\\fi-120\n", - '/item-bullet' => "\n\\par}\n", - 'item-number' => "\n{\\pard\\li#rtfindent##rtfitemkeepn#\\sb60\\sa150\\fi-120\n", - '/item-number' => "\n\\par}\n", - 'item-text' => "\n{\\pard\\li#rtfindent##rtfitemkeepn#\\sb60\\sa150\\fi-120\n", - '/item-text' => "\n\\par}\n", - - # we don't need any styles for over-* and /over-* -); - - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub new { - my $new = shift->SUPER::new(@_); - $new->nix_X_codes(1); - $new->nbsp_for_S(1); - $new->accept_targets( 'rtf', 'RTF' ); - - $new->{'Tagmap'} = {%Tagmap}; - - $new->accept_codes(@_to_accept); - $new->accept_codes('VerbatimFormatted'); - DEBUG > 2 and print "To accept: ", join(' ',@_to_accept), "\n"; - $new->doc_lang( - ( $ENV{'RTFDEFLANG'} || '') =~ m/^(\d{1,10})$/s ? $1 - : ($ENV{'RTFDEFLANG'} || '') =~ m/^0?x([a-fA-F0-9]{1,10})$/s ? hex($1) - # yes, tolerate hex! - : ($ENV{'RTFDEFLANG'} || '') =~ m/^([a-fA-F0-9]{4})$/s ? hex($1) - # yes, tolerate even more hex! - : '1033' - ); - - $new->head1_halfpoint_size(32); - $new->head2_halfpoint_size(28); - $new->head3_halfpoint_size(25); - $new->head4_halfpoint_size(22); - $new->codeblock_halfpoint_size(18); - $new->header_halfpoint_size(17); - $new->normal_halfpoint_size(25); - - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -__PACKAGE__->_accessorize( - 'doc_lang', - 'head1_halfpoint_size', - 'head2_halfpoint_size', - 'head3_halfpoint_size', - 'head4_halfpoint_size', - 'codeblock_halfpoint_size', - 'header_halfpoint_size', - 'normal_halfpoint_size', - 'no_proofing_exemptions', -); - - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub run { - my $self = $_[0]; - return $self->do_middle if $self->bare_output; - return - $self->do_beginning && $self->do_middle && $self->do_end; -} - - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub do_middle { # the main work - my $self = $_[0]; - my $fh = $self->{'output_fh'}; - - my($token, $type, $tagname, $scratch); - my @stack; - my @indent_stack; - $self->{'rtfindent'} = 0 unless defined $self->{'rtfindent'}; - - while($token = $self->get_token) { - - if( ($type = $token->type) eq 'text' ) { - if( $self->{'rtfverbatim'} ) { - DEBUG > 1 and print " $type " , $token->text, " in verbatim!\n"; - rtf_esc_codely($scratch = $token->text); - print $fh $scratch; - next; - } - - DEBUG > 1 and print " $type " , $token->text, "\n"; - - $scratch = $token->text; - $scratch =~ tr/\t\cb\cc/ /d; - - $self->{'no_proofing_exemptions'} or $scratch =~ - s/(?: - ^ - | - (?<=[\cm\cj\t "\[\<\(]) - ) # start on whitespace, sequence-start, or quote - ( # something looking like a Perl token: - (?: - [\$\@\:\<\*\\_]\S+ # either starting with a sigil, etc. - ) - | - # or starting alpha, but containing anything strange: - (?: - [a-zA-Z'\x80-\xFF]+[\$\@\:_<>\(\\\*]\S+ - ) - ) - /\cb$1\cc/xsg - ; - - rtf_esc($scratch); - $scratch =~ - s/( - [^\cm\cj\n]{65} # Snare 65 characters from a line - [^\cm\cj\n\x20]{0,50} # and finish any current word - ) - (\x20{1,10})(?![\cm\cj\n]) # capture some spaces not at line-end - /$1$2\n/gx # and put a NL before those spaces - if $WRAP; - # This may wrap at well past the 65th column, but not past the 120th. - - print $fh $scratch; - - } elsif( $type eq 'start' ) { - DEBUG > 1 and print " +$type ",$token->tagname, - " (", map("<$_> ", %{$token->attr_hash}), ")\n"; - - if( ($tagname = $token->tagname) eq 'Verbatim' - or $tagname eq 'VerbatimFormatted' - ) { - ++$self->{'rtfverbatim'}; - my $next = $self->get_token; - next unless defined $next; - my $line_count = 1; - if($next->type eq 'text') { - my $t = $next->text_r; - while( $$t =~ m/$/mg ) { - last if ++$line_count > 15; # no point in counting further - } - DEBUG > 3 and print " verbatim line count: $line_count\n"; - } - $self->unget_token($next); - $self->{'rtfkeep'} = ($line_count > 15) ? '' : '\keepn' ; - - } elsif( $tagname =~ m/^item-/s ) { - my @to_unget; - my $text_count_here = 0; - $self->{'rtfitemkeepn'} = ''; - # Some heuristics to stop item-*'s functioning as subheadings - # from getting split from the things they're subheadings for. - # - # It's not terribly pretty, but it really does make things pretty. - # - while(1) { - push @to_unget, $self->get_token; - pop(@to_unget), last unless defined $to_unget[-1]; - # Erroneously used to be "unshift" instead of pop! Adds instead - # of removes, and operates on the beginning instead of the end! - - if($to_unget[-1]->type eq 'text') { - if( ($text_count_here += length ${$to_unget[-1]->text_r}) > 150 ){ - DEBUG > 1 and print " item-* is too long to be keepn'd.\n"; - last; - } - } elsif (@to_unget > 1 and - $to_unget[-2]->type eq 'end' and - $to_unget[-2]->tagname =~ m/^item-/s - ) { - # Bail out here, after setting rtfitemkeepn yea or nay. - $self->{'rtfitemkeepn'} = '\keepn' if - $to_unget[-1]->type eq 'start' and - $to_unget[-1]->tagname eq 'Para'; - - DEBUG > 1 and printf " item-* before %s(%s) %s keepn'd.\n", - $to_unget[-1]->type, - $to_unget[-1]->can('tagname') ? $to_unget[-1]->tagname : '', - $self->{'rtfitemkeepn'} ? "gets" : "doesn't get"; - last; - } elsif (@to_unget > 40) { - DEBUG > 1 and print " item-* now has too many tokens (", - scalar(@to_unget), - (DEBUG > 4) ? (q<: >, map($_->dump, @to_unget)) : (), - ") to be keepn'd.\n"; - last; # give up - } - # else keep while'ing along - } - # Now put it aaaaall back... - $self->unget_token(@to_unget); - - } elsif( $tagname =~ m/^over-/s ) { - push @stack, $1; - push @indent_stack, - int($token->attr('indent') * 4 * $self->normal_halfpoint_size); - DEBUG and print "Indenting over $indent_stack[-1] twips.\n"; - $self->{'rtfindent'} += $indent_stack[-1]; - - } elsif ($tagname eq 'L') { - $tagname .= '=' . ($token->attr('type') || 'pod'); - - } elsif ($tagname eq 'Data') { - my $next = $self->get_token; - next unless defined $next; - unless( $next->type eq 'text' ) { - $self->unget_token($next); - next; - } - DEBUG and print " raw text ", $next->text, "\n"; - printf $fh "\n" . $next->text . "\n"; - next; - } - - defined($scratch = $self->{'Tagmap'}{$tagname}) or next; - $scratch =~ s/\#([^\#]+)\#/${$self}{$1}/g; # interpolate - print $fh $scratch; - - if ($tagname eq 'item-number') { - print $fh $token->attr('number'), ". \n"; - } elsif ($tagname eq 'item-bullet') { - print $fh "\\'95 \n"; - #for funky testing: print $fh '', rtf_esc("\x{4E4B}\x{9053}"); - } - - } elsif( $type eq 'end' ) { - DEBUG > 1 and print " -$type ",$token->tagname,"\n"; - if( ($tagname = $token->tagname) =~ m/^over-/s ) { - DEBUG and print "Indenting back $indent_stack[-1] twips.\n"; - $self->{'rtfindent'} -= pop @indent_stack; - pop @stack; - } elsif( $tagname eq 'Verbatim' or $tagname eq 'VerbatimFormatted') { - --$self->{'rtfverbatim'}; - } - defined($scratch = $self->{'Tagmap'}{"/$tagname"}) or next; - $scratch =~ s/\#([^\#]+)\#/${$self}{$1}/g; # interpolate - print $fh $scratch; - } - } - return 1; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -sub do_beginning { - my $self = $_[0]; - my $fh = $self->{'output_fh'}; - return print $fh join '', - $self->doc_init, - $self->font_table, - $self->stylesheet, - $self->color_table, - $self->doc_info, - $self->doc_start, - "\n" - ; -} - -sub do_end { - my $self = $_[0]; - my $fh = $self->{'output_fh'}; - return print $fh '}'; # that should do it -} - -########################################################################### - -sub stylesheet { - return sprintf <<'END', -{\stylesheet -{\snext0 Normal;} -{\*\cs10 \additive Default Paragraph Font;} -{\*\cs16 \additive \i \sbasedon10 pod-I;} -{\*\cs17 \additive \i\lang1024\noproof \sbasedon10 pod-F;} -{\*\cs18 \additive \b \sbasedon10 pod-B;} -{\*\cs19 \additive \f1\lang1024\noproof\sbasedon10 pod-C;} -{\s20\ql \li0\ri0\sa180\widctlpar\f1\fs%s\lang1024\noproof\sbasedon0 \snext0 pod-codeblock;} -{\*\cs21 \additive \lang1024\noproof \sbasedon10 pod-computerese;} -{\*\cs22 \additive \i\lang1024\noproof\sbasedon10 pod-L-pod;} -{\*\cs23 \additive \i\lang1024\noproof\sbasedon10 pod-L-url;} -{\*\cs24 \additive \i\lang1024\noproof\sbasedon10 pod-L-man;} - -{\*\cs25 \additive \f1\lang1024\noproof\sbasedon0 pod-codelbock-plain;} -{\*\cs26 \additive \f1\lang1024\noproof\sbasedon25 pod-codelbock-ital;} -{\*\cs27 \additive \f1\lang1024\noproof\sbasedon25 pod-codelbock-bold;} -{\*\cs28 \additive \f1\lang1024\noproof\sbasedon25 pod-codelbock-bold-ital;} - -{\s31\ql \keepn\sb90\sa180\f2\fs%s\ul\sbasedon0 \snext0 pod-head1;} -{\s32\ql \keepn\sb90\sa180\f2\fs%s\ul\sbasedon0 \snext0 pod-head2;} -{\s33\ql \keepn\sb90\sa180\f2\fs%s\ul\sbasedon0 \snext0 pod-head3;} -{\s34\ql \keepn\sb90\sa180\f2\fs%s\ul\sbasedon0 \snext0 pod-head4;} -} - -END - - $_[0]->codeblock_halfpoint_size(), - $_[0]->head1_halfpoint_size(), - $_[0]->head2_halfpoint_size(), - $_[0]->head3_halfpoint_size(), - $_[0]->head4_halfpoint_size(), - ; -} - -########################################################################### -# Override these as necessary for further customization - -sub font_table { - return <<'END'; # text font, code font, heading font -{\fonttbl -{\f0\froman Times New Roman;} -{\f1\fmodern Courier New;} -{\f2\fswiss Arial;} -} - -END -} - -sub doc_init { - return <<'END'; -{\rtf1\ansi\deff0 - -END -} - -sub color_table { - return <<'END'; -{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} -END -} - - -sub doc_info { - my $self = $_[0]; - - my $class = ref($self) || $self; - - my $tag = __PACKAGE__ . ' ' . $VERSION; - - unless($class eq __PACKAGE__) { - $tag = " ($tag)"; - $tag = " v" . $self->VERSION . $tag if defined $self->VERSION; - $tag = $class . $tag; - } - - return sprintf <<'END', -{\info{\doccomm -%s - using %s v%s - under Perl v%s at %s GMT} -{\author [see doc]}{\company [see doc]}{\operator [see doc]} -} - -END - - # None of the following things should need escaping, I dare say! - $tag, - $ISA[0], $ISA[0]->VERSION(), - $], scalar(gmtime), - ; -} - -sub doc_start { - my $self = $_[0]; - my $title = $self->get_short_title(); - DEBUG and print "Short Title: <$title>\n"; - $title .= ' ' if length $title; - - $title =~ s/ *$/ /s; - $title =~ s/^ //s; - $title =~ s/ $/, /s; - # make sure it ends in a comma and a space, unless it's 0-length - - my $is_obviously_module_name; - $is_obviously_module_name = 1 - if $title =~ m/^\S+$/s and $title =~ m/::/s; - # catches the most common case, at least - - DEBUG and print "Title0: <$title>\n"; - $title = rtf_esc($title); - DEBUG and print "Title1: <$title>\n"; - $title = '\lang1024\noproof ' . $title - if $is_obviously_module_name; - - return sprintf <<'END', -\deflang%s\plain\lang%s\widowctrl -{\header\pard\qr\plain\f2\fs%s -%s -p.\chpgn\par} -\fs%s - -END - ($self->doc_lang) x 2, - $self->header_halfpoint_size, - $title, - $self->normal_halfpoint_size, - ; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -#------------------------------------------------------------------------- - -use integer; -sub rtf_esc { - my $x; # scratch - if(!defined wantarray) { # void context: alter in-place! - for(@_) { - s/([F\x00-\x1F\-\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - } - return; - } elsif(wantarray) { # return an array - return map {; ($x = $_) =~ - s/([F\x00-\x1F\-\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - $x =~ s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - $x; - } @_; - } else { # return a single scalar - ($x = ((@_ == 1) ? $_[0] : join '', @_) - ) =~ s/([F\x00-\x1F\-\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - # Escape \, {, }, -, control chars, and 7f-ff. - $x =~ s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - return $x; - } -} - -sub rtf_esc_codely { - # Doesn't change "-" to hard-hyphen, nor apply computerese style-smarts. - # We don't want to change the "-" to hard-hyphen, because we want to - # be able to paste this into a file and run it without there being - # dire screaming about the mysterious hard-hyphen character (which - # looks just like a normal dash character). - - my $x; # scratch - if(!defined wantarray) { # void context: alter in-place! - for(@_) { - s/([F\x00-\x1F\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - } - return; - } elsif(wantarray) { # return an array - return map {; ($x = $_) =~ - s/([F\x00-\x1F\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - $x =~ s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - $x; - } @_; - } else { # return a single scalar - ($x = ((@_ == 1) ? $_[0] : join '', @_) - ) =~ s/([F\x00-\x1F\\\{\}\x7F-\xFF])/$Escape{$1}/g; # ESCAPER - # Escape \, {, }, -, control chars, and 7f-ff. - $x =~ s/([^\x00-\xFF])/'\\uc1\\u'.((ord($1)<32768)?ord($1):(ord($1)-65536)).'?'/eg; - return $x; - } -} - -%Escape = ( - map( (chr($_),chr($_)), # things not apparently needing escaping - 0x20 .. 0x7E ), - map( (chr($_),sprintf("\\'%02x", $_)), # apparently escapeworthy things - 0x00 .. 0x1F, 0x5c, 0x7b, 0x7d, 0x7f .. 0xFF, 0x46), - - # We get to escape out 'F' so that we can send RTF files thru the mail - # without the slightest worry that paragraphs beginning with "From" - # will get munged. - - # And some refinements: - "\cm" => "\n", - "\cj" => "\n", - "\n" => "\n\\line ", - - "\t" => "\\tab ", # Tabs (altho theoretically raw \t's are okay) - "\f" => "\n\\page\n", # Formfeed - "-" => "\\_", # Turn plaintext '-' into a non-breaking hyphen - "\xA0" => "\\~", # Latin-1 non-breaking space - "\xAD" => "\\-", # Latin-1 soft (optional) hyphen - - # CRAZY HACKS: - "\n" => "\\line\n", - "\r" => "\n", - "\cb" => "{\n\\cs21\\lang1024\\noproof ", # \\cf1 - "\cc" => "}", -); -1; - -__END__ - -=head1 NAME - -Pod::Simple::RTF -- format Pod as RTF - -=head1 SYNOPSIS - - perl -MPod::Simple::RTF -e \ - "exit Pod::Simple::RTF->filter(shift)->any_errata_seen" \ - thingy.pod > thingy.rtf - -=head1 DESCRIPTION - -This class is a formatter that takes Pod and renders it as RTF, good for -viewing/printing in MSWord, WordPad/write.exe, TextEdit, etc. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -=head1 FORMAT CONTROL ATTRIBUTES - -You can set these attributes on the parser object before you -call C<parse_file> (or a similar method) on it: - -=over - -=item $parser->head1_halfpoint_size( I<halfpoint_integer> ); - -=item $parser->head2_halfpoint_size( I<halfpoint_integer> ); - -=item $parser->head3_halfpoint_size( I<halfpoint_integer> ); - -=item $parser->head4_halfpoint_size( I<halfpoint_integer> ); - -These methods set the size (in half-points, like 52 for 26-point) -that these heading levels will appear as. - -=item $parser->codeblock_halfpoint_size( I<halfpoint_integer> ); - -This method sets the size (in half-points, like 21 for 10.5-point) -that codeblocks ("verbatim sections") will appear as. - -=item $parser->header_halfpoint_size( I<halfpoint_integer> ); - -This method sets the size (in half-points, like 15 for 7.5-point) -that the header on each page will appear in. The header -is usually just "I<modulename> p. I<pagenumber>". - -=item $parser->normal_halfpoint_size( I<halfpoint_integer> ); - -This method sets the size (in half-points, like 26 for 13-point) -that normal paragraphic text will appear in. - -=item $parser->no_proofing_exemptions( I<true_or_false> ); - -Set this value to true if you don't want the formatter to try -putting a hidden code on all Perl symbols (as best as it can -notice them) that labels them as being not in English, and -so not worth spellchecking. - -=item $parser->doc_lang( I<microsoft_decimal_language_code> ) - -This sets the language code to tag this document as being in. By -default, it is currently the value of the environment variable -C<RTFDEFLANG>, or if that's not set, then the value -1033 (for US English). - -Setting this appropriately is useful if you want to use the RTF -to spellcheck, and/or if you want it to hyphenate right. - -Here are some notable values: - - 1033 US English - 2057 UK English - 3081 Australia English - 4105 Canada English - 1034 Spain Spanish - 2058 Mexico Spanish - 1031 Germany German - 1036 France French - 3084 Canada French - 1035 Finnish - 1044 Norwegian (Bokmal) - 2068 Norwegian (Nynorsk) - -=back - -If you are particularly interested in customizing this module's output -even more, see the source and/or write to me. - -=head1 SEE ALSO - -L<Pod::Simple>, L<RTF::Writer>, L<RTF::Cookbook>, L<RTF::Document>, -L<RTF::Generator> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/Search.pm b/web/bin/lib/Pod/Simple/Search.pm deleted file mode 100644 index 980b3b7..0000000 --- a/web/bin/lib/Pod/Simple/Search.pm +++ /dev/null @@ -1,1016 +0,0 @@ - -require 5.005; -package Pod::Simple::Search; -use strict; - -use vars qw($VERSION $MAX_VERSION_WITHIN $SLEEPY); -$VERSION = 3.04; ## Current version of this package - -BEGIN { *DEBUG = sub () {0} unless defined &DEBUG; } # set DEBUG level -use Carp (); - -$SLEEPY = 1 if !defined $SLEEPY and $^O =~ /mswin|mac/i; - # flag to occasionally sleep for $SLEEPY - 1 seconds. - -$MAX_VERSION_WITHIN ||= 60; - -############################################################################# - -#use diagnostics; -use File::Spec (); -use File::Basename qw( basename ); -use Config (); -use Cwd qw( cwd ); - -#========================================================================== -__PACKAGE__->_accessorize( # Make my dumb accessor methods - 'callback', 'progress', 'dir_prefix', 'inc', 'laborious', 'limit_glob', - 'limit_re', 'shadows', 'verbose', 'name2path', 'path2name', -); -#========================================================================== - -sub new { - my $class = shift; - my $self = bless {}, ref($class) || $class; - $self->init; - return $self; -} - -sub init { - my $self = shift; - $self->inc(1); - $self->verbose(DEBUG); - return $self; -} - -#-------------------------------------------------------------------------- - -sub survey { - my($self, @search_dirs) = @_; - $self = $self->new unless ref $self; # tolerate being a class method - - $self->_expand_inc( \@search_dirs ); - - - $self->{'_scan_count'} = 0; - $self->{'_dirs_visited'} = {}; - $self->path2name( {} ); - $self->name2path( {} ); - $self->limit_re( $self->_limit_glob_to_limit_re ) if $self->{'limit_glob'}; - my $cwd = cwd(); - my $verbose = $self->verbose; - local $_; # don't clobber the caller's $_ ! - - foreach my $try (@search_dirs) { - unless( File::Spec->file_name_is_absolute($try) ) { - # make path absolute - $try = File::Spec->catfile( $cwd ,$try); - } - # simplify path - $try = File::Spec->canonpath($try); - - my $start_in; - my $modname_prefix; - if($self->{'dir_prefix'}) { - $start_in = File::Spec->catdir( - $try, - grep length($_), split '[\\/:]+', $self->{'dir_prefix'} - ); - $modname_prefix = [grep length($_), split m{[:/\\]}, $self->{'dir_prefix'}]; - $verbose and print "Appending \"$self->{'dir_prefix'}\" to $try, ", - "giving $start_in (= @$modname_prefix)\n"; - } else { - $start_in = $try; - } - - if( $self->{'_dirs_visited'}{$start_in} ) { - $verbose and print "Directory '$start_in' already seen, skipping.\n"; - next; - } else { - $self->{'_dirs_visited'}{$start_in} = 1; - } - - unless(-e $start_in) { - $verbose and print "Skipping non-existent $start_in\n"; - next; - } - - my $closure = $self->_make_search_callback; - - if(-d $start_in) { - # Normal case: - $verbose and print "Beginning excursion under $start_in\n"; - $self->_recurse_dir( $start_in, $closure, $modname_prefix ); - $verbose and print "Back from excursion under $start_in\n\n"; - - } elsif(-f _) { - # A excursion consisting of just one file! - $_ = basename($start_in); - $verbose and print "Pondering $start_in ($_)\n"; - $closure->($start_in, $_, 0, []); - - } else { - $verbose and print "Skipping mysterious $start_in\n"; - } - } - $self->progress and $self->progress->done( - "Noted $$self{'_scan_count'} Pod files total"); - - return unless defined wantarray; # void - return $self->name2path unless wantarray; # scalar - return $self->name2path, $self->path2name; # list -} - - -#========================================================================== -sub _make_search_callback { - my $self = $_[0]; - - # Put the options in variables, for easy access - my( $laborious, $verbose, $shadows, $limit_re, $callback, $progress,$path2name,$name2path) = - map scalar($self->$_()), - qw(laborious verbose shadows limit_re callback progress path2name name2path); - - my($file, $shortname, $isdir, $modname_bits); - return sub { - ($file, $shortname, $isdir, $modname_bits) = @_; - - if($isdir) { # this never gets called on the startdir itself, just subdirs - - if( $self->{'_dirs_visited'}{$file} ) { - $verbose and print "Directory '$file' already seen, skipping.\n"; - return 'PRUNE'; - } - - print "Looking in dir $file\n" if $verbose; - - unless ($laborious) { # $laborious overrides pruning - if( m/^(\d+\.[\d_]{3,})\z/s - and do { my $x = $1; $x =~ tr/_//d; $x != $] } - ) { - $verbose and print "Perl $] version mismatch on $_, skipping.\n"; - return 'PRUNE'; - } - - if( m/^([A-Za-z][a-zA-Z0-9_]*)\z/s ) { - $verbose and print "$_ is a well-named module subdir. Looking....\n"; - } else { - $verbose and print "$_ is a fishy directory name. Skipping.\n"; - return 'PRUNE'; - } - } # end unless $laborious - - $self->{'_dirs_visited'}{$file} = 1; - return; # (not pruning); - } - - - # Make sure it's a file even worth even considering - if($laborious) { - unless( - m/\.(pod|pm|plx?)\z/i || -x _ and -T _ - # Note that the cheapest operation (the RE) is run first. - ) { - $verbose > 1 and print " Brushing off uninteresting $file\n"; - return; - } - } else { - unless( m/^[-_a-zA-Z0-9]+\.(?:pod|pm|plx?)\z/is ) { - $verbose > 1 and print " Brushing off oddly-named $file\n"; - return; - } - } - - $verbose and print "Considering item $file\n"; - my $name = $self->_path2modname( $file, $shortname, $modname_bits ); - $verbose > 0.01 and print " Nominating $file as $name\n"; - - if($limit_re and $name !~ m/$limit_re/i) { - $verbose and print "Shunning $name as not matching $limit_re\n"; - return; - } - - if( !$shadows and $name2path->{$name} ) { - $verbose and print "Not worth considering $file ", - "-- already saw $name as ", - join(' ', grep($path2name->{$_} eq $name, keys %$path2name)), "\n"; - return; - } - - # Put off until as late as possible the expense of - # actually reading the file: - if( m/\.pod\z/is ) { - # just assume it has pod, okay? - } else { - $progress and $progress->reach($self->{'_scan_count'}, "Scanning $file"); - return unless $self->contains_pod( $file ); - } - ++ $self->{'_scan_count'}; - - # Or finally take note of it: - if( $name2path->{$name} ) { - $verbose and print - "Duplicate POD found (shadowing?): $name ($file)\n", - " Already seen in ", - join(' ', grep($path2name->{$_} eq $name, keys %$path2name)), "\n"; - } else { - $name2path->{$name} = $file; # Noting just the first occurrence - } - $verbose and print " Noting $name = $file\n"; - if( $callback ) { - local $_ = $_; # insulate from changes, just in case - $callback->($file, $name); - } - $path2name->{$file} = $name; - return; - } -} - -#========================================================================== - -sub _path2modname { - my($self, $file, $shortname, $modname_bits) = @_; - - # this code simplifies the POD name for Perl modules: - # * remove "site_perl" - # * remove e.g. "i586-linux" (from 'archname') - # * remove e.g. 5.00503 - # * remove pod/ if followed by perl*.pod (e.g. in pod/perlfunc.pod) - # * dig into the file for case-preserved name if not already mixed case - - my @m = @$modname_bits; - my $x; - my $verbose = $self->verbose; - - # Shaving off leading naughty-bits - while(@m - and defined($x = lc( $m[0] )) - and( $x eq 'site_perl' - or($x eq 'pod' and @m == 1 and $shortname =~ m{^perl.*\.pod$}s ) - or $x =~ m{\\d+\\.z\\d+([_.]?\\d+)?} # if looks like a vernum - or $x eq lc( $Config::Config{'archname'} ) - )) { shift @m } - - my $name = join '::', @m, $shortname; - $self->_simplify_base($name); - - # On VMS, case-preserved document names can't be constructed from - # filenames, so try to extract them from the "=head1 NAME" tag in the - # file instead. - if ($^O eq 'VMS' && ($name eq lc($name) || $name eq uc($name))) { - open PODFILE, "<$file" or die "_path2modname: Can't open $file: $!"; - my $in_pod = 0; - my $in_name = 0; - my $line; - while ($line = <PODFILE>) { - chomp $line; - $in_pod = 1 if ($line =~ m/^=\w/); - $in_pod = 0 if ($line =~ m/^=cut/); - next unless $in_pod; # skip non-pod text - next if ($line =~ m/^\s*\z/); # and blank lines - next if ($in_pod && ($line =~ m/^X</)); # and commands - if ($in_name) { - if ($line =~ m/(\w+::)?(\w+)/) { - # substitute case-preserved version of name - my $podname = $2; - my $prefix = $1 || ''; - $verbose and print "Attempting case restore of '$name' from '$prefix$podname'\n"; - unless ($name =~ s/$prefix$podname/$prefix$podname/i) { - $verbose and print "Attempting case restore of '$name' from '$podname'\n"; - $name =~ s/$podname/$podname/i; - } - last; - } - } - $in_name = 1 if ($line =~ m/^=head1 NAME/); - } - close PODFILE; - } - - return $name; -} - -#========================================================================== - -sub _recurse_dir { - my($self, $startdir, $callback, $modname_bits) = @_; - - my $maxdepth = $self->{'fs_recursion_maxdepth'} || 10; - my $verbose = $self->verbose; - - my $here_string = File::Spec->curdir; - my $up_string = File::Spec->updir; - $modname_bits ||= []; - - my $recursor; - $recursor = sub { - my($dir_long, $dir_bare) = @_; - if( @$modname_bits >= 10 ) { - $verbose and print "Too deep! [@$modname_bits]\n"; - return; - } - - unless(-d $dir_long) { - $verbose > 2 and print "But it's not a dir! $dir_long\n"; - return; - } - unless( opendir(INDIR, $dir_long) ) { - $verbose > 2 and print "Can't opendir $dir_long : $!\n"; - closedir(INDIR); - return - } - my @items = sort readdir(INDIR); - closedir(INDIR); - - push @$modname_bits, $dir_bare unless $dir_bare eq ''; - - my $i_full; - foreach my $i (@items) { - next if $i eq $here_string or $i eq $up_string or $i eq ''; - $i_full = File::Spec->catfile( $dir_long, $i ); - - if(!-r $i_full) { - $verbose and print "Skipping unreadable $i_full\n"; - - } elsif(-f $i_full) { - $_ = $i; - $callback->( $i_full, $i, 0, $modname_bits ); - - } elsif(-d _) { - $i =~ s/\.DIR\z//i if $^O eq 'VMS'; - $_ = $i; - my $rv = $callback->( $i_full, $i, 1, $modname_bits ) || ''; - - if($rv eq 'PRUNE') { - $verbose > 1 and print "OK, pruning"; - } else { - # Otherwise, recurse into it - $recursor->( File::Spec->catdir($dir_long, $i) , $i); - } - } else { - $verbose > 1 and print "Skipping oddity $i_full\n"; - } - } - pop @$modname_bits; - return; - };; - - local $_; - $recursor->($startdir, ''); - - undef $recursor; # allow it to be GC'd - - return; -} - - -#========================================================================== - -sub run { - # A function, useful in one-liners - - my $self = __PACKAGE__->new; - $self->limit_glob($ARGV[0]) if @ARGV; - $self->callback( sub { - my($file, $name) = @_; - my $version = ''; - - # Yes, I know we won't catch the version in like a File/Thing.pm - # if we see File/Thing.pod first. That's just the way the - # cookie crumbles. -- SMB - - if($file =~ m/\.pod$/i) { - # Don't bother looking for $VERSION in .pod files - DEBUG and print "Not looking for \$VERSION in .pod $file\n"; - } elsif( !open(INPOD, $file) ) { - DEBUG and print "Couldn't open $file: $!\n"; - close(INPOD); - } else { - # Sane case: file is readable - my $lines = 0; - while(<INPOD>) { - last if $lines++ > $MAX_VERSION_WITHIN; # some degree of sanity - if( s/^\s*\$VERSION\s*=\s*//s and m/\d/ ) { - DEBUG and print "Found version line (#$lines): $_"; - s/\s*\#.*//s; - s/\;\s*$//s; - s/\s+$//s; - s/\t+/ /s; # nix tabs - # Optimize the most common cases: - $_ = "v$1" - if m{^v?["']?([0-9_]+(\.[0-9_]+)*)["']?$}s - # like in $VERSION = "3.14159"; - or m{\$Revision:\s*([0-9_]+(?:\.[0-9_]+)*)\s*\$}s - # like in sprintf("%d.%02d", q$Revision: 4.13 $ =~ /(\d+)\.(\d+)/); - ; - - # Like in sprintf("%d.%s", map {s/_//g; $_} q$Name: release-0_55-public $ =~ /-(\d+)_([\d_]+)/) - $_ = sprintf("v%d.%s", - map {s/_//g; $_} - $1 =~ m/-(\d+)_([\d_]+)/) # snare just the numeric part - if m{\$Name:\s*([^\$]+)\$}s - ; - $version = $_; - DEBUG and print "Noting $version as version\n"; - last; - } - } - close(INPOD); - } - print "$name\t$version\t$file\n"; - return; - # End of callback! - }); - - $self->survey; -} - -#========================================================================== - -sub simplify_name { - my($self, $str) = @_; - - # Remove all path components - # XXX Why not just use basename()? -- SMB - - if ($^O eq 'MacOS') { $str =~ s{^.*:+}{}s } - else { $str =~ s{^.*/+}{}s } - - $self->_simplify_base($str); - return $str; -} - -#========================================================================== - -sub _simplify_base { # Internal method only - - # strip Perl's own extensions - $_[1] =~ s/\.(pod|pm|plx?)\z//i; - - # strip meaningless extensions on Win32 and OS/2 - $_[1] =~ s/\.(bat|exe|cmd)\z//i if $^O =~ /mswin|os2/i; - - # strip meaningless extensions on VMS - $_[1] =~ s/\.(com)\z//i if $^O eq 'VMS'; - - return; -} - -#========================================================================== - -sub _expand_inc { - my($self, $search_dirs) = @_; - - return unless $self->{'inc'}; - - if ($^O eq 'MacOS') { - push @$search_dirs, - grep $_ ne File::Spec->curdir, $self->_mac_whammy(@INC); - # Any other OSs need custom handling here? - } else { - push @$search_dirs, grep $_ ne File::Spec->curdir, @INC; - } - - $self->{'laborious'} = 0; # Since inc said to use INC - return; -} - -#========================================================================== - -sub _mac_whammy { # Tolerate '.', './some_dir' and '(../)+some_dir' on Mac OS - my @them; - (undef,@them) = @_; - for $_ (@them) { - if ( $_ eq '.' ) { - $_ = ':'; - } elsif ( $_ =~ s|^((?:\.\./)+)|':' x (length($1)/3)|e ) { - $_ = ':'. $_; - } else { - $_ =~ s|^\./|:|; - } - } - return @them; -} - -#========================================================================== - -sub _limit_glob_to_limit_re { - my $self = $_[0]; - my $limit_glob = $self->{'limit_glob'} || return; - - my $limit_re = '^' . quotemeta($limit_glob) . '$'; - $limit_re =~ s/\\\?/./g; # glob "?" => "." - $limit_re =~ s/\\\*/.*?/g; # glob "*" => ".*?" - $limit_re =~ s/\.\*\?\$$//s; # final glob "*" => ".*?$" => "" - - $self->{'verbose'} and print "Turning limit_glob $limit_glob into re $limit_re\n"; - - # A common optimization: - if(!exists($self->{'dir_prefix'}) - and $limit_glob =~ m/^(?:\w+\:\:)+/s # like "File::*" or "File::Thing*" - # Optimize for sane and common cases (but not things like "*::File") - ) { - $self->{'dir_prefix'} = join "::", $limit_glob =~ m/^(?:\w+::)+/sg; - $self->{'verbose'} and print " and setting dir_prefix to $self->{'dir_prefix'}\n"; - } - - return $limit_re; -} - -#========================================================================== - -# contribution mostly from Tim Jenness <t.jenness@jach.hawaii.edu> - -sub find { - my($self, $pod, @search_dirs) = @_; - $self = $self->new unless ref $self; # tolerate being a class method - - # Check usage - Carp::carp 'Usage: \$self->find($podname, ...)' - unless defined $pod and length $pod; - - my $verbose = $self->verbose; - - # Split on :: and then join the name together using File::Spec - my @parts = split /::/, $pod; - $verbose and print "Chomping {$pod} => {@parts}\n"; - - #@search_dirs = File::Spec->curdir unless @search_dirs; - - if( $self->inc ) { - if( $^O eq 'MacOS' ) { - push @search_dirs, $self->_mac_whammy(@INC); - } else { - push @search_dirs, @INC; - } - - # Add location of pod documentation for perl man pages (eg perlfunc) - # This is a pod directory in the private install tree - #my $perlpoddir = File::Spec->catdir($Config::Config{'installprivlib'}, - # 'pod'); - #push (@search_dirs, $perlpoddir) - # if -d $perlpoddir; - - # Add location of binaries such as pod2text: - push @search_dirs, $Config::Config{'scriptdir'}; - # and if that's undef or q{} or nonexistent, we just ignore it later - } - - my %seen_dir; - Dir: - foreach my $dir ( @search_dirs ) { - next unless defined $dir and length $dir; - next if $seen_dir{$dir}; - $seen_dir{$dir} = 1; - unless(-d $dir) { - print "Directory $dir does not exist\n" if $verbose; - next Dir; - } - - print "Looking in directory $dir\n" if $verbose; - my $fullname = File::Spec->catfile( $dir, @parts ); - print "Filename is now $fullname\n" if $verbose; - - foreach my $ext ('', '.pod', '.pm', '.pl') { # possible extensions - my $fullext = $fullname . $ext; - if( -f $fullext and $self->contains_pod( $fullext ) ){ - print "FOUND: $fullext\n" if $verbose; - return $fullext; - } - } - my $subdir = File::Spec->catdir($dir,'pod'); - if(-d $subdir) { # slip in the ./pod dir too - $verbose and print "Noticing $subdir and stopping there...\n"; - $dir = $subdir; - redo Dir; - } - } - - return undef; -} - -#========================================================================== - -sub contains_pod { - my($self, $file) = @_; - my $verbose = $self->{'verbose'}; - - # check for one line of POD - $verbose > 1 and print " Scanning $file for pod...\n"; - unless( open(MAYBEPOD,"<$file") ) { - print "Error: $file is unreadable: $!\n"; - return undef; - } - - sleep($SLEEPY - 1) if $SLEEPY; - # avoid totally hogging the processor on OSs with poor process control - - local $_; - while( <MAYBEPOD> ) { - if(m/^=(head\d|pod|over|item)\b/s) { - close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting"; - chomp; - $verbose > 1 and print " Found some pod ($_) in $file\n"; - return 1; - } - } - close(MAYBEPOD) || die "Bizarre error closing $file: $!\nAborting"; - $verbose > 1 and print " No POD in $file, skipping.\n"; - return 0; -} - -#========================================================================== - -sub _accessorize { # A simple-minded method-maker - shift; - no strict 'refs'; - foreach my $attrname (@_) { - *{caller() . '::' . $attrname} = sub { - use strict; - $Carp::CarpLevel = 1, Carp::croak( - "Accessor usage: \$obj->$attrname() or \$obj->$attrname(\$new_value)" - ) unless (@_ == 1 or @_ == 2) and ref $_[0]; - - # Read access: - return $_[0]->{$attrname} if @_ == 1; - - # Write access: - $_[0]->{$attrname} = $_[1]; - return $_[0]; # RETURNS MYSELF! - }; - } - # Ya know, they say accessories make the ensemble! - return; -} - -#========================================================================== -sub _state_as_string { - my $self = $_[0]; - return '' unless ref $self; - my @out = "{\n # State of $self ...\n"; - foreach my $k (sort keys %$self) { - push @out, " ", _esc($k), " => ", _esc($self->{$k}), ",\n"; - } - push @out, "}\n"; - my $x = join '', @out; - $x =~ s/^/#/mg; - return $x; -} - -sub _esc { - my $in = $_[0]; - return 'undef' unless defined $in; - $in =~ - s<([^\x20\x21\x23\x27-\x3F\x41-\x5B\x5D-\x7E])> - <'\\x'.(unpack("H2",$1))>eg; - return qq{"$in"}; -} - -#========================================================================== - -run() unless caller; # run if "perl whatever/Search.pm" - -1; - -#========================================================================== - -__END__ - - -=head1 NAME - -Pod::Simple::Search - find POD documents in directory trees - -=head1 SYNOPSIS - - use Pod::Simple::Search; - my $name2path = Pod::Simple::Search->new->limit_glob('LWP::*')->survey; - print "Looky see what I found: ", - join(' ', sort keys %$name2path), "\n"; - - print "LWPUA docs = ", - Pod::Simple::Search->new->find('LWP::UserAgent') || "?", - "\n"; - -=head1 DESCRIPTION - -B<Pod::Simple::Search> is a class that you use for running searches -for Pod files. An object of this class has several attributes -(mostly options for controlling search options), and some methods -for searching based on those attributes. - -The way to use this class is to make a new object of this class, -set any options, and then call one of the search options -(probably C<survey> or C<find>). The sections below discuss the -syntaxes for doing all that. - - -=head1 CONSTRUCTOR - -This class provides the one constructor, called C<new>. -It takes no parameters: - - use Pod::Simple::Search; - my $search = Pod::Simple::Search->new; - -=head1 ACCESSORS - -This class defines several methods for setting (and, occasionally, -reading) the contents of an object. With two exceptions (discussed at -the end of this section), these attributes are just for controlling the -way searches are carried out. - -Note that each of these return C<$self> when you call them as -C<< $self->I<whatever(value)> >>. That's so that you can chain -together set-attribute calls like this: - - my $name2path = - Pod::Simple::Search->new - -> inc(0) -> verbose(1) -> callback(\&blab) - ->survey(@there); - -...which works exactly as if you'd done this: - - my $search = Pod::Simple::Search->new; - $search->inc(0); - $search->verbose(1); - $search->callback(\&blab); - my $name2path = $search->survey(@there); - -=over - -=item $search->inc( I<true-or-false> ); - -This attribute, if set to a true value, means that searches should -implicitly add perl's I<@INC> paths. This -automatically considers paths specified in the C<PERL5LIB> environment -as this is prepended to I<@INC> by the Perl interpreter itself. -This attribute's default value is B<TRUE>. If you want to search -only specific directories, set $self->inc(0) before calling -$inc->survey or $inc->find. - - -=item $search->verbose( I<nonnegative-number> ); - -This attribute, if set to a nonzero positive value, will make searches output -(via C<warn>) notes about what they're doing as they do it. -This option may be useful for debugging a pod-related module. -This attribute's default value is zero, meaning that no C<warn> messages -are produced. (Setting verbose to 1 turns on some messages, and setting -it to 2 turns on even more messages, i.e., makes the following search(es) -even more verbose than 1 would make them.) - - -=item $search->limit_glob( I<some-glob-string> ); - -This option means that you want to limit the results just to items whose -podnames match the given glob/wildcard expression. For example, you -might limit your search to just "LWP::*", to search only for modules -starting with "LWP::*" (but not including the module "LWP" itself); or -you might limit your search to "LW*" to see only modules whose (full) -names begin with "LW"; or you might search for "*Find*" to search for -all modules with "Find" somewhere in their full name. (You can also use -"?" in a glob expression; so "DB?" will match "DBI" and "DBD".) - - -=item $search->callback( I<\&some_routine> ); - -This attribute means that every time this search sees a matching -Pod file, it should call this callback routine. The routine is called -with two parameters: the current file's filespec, and its pod name. -(For example: C<("/etc/perljunk/File/Crunk.pm", "File::Crunk")> would -be in C<@_>.) - -The callback routine's return value is not used for anything. - -This attribute's default value is false, meaning that no callback -is called. - -=item $search->laborious( I<true-or-false> ); - -Unless you set this attribute to a true value, Pod::Search will -apply Perl-specific heuristics to find the correct module PODs quickly. -This attribute's default value is false. You won't normally need -to set this to true. - -Specifically: Turning on this option will disable the heuristics for -seeing only files with Perl-like extensions, omitting subdirectories -that are numeric but do I<not> match the current Perl interpreter's -version ID, suppressing F<site_perl> as a module hierarchy name, etc. - - -=item $search->shadows( I<true-or-false> ); - -Unless you set this attribute to a true value, Pod::Simple::Search will -consider only the first file of a given modulename as it looks thru the -specified directories; that is, with this option off, if -Pod::Simple::Search has seen a C<somepathdir/Foo/Bar.pm> already in this -search, then it won't bother looking at a C<somelaterpathdir/Foo/Bar.pm> -later on in that search, because that file is merely a "shadow". But if -you turn on C<< $self->shadows(1) >>, then these "shadow" files are -inspected too, and are noted in the pathname2podname return hash. - -This attribute's default value is false; and normally you won't -need to turn it on. - - -=item $search->limit_re( I<some-regxp> ); - -Setting this attribute (to a value that's a regexp) means that you want -to limit the results just to items whose podnames match the given -regexp. Normally this option is not needed, and the more efficient -C<limit_glob> attribute is used instead. - - -=item $search->dir_prefix( I<some-string-value> ); - -Setting this attribute to a string value means that the searches should -begin in the specified subdirectory name (like "Pod" or "File::Find", -also expressable as "File/Find"). For example, the search option -C<< $search->limit_glob("File::Find::R*") >> -is the same as the combination of the search options -C<< $search->limit_re("^File::Find::R") -> dir_prefix("File::Find") >>. - -Normally you don't need to know about the C<dir_prefix> option, but I -include it in case it might prove useful for someone somewhere. - -(Implementationally, searching with limit_glob ends up setting limit_re -and usually dir_prefix.) - - -=item $search->progress( I<some-progress-object> ); - -If you set a value for this attribute, the value is expected -to be an object (probably of a class that you define) that has a -C<reach> method and a C<done> method. This is meant for reporting -progress during the search, if you don't want to use a simple -callback. - -Normally you don't need to know about the C<progress> option, but I -include it in case it might prove useful for someone somewhere. - -While a search is in progress, the progress object's C<reach> and -C<done> methods are called like this: - - # Every time a file is being scanned for pod: - $progress->reach($count, "Scanning $file"); ++$count; - - # And then at the end of the search: - $progress->done("Noted $count Pod files total"); - -Internally, we often set this to an object of class -Pod::Simple::Progress. That class is probably undocumented, -but you may wish to look at its source. - - -=item $name2path = $self->name2path; - -This attribute is not a search parameter, but is used to report the -result of C<survey> method, as discussed in the next section. - -=item $path2name = $self->path2name; - -This attribute is not a search parameter, but is used to report the -result of C<survey> method, as discussed in the next section. - -=back - -=head1 MAIN SEARCH METHODS - -Once you've actually set any options you want (if any), you can go -ahead and use the following methods to search for Pod files -in particular ways. - - -=head2 C<< $search->survey( @directories ) >> - -The method C<survey> searches for POD documents in a given set of -files and/or directories. This runs the search according to the various -options set by the accessors above. (For example, if the C<inc> attribute -is on, as it is by default, then the perl @INC directories are implicitly -added to the list of directories (if any) that you specify.) - -The return value of C<survey> is two hashes: - -=over - -=item C<name2path> - -A hash that maps from each pod-name to the filespec (like -"Stuff::Thing" => "/whatever/plib/Stuff/Thing.pm") - -=item C<path2name> - -A hash that maps from each Pod filespec to its pod-name (like -"/whatever/plib/Stuff/Thing.pm" => "Stuff::Thing") - -=back - -Besides saving these hashes as the hashref attributes -C<name2path> and C<path2name>, calling this function also returns -these hashrefs. In list context, the return value of -C<< $search->survey >> is the list C<(\%name2path, \%path2name)>. -In scalar context, the return value is C<\%name2path>. -Or you can just call this in void context. - -Regardless of calling context, calling C<survey> saves -its results in its C<name2path> and C<path2name> attributes. - -E.g., when searching in F<$HOME/perl5lib>, the file -F<$HOME/perl5lib/MyModule.pm> would get the POD name I<MyModule>, -whereas F<$HOME/perl5lib/Myclass/Subclass.pm> would be -I<Myclass::Subclass>. The name information can be used for POD -translators. - -Only text files containing at least one valid POD command are found. - -In verbose mode, a warning is printed if shadows are found (i.e., more -than one POD file with the same POD name is found, e.g. F<CPAN.pm> in -different directories). This usually indicates duplicate occurrences of -modules in the I<@INC> search path, which is occasionally inadvertent -(but is often simply a case of a user's path dir having a more recent -version than the system's general path dirs in general.) - -The options to this argument is a list of either directories that are -searched recursively, or files. (Usually you wouldn't specify files, -but just dirs.) Or you can just specify an empty-list, as in -$name2path; with the -C<inc> option on, as it is by default, teh - -The POD names of files are the plain basenames with any Perl-like -extension (.pm, .pl, .pod) stripped, and path separators replaced by -C<::>'s. - -Calling Pod::Simple::Search->search(...) is short for -Pod::Simple::Search->new->search(...). That is, a throwaway object -with default attribute values is used. - - -=head2 C<< $search->simplify_name( $str ) >> - -The method B<simplify_name> is equivalent to B<basename>, but also -strips Perl-like extensions (.pm, .pl, .pod) and extensions like -F<.bat>, F<.cmd> on Win32 and OS/2, or F<.com> on VMS, respectively. - - -=head2 C<< $search->find( $pod ) >> - -=head2 C<< $search->find( $pod, @search_dirs ) >> - -Returns the location of a Pod file, given a Pod/module/script name -(like "Foo::Bar" or "perlvar" or "perldoc"), and an idea of -what files/directories to look in. -It searches according to the various options set by the accessors above. -(For example, if the C<inc> attribute is on, as it is by default, then -the perl @INC directories are implicitly added to the list of -directories (if any) that you specify.) - -This returns the full path of the first occurrence to the file. -Package names (eg 'A::B') are automatically converted to directory -names in the selected directory. Additionally, '.pm', '.pl' and '.pod' -are automatically appended to the search as required. -(So, for example, under Unix, "A::B" is converted to "somedir/A/B.pm", -"somedir/A/B.pod", or "somedir/A/B.pl", as appropriate.) - -If no such Pod file is found, this method returns undef. - -If any of the given search directories contains a F<pod/> subdirectory, -then it is searched. (That's how we manage to find F<perlfunc>, -for example, which is usually in F<pod/perlfunc> in most Perl dists.) - -The C<verbose> and C<inc> attributes influence the behavior of this -search; notably, C<inc>, if true, adds @INC I<and also -$Config::Config{'scriptdir'}> to the list of directories to search. - -It is common to simply say C<< $filename = Pod::Simple::Search-> new -->find("perlvar") >> so that just the @INC (well, and scriptdir) -directories are searched. (This happens because the C<inc> -attribute is true by default.) - -Calling Pod::Simple::Search->find(...) is short for -Pod::Simple::Search->new->find(...). That is, a throwaway object -with default attribute values is used. - - -=head2 C<< $self->contains_pod( $file ) >> - -Returns true if the supplied filename (not POD module) contains some Pod -documentation. - - -=head1 AUTHOR - -Sean M. Burke E<lt>sburke@cpan.orgE<gt> -borrowed code from -Marek Rouchal's Pod::Find, which in turn -heavily borrowed code from Nick Ing-Simmons' PodToHtml. - -Tim Jenness E<lt>t.jenness@jach.hawaii.eduE<gt> provided -C<find> and C<contains_pod> to Pod::Find. - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Perldoc> - -=cut - diff --git a/web/bin/lib/Pod/Simple/SimpleTree.pm b/web/bin/lib/Pod/Simple/SimpleTree.pm deleted file mode 100644 index 64dd155..0000000 --- a/web/bin/lib/Pod/Simple/SimpleTree.pm +++ /dev/null @@ -1,155 +0,0 @@ - - -require 5; -package Pod::Simple::SimpleTree; -use strict; -use Carp (); -use Pod::Simple (); -use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '2.02'; -BEGIN { - @ISA = ('Pod::Simple'); - *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; -} - -__PACKAGE__->_accessorize( - 'root', # root of the tree -); - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub _handle_element_start { # self, tagname, attrhash - DEBUG > 2 and print "Handling $_[1] start-event\n"; - my $x = [$_[1], $_[2]]; - if($_[0]{'_currpos'}) { - push @{ $_[0]{'_currpos'}[0] }, $x; # insert in parent's child-list - unshift @{ $_[0]{'_currpos'} }, $x; # prefix to stack - } else { - DEBUG and print " And oo, it gets to be root!\n"; - $_[0]{'_currpos'} = [ $_[0]{'root'} = $x ]; - # first event! set to stack, and set as root. - } - DEBUG > 3 and print "Stack is now: ", - join(">", map $_->[0], @{$_[0]{'_currpos'}}), "\n"; - return; -} - -sub _handle_element_end { # self, tagname - DEBUG > 2 and print "Handling $_[1] end-event\n"; - shift @{$_[0]{'_currpos'}}; - DEBUG > 3 and print "Stack is now: ", - join(">", map $_->[0], @{$_[0]{'_currpos'}}), "\n"; - return; -} - -sub _handle_text { # self, text - DEBUG > 2 and print "Handling $_[1] text-event\n"; - push @{ $_[0]{'_currpos'}[0] }, $_[1]; - return; -} - - -# A bit of evil from the black box... please avert your eyes, kind souls. -sub _traverse_treelet_bit { - DEBUG > 2 and print "Handling $_[1] paragraph event\n"; - my $self = shift; - push @{ $self->{'_currpos'}[0] }, [@_]; - return; -} -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1; -__END__ - -=head1 NAME - -Pod::Simple::SimpleTree -- parse Pod into a simple parse tree - -=head1 SYNOPSIS - - % cat ptest.pod - - =head1 PIE - - I like B<pie>! - - % perl -MPod::Simple::SimpleTree -MData::Dumper -e \ - "print Dumper(Pod::Simple::SimpleTree->new->parse_file(shift)->root)" \ - ptest.pod - - $VAR1 = [ - 'Document', - { 'start_line' => 1 }, - [ - 'head1', - { 'start_line' => 1 }, - 'PIE' - ], - [ - 'Para', - { 'start_line' => 3 }, - 'I like ', - [ - 'B', - {}, - 'pie' - ], - '!' - ] - ]; - -=head1 DESCRIPTION - -This class is of interest to people writing a Pod processor/formatter. - -This class takes Pod and parses it, returning a parse tree made just -of arrayrefs, and hashrefs, and strings. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -This class is inspired by XML::Parser's "Tree" parsing-style, although -it doesn't use exactly the same LoL format. - -=head1 METHODS - -At the end of the parse, call C<< $parser->root >> to get the -tree's top node. - -=head1 Tree Contents - -Every element node in the parse tree is represented by an arrayref of -the form: C<[ I<elementname>, \%attributes, I<...subnodes...> ]>. -See the example tree dump in the Synopsis, above. - -Every text node in the tree is represented by a simple (non-ref) -string scalar. So you can test C<ref($node)> to see whather you have -an element node or just a text node. - -The top node in the tree is C<[ 'Document', \%attributes, -I<...subnodes...> ]> - - -=head1 SEE ALSO - -L<Pod::Simple> - -L<perllol> - -L<The "Tree" subsubsection in XML::Parser|XML::Parser/"Tree"> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/Subclassing.pod b/web/bin/lib/Pod/Simple/Subclassing.pod deleted file mode 100644 index d4ee694..0000000 --- a/web/bin/lib/Pod/Simple/Subclassing.pod +++ /dev/null @@ -1,922 +0,0 @@ - -=head1 NAME - -Pod::Simple::Subclassing -- write a formatter as a Pod::Simple subclass - -=head1 SYNOPSIS - - package Pod::SomeFormatter; - use Pod::Simple; - @ISA = qw(Pod::Simple); - $VERSION = '1.01'; - use strict; - - sub _handle_element_start { - my($parser, $element_name, $attr_hash_r) = @_; - ... - } - - sub _handle_element_end { - my($parser, $element_name) = @_; - ... - } - - sub _handle_text { - my($parser, $text) = @_; - ... - } - 1; - -=head1 DESCRIPTION - -This document is about using Pod::Simple to write a Pod processor, -generally a Pod formatter. If you just want to know about using an -existing Pod formatter, instead see its documentation and see also the -docs in L<Pod::Simple>. - -The zeroeth step in writing a Pod formatter is to make sure that there -isn't already a decent one in CPAN. See L<http://search.cpan.org/>, and -run a search on the name of the format you want to render to. Also -consider joining the Pod People list -L<http://lists.perl.org/showlist.cgi?name=pod-people> and asking whether -anyone has a formatter for that format -- maybe someone cobbled one -together but just hasn't released it. - -The first step in writing a Pod processor is to read L<perlpodspec>, -which contains notes information on writing a Pod parser (which has been -largely taken care of by Pod::Simple), but also a lot of requirements -and recommendations for writing a formatter. - -The second step is to actually learn the format you're planning to -format to -- or at least as much as you need to know to represent Pod, -which probably isn't much. - -The third step is to pick which of Pod::Simple's interfaces you want to -use -- the basic interface via Pod::Simple or L<Pod::Simple::Methody> is -event-based, sort of like L<HTML::Parser>'s interface, or sort of like -L<XML::Parser>'s "Handlers" interface), but L<Pod::Simple::PullParser> -provides a token-stream interface, sort of like L<HTML::TokeParser>'s -interface; L<Pod::Simple::SimpleTree> provides a simple tree interface, -rather like XML::Parser's "Tree" interface. Users familiar with -XML-handling will find one of these styles relatively familiar; but if -you would be even more at home with XML, there are classes that produce -an XML representation of the Pod stream, notably -L<Pod::Simple::XMLOutStream>; you can feed the output of such a class to -whatever XML parsing system you are most at home with. - -The last step is to write your code based on how the events (or tokens, -or tree-nodes, or the XML, or however you're parsing) will map to -constructs in the output format. Also sure to consider how to escape -text nodes containing arbitrary text, and also what to do with text -nodes that represent preformatted text (from verbatim sections). - - - -=head1 Events - -TODO intro... mention that events are supplied for implicits, like for -missing >'s - - -In the following section, we use XML to represent the event structure -associated with a particular construct. That is, TODO - -=over - -=item C<< $parser->_handle_element_start( I<element_name>, I<attr_hashref> ) >> - -=item C<< $parser->_handle_element_end( I<element_name> ) >> - -=item C<< $parser->_handle_text( I<text_string> ) >> - -=back - -TODO describe - - -=over - -=item events with an element_name of Document - -Parsing a document produces this event structure: - - <Document start_line="543"> - ...all events... - </Document> - -The value of the I<start_line> attribute will be the line number of the first -Pod directive in the document. - -If there is no Pod in the given document, then the -event structure will be this: - - <Document contentless="1" start_line="543"> - </Document> - -In that case, the value of the I<start_line> attribute will not be meaningful; -under current implementations, it will probably be the line number of the -last line in the file. - -=item events with an element_name of Para - -Parsing a plain (non-verbatim, non-directive, non-data) paragraph in -a Pod document produces this event structure: - - <Para start_line="543"> - ...all events in this paragraph... - </Para> - -The value of the I<start_line> attribute will be the line number of the start -of the paragraph. - -For example, parsing this paragraph of Pod: - - The value of the I<start_line> attribute will be the - line number of the start of the paragraph. - -produces this event structure: - - <Para start_line="129"> - The value of the - <I> - start_line - </I> - attribute will be the line number of the first Pod directive - in the document. - </Para> - -=item events with an element_name of B, C, F, or I. - -Parsing a BE<lt>...E<gt> formatting code (or of course any of its -semantically identical syntactic variants -S<BE<lt>E<lt> ... E<gt>E<gt>>, -or S<BE<lt>E<lt>E<lt>E<lt> ... E<gt>E<gt>E<gt>E<gt>>, etc.) -produces this event structure: - - <B> - ...stuff... - </B> - -Currently, there are no attributes conveyed. - -Parsing C, F, or I codes produce the same structure, with only a -different element name. - -If your parser object has been set to accept other formatting codes, -then they will be presented like these B/C/F/I codes -- i.e., without -any attributes. - -=item events with an element_name of S - -Normally, parsing an SE<lt>...E<gt> sequence produces this event -structure, just as if it were a B/C/F/I code: - - <S> - ...stuff... - </S> - -However, Pod::Simple (and presumably all derived parsers) offers the -C<nbsp_for_S> option which, if enabled, will suppress all S events, and -instead change all spaces in the content to non-breaking spaces. This is -intended for formatters that output to a format that has no code that -means the same as SE<lt>...E<gt>, but which has a code/character that -means non-breaking space. - -=item events with an element_name of X - -Normally, parsing an XE<lt>...E<gt> sequence produces this event -structure, just as if it were a B/C/F/I code: - - <X> - ...stuff... - </X> - -However, Pod::Simple (and presumably all derived parsers) offers the -C<nix_X_codes> option which, if enabled, will suppress all X events -and ignore their content. For formatters/processors that don't use -X events, this is presumably quite useful. - - -=item events with an element_name of L - -Because the LE<lt>...E<gt> is the most complex construct in the -language, it should not surprise you that the events it generates are -the most complex in the language. Most of complexity is hidden away in -the attribute values, so for those of you writing a Pod formatter that -produces a non-hypertextual format, you can just ignore the attributes -and treat an L event structure like a formatting element that -(presumably) doesn't actually produce a change in formatting. That is, -the content of the L event structure (as opposed to its -attributes) is always what text should be displayed. - -There are, at first glance, three kinds of L links: URL, man, and pod. - -When a LE<lt>I<some_url>E<gt> code is parsed, it produces this event -structure: - - <L content-implicit="yes" to="that_url" type="url"> - that_url - </L> - -The C<type="url"> attribute is always specified for this type of -L code. - -For example, this Pod source: - - L<http://www.perl.com/CPAN/authors/> - -produces this event structure: - - <L content-implicit="yes" to="http://www.perl.com/CPAN/authors/" type="url"> - http://www.perl.com/CPAN/authors/ - </L> - -When a LE<lt>I<manpage(section)>E<gt> code is parsed (and these are -fairly rare and not terribly useful), it produces this event structure: - - <L content-implicit="yes" to="manpage(section)" type="man"> - manpage(section) - </L> - -The C<type="man"> attribute is always specified for this type of -L code. - -For example, this Pod source: - - L<crontab(5)> - -produces this event structure: - - <L content-implicit="yes" to="crontab(5)" type="man"> - crontab(5) - </L> - -In the rare cases where a man page link has a specified, that text appears -in a I<section> attribute. For example, this Pod source: - - L<crontab(5)/"ENVIRONMENT"> - -will produce this event structure: - - <L content-implicit="yes" section="ENVIRONMENT" to="crontab(5)" type="man"> - "ENVIRONMENT" in crontab(5) - </L> - -In the rare case where the Pod document has code like -LE<lt>I<sometext>|I<manpage(section)>E<gt>, then the I<sometext> will appear -as the content of the element, the I<manpage(section)> text will appear -only as the value of the I<to> attribute, and there will be no -C<content-implicit="yes"> attribute (whose presence means that the Pod parser -had to infer what text should appear as the link text -- as opposed to -cases where that attribute is absent, which means that the Pod parser did -I<not> have to infer the link text, because that L code explicitly specified -some link text.) - -For example, this Pod source: - - L<hell itself!|crontab(5)> - -will produce this event structure: - - <L to="crontab(5)" type="man"> - hell itself! - </L> - -The last type of L structure is for links to/within Pod documents. It is -the most complex because it can have a I<to> attribute, I<or> a -I<section> attribute, or both. The C<type="pod"> attribute is always -specified for this type of L code. - -In the most common case, the simple case of a LE<lt>podpageE<gt> code -produces this event structure: - - <L content-implicit="yes" to="Net::Ping" type="pod"> - podpage - </L> - -For example, this Pod source: - - L<Net::Ping> - -produces this event structure: - - <L content-implicit="yes" to="Net::Ping" type="pod"> - Net::Ping - </L> - -In cases where there is link-text explicitly specified, it -is to be found in the content of the element (and not the -attributes), just as with the LE<lt>I<sometext>|I<manpage(section)>E<gt> -case discussed above. For example, this Pod source: - - L<Perl Error Messages|perldiag> - -produces this event structure: - - <L to="perldiag" type="pod"> - Perl Error Messages - </L> - -In cases of links to a section in the current Pod document, -there is a I<section> attribute instead of a I<to> attribute. -For example, this Pod source: - - L</"Member Data"> - -produces this event structure: - - <L content-implicit="yes" section="Member Data" type="pod"> - "Member Data" - </L> - -As another example, this Pod source: - - L<the various attributes|/"Member Data"> - -produces this event structure: - - <L section="Member Data" type="pod"> - the various attributes - </L> - -In cases of links to a section in a different Pod document, -there are both a I<section> attribute and a L<to> attribute. -For example, this Pod source: - - L<perlsyn/"Basic BLOCKs and Switch Statements"> - -produces this event structure: - - <L content-implicit="yes" section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod"> - "Basic BLOCKs and Switch Statements" in perlsyn - </L> - -As another example, this Pod source: - - L<SWITCH statements|perlsyn/"Basic BLOCKs and Switch Statements"> - -produces this event structure: - - <L section="Basic BLOCKs and Switch Statements" to="perlsyn" type="pod"> - SWITCH statements - </L> - -Incidentally, note that we do not distinguish between these syntaxes: - - L</"Member Data"> - L<"Member Data"> - L</Member Data> - L<Member Data> [deprecated syntax] - -That is, they all produce the same event structure, namely: - - <L content-implicit="yes" section="Member Data" type="pod"> - "Member Data" - </L> - -=item events with an element_name of E or Z - -While there are Pod codes EE<lt>...E<gt> and ZE<lt>E<gt>, these -I<do not> produce any E or Z events -- that is, there are no such -events as E or Z. - -=item events with an element_name of Verbatim - -When a Pod verbatim paragraph (AKA "codeblock") is parsed, it -produces this event structure: - - <Verbatim start_line="543" xml:space="preserve"> - ...text... - </Verbatim> - -The value of the I<start_line> attribute will be the line number of the -first line of this verbatim block. The I<xml:space> attribute is always -present, and always has the value "preserve". - -The text content will have tabs already expanded. - - -=item events with an element_name of head1 .. head4 - -When a "=head1 ..." directive is parsed, it produces this event -structure: - - <head1> - ...stuff... - </head1> - -For example, a directive consisting of this: - - =head1 Options to C<new> et al. - -will produce this event structure: - - <head1 start_line="543"> - Options to - <C> - new - </C> - et al. - </head1> - -"=head2" thru "=head4" directives are the same, except for the element -names in the event structure. - -=item events with an element_name of over-bullet - -When an "=over ... Z<>=back" block is parsed where the items are -a bulletted list, it will produce this event structure: - - <over-bullet indent="4" start_line="543"> - <item-bullet start_line="545"> - ...Stuff... - </item-bullet> - ...more item-bullets... - </over-bullet> - -The value of the I<indent> attribute is whatever value is after the -"=over" directive, as in "=over 8". If no such value is specified -in the directive, then the I<indent> attribute has the value "4". - -For example, this Pod source: - - =over - - =item * - - Stuff - - =item * - - Bar I<baz>! - - =back - -produces this event structure: - - <over-bullet indent="4" start_line="10"> - <item-bullet start_line="12"> - Stuff - </item-bullet> - <item-bullet start_line="14"> - Bar <I>baz</I>! - </item-bullet> - </over-bullet> - -=item events with an element_name of over-number - -When an "=over ... Z<>=back" block is parsed where the items are -a numbered list, it will produce this event structure: - - <over-number indent="4" start_line="543"> - <item-number number="1" start_line="545"> - ...Stuff... - </item-number> - ...more item-number... - </over-bullet> - -This is like the "over-bullet" event structure; but note that the contents -are "item-number" instead of "item-bullet", and note that they will have -a "number" attribute, which some formatters/processors may ignore -(since, for example, there's no need for it in HTML when producing -an "<UL><LI>...</LI>...</UL>" structure), but which any processor may use. - -Note that the values for the I<number> attributes of "item-number" -elements in a given "over-number" area I<will> start at 1 and go up by -one each time. If the Pod source doesn't follow that order (even though -it really should should!), whatever numbers it has will be ignored (with -the correct values being put in the I<number> attributes), and an error -message might be issued to the user. - -=item events with an element_name of over-text - -These events are are somewhat unlike the other over-* -structures, as far as what their contents are. When -an "=over ... Z<>=back" block is parsed where the items are -a list of text "subheadings", it will produce this event structure: - - <over-text indent="4" start_line="543"> - <item-text> - ...stuff... - </item-text> - ...stuff (generally Para or Verbatim elements)... - <item-text> - ...more item-text and/or stuff... - </over-text> - -The I<indent> attribute is as with the other over-* events. - -For example, this Pod source: - - =over - - =item Foo - - Stuff - - =item Bar I<baz>! - - Quux - - =back - -produces this event structure: - - <over-text indent="4" start_line="20"> - <item-text start_line="22"> - Foo - </item-text> - <Para start_line="24"> - Stuff - </Para> - <item-text start_line="26"> - Bar - <I> - baz - </I> - ! - </item-text> - <Para start_line="28"> - Quux - </Para> - </over-text> - - - -=item events with an element_name of over-block - -These events are are somewhat unlike the other over-* -structures, as far as what their contents are. When -an "=over ... Z<>=back" block is parsed where there are no items, -it will produce this event structure: - - <over-block indent="4" start_line="543"> - ...stuff (generally Para or Verbatim elements)... - </over-block> - -The I<indent> attribute is as with the other over-* events. - -For example, this Pod source: - - =over - - For cutting off our trade with all parts of the world - - For transporting us beyond seas to be tried for pretended offenses - - He is at this time transporting large armies of foreign mercenaries to - complete the works of death, desolation and tyranny, already begun with - circumstances of cruelty and perfidy scarcely paralleled in the most - barbarous ages, and totally unworthy the head of a civilized nation. - - =cut - -will produce this event structure: - - <over-block indent="4" start_line="2"> - <Para start_line="4"> - For cutting off our trade with all parts of the world - </Para> - <Para start_line="6"> - For transporting us beyond seas to be tried for pretended offenses - </Para> - <Para start_line="8"> - He is at this time transporting large armies of [...more text...] - </Para> - </over-block> - -=item events with an element_name of item-bullet - -See L</"events with an element_name of over-bullet">, above. - -=item events with an element_name of item-number - -See L</"events with an element_name of over-number">, above. - -=item events with an element_name of item-text - -See L</"events with an element_name of over-text">, above. - -=item events with an element_name of for - -TODO... - -=item events with an element_name of Data - -TODO... - -=back - - - -=head1 More Pod::Simple Methods - -Pod::Simple provides a lot of methods that aren't generally interesting -to the end user of an existing Pod formatter, but some of which you -might find useful in writing a Pod formatter. They are listed below. The -first several methods (the accept_* methods) are for declaring the -capabilites of your parser, notably what C<=for I<targetname>> sections -it's interested in, what extra NE<lt>...E<gt> codes it accepts beyond -the ones described in the I<perlpod>. - -=over - -=item C<< $parser->accept_targets( I<SOMEVALUE> ) >> - -As the parser sees sections like: - - =for html <img src="fig1.jpg"> - -or - - =begin html - - <img src="fig1.jpg"> - - =end html - -...the parser will ignore these sections unless your subclass has -specified that it wants to see sections targetted to "html" (or whatever -the formatter name is). - -If you want to process all sections, even if they're not targetted for you, -call this before you start parsing: - - $parser->accept_targets('*'); - -=item C<< $parser->accept_targets_as_text( I<SOMEVALUE> ) >> - -This is like accept_targets, except that it specifies also that the -content of sections for this target should be treated as Pod text even -if the target name in "=for I<targetname>" doesn't start with a ":". - -At time of writing, I don't think you'll need to use this. - - -=item C<< $parser->accept_codes( I<Codename>, I<Codename>... ) >> - -This tells the parser that you accept additional formatting codes, -beyond just the standard ones (I B C L F S X, plus the two weird ones -you don't actually see in the parse tree, Z and E). For example, to also -accept codes "N", "R", and "W": - - $parser->accept_codes( qw( N R W ) ); - -B<TODO: document how this interacts with =extend, and long element names> - - -=item C<< $parser->accept_directive_as_data( I<directive_name> ) >> - -=item C<< $parser->accept_directive_as_verbatim( I<directive_name> ) >> - -=item C<< $parser->accept_directive_as_processed( I<directive_name> ) >> - -In the unlikely situation that you need to tell the parser that you will -accept additional directives ("=foo" things), you need to first set the -parset to treat its content as data (i.e., not really processed at -all), or as verbatim (mostly just expanding tabs), or as processed text -(parsing formatting codes like BE<lt>...E<gt>). - -For example, to accept a new directive "=method", you'd presumably -use: - - $parser->accept_directive_as_processed("method"); - -so that you could have Pod lines like: - - =method I<$whatever> thing B<um> - -Making up your own directives breaks compatibility with other Pod -formatters, in a way that using "=for I<target> ..." lines doesn't; -however, you may find this useful if you're making a Pod superset -format where you don't need to worry about compatibility. - - -=item C<< $parser->nbsp_for_S( I<BOOLEAN> ); >> - -Setting this attribute to a true value (and by default it is false) will -turn "SE<lt>...E<gt>" sequences into sequences of words separated by -C<\xA0> (non-breaking space) characters. For example, it will take this: - - I like S<Dutch apple pie>, don't you? - -and treat it as if it were: - - I like DutchE<nbsp>appleE<nbsp>pie, don't you? - -This is handy for output formats that don't have anything quite like an -"SE<lt>...E<gt>" code, but which do have a code for non-breaking space. - -There is currently no method for going the other way; but I can -probably provide one upon request. - - -=item C<< $parser->version_report() >> - -This returns a string reporting the $VERSION value from your module (and -its classname) as well as the $VERSION value of Pod::Simple. Note that -L<perlpodspec> requires output formats (wherever possible) to note -this detail in a comment in the output format. For example, for -some kind of SGML output format: - - print OUT "<!-- \n", $parser->version_report, "\n -->"; - - -=item C<< $parser->pod_para_count() >> - -This returns the count of Pod paragraphs seen so far. - - -=item C<< $parser->line_count() >> - -This is the current line number being parsed. But you might find the -"line_number" event attribute more accurate, when it is present. - - -=item C<< $parser->nix_X_codes( I<SOMEVALUE> ) >> - -This attribute, when set to a true value (and it is false by default) -ignores any "XE<lt>...E<gt>" sequences in the document being parsed. -Many formats don't actually use the content of these codes, so have -no reason to process them. - - -=item C<< $parser->merge_text( I<SOMEVALUE> ) >> - -This attribute, when set to a true value (and it is false by default) -makes sure that only one event (or token, or node) will be created -for any single contiguous sequence of text. For example, consider -this somewhat contrived example: - - I just LOVE Z<>hotE<32>apple pie! - -When that is parsed and events are about to be called on it, it may -actually seem to be four different text events, one right after another: -one event for "I just LOVE ", one for "hot", one for " ", and one for -"apple pie!". But if you have merge_text on, then you're guaranteed -that it will be fired as one text event: "I just LOVE hot apple pie!". - - -=item C<< $parser->code_handler( I<CODE_REF> ) >> - -This specifies code that should be called when a code line is seen -(i.e., a line outside of the Pod). Normally this is undef, meaning -that no code should be called. If you provide a routine, it should -start out like this: - - sub get_code_line { # or whatever you'll call it - my($line, $line_number, $parser) = @_; - ... - } - -Note, however, that sometimes the Pod events aren't processed in exactly -the same order as the code lines are -- i.e., if you have a file with -Pod, then code, then more Pod, sometimes the code will be processed (via -whatever you have code_handler call) before the all of the preceding Pod -has been processed. - - -=item C<< $parser->cut_handler( I<CODE_REF> ) >> - -This is just like the code_handler attribute, except that it's for -"=cut" lines, not code lines. The same caveats apply. "=cut" lines are -unlikely to be interesting, but this is included for completeness. - - -=item C<< $parser->whine( I<linenumber>, I<complaint string> ) >> - -This notes a problem in the Pod, which will be reported to in the "Pod -Errors" section of the document and/or send to STDERR, depending on the -values of the attributes C<no_whining>, C<no_errata_section>, and -C<complain_stderr>. - -=item C<< $parser->scream( I<linenumber>, I<complaint string> ) >> - -This notes an error like C<whine> does, except that it is not -suppressable with C<no_whining>. This should be used only for very -serious errors. - - -=item C<< $parser->source_dead(1) >> - -This aborts parsing of the current document, by switching on the flag -that indicates that EOF has been seen. In particularly drastic cases, -you might want to do this. It's rather nicer than just calling -C<die>! - -=item C<< $parser->hide_line_numbers( I<SOMEVALUE> ) >> - -Some subclasses that indescriminately dump event attributes (well, -except for ones beginning with "~") can use this object attribute for -refraining to dump the "start_line" attribute. - -=item C<< $parser->no_whining( I<SOMEVALUE> ) >> - -This attribute, if set to true, will suppress reports of non-fatal -error messages. The default value is false, meaning that complaints -I<are> reported. How they get reported depends on the values of -the attributes C<no_errata_section> and C<complain_stderr>. - -=item C<< $parser->no_errata_section( I<SOMEVALUE> ) >> - -This attribute, if set to true, will suppress generation of an errata -section. The default value is false -- i.e., an errata section will be -generated. - -=item C<< $parser->complain_stderr( I<SOMEVALUE> ) >> - -This attribute, if set to true will send complaints to STDERR. The -default value is false -- i.e., complaints do not go to STDERR. - -=item C<< $parser->bare_output( I<SOMEVALUE> ) >> - -Some formatter subclasses use this as a flag for whether output should -have prologue and epilogue code omitted. For example, setting this to -true for an HTML formatter class should omit the -"<html><head><title>...</title><body>..." prologue and the -"</body></html>" epilogue. - -If you want to set this to true, you should probably also set -C<no_whining> or at least C<no_errata_section> to true. - -=item C<< $parser->preserve_whitespace( I<SOMEVALUE> ) >> - -If you set this attribute to a true value, the parser will try to -preserve whitespace in the output. This means that such formatting -conventions as two spaces after periods will be preserved by the parser. -This is primarily useful for output formats that treat whitespace as -significant (such as text or *roff, but not HTML). - -=back - - -=head1 SEE ALSO - -L<Pod::Simple> -- event-based Pod-parsing framework - -L<Pod::Simple::Methody> -- like Pod::Simple, but each sort of event -calls its own method (like C<start_head3>) - -L<Pod::Simple::PullParser> -- a Pod-parsing framework like Pod::Simple, -but with a token-stream interface - -L<Pod::Simple::SimpleTree> -- a Pod-parsing framework like Pod::Simple, -but with a tree interface - -L<Pod::Simple::Checker> -- a simple Pod::Simple subclass that reads -documents, and then makes a plaintext report of any errors found in the -document - -L<Pod::Simple::DumpAsXML> -- for dumping Pod documents as tidily -indented XML, showing each event on its own line - -L<Pod::Simple::XMLOutStream> -- dumps a Pod document as XML (without -introducing extra whitespace as Pod::Simple::DumpAsXML does). - -L<Pod::Simple::DumpAsText> -- for dumping Pod documents as tidily -indented text, showing each event on its own line - -L<Pod::Simple::LinkSection> -- class for objects representing the values -of the TODO and TODO attributes of LE<lt>...E<gt> elements - -L<Pod::Escapes> -- the module the Pod::Simple uses for evaluating -EE<lt>...E<gt> content - -L<Pod::Simple::Text> -- a simple plaintext formatter for Pod - -L<Pod::Simple::TextContent> -- like Pod::Simple::Text, but -makes no effort for indent or wrap the text being formatted - -L<perlpod|perlpod> - -L<perlpodspec|perlpodspec> - -L<perldoc> - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - - -=for notes -Hm, my old podchecker version (1.2) says: - *** WARNING: node 'http://search.cpan.org/' contains non-escaped | or / at line 38 in file Subclassing.pod - *** WARNING: node 'http://lists.perl.org/showlist.cgi?name=pod-people' contains non-escaped | or / at line 41 in file Subclassing.pod -Yes, L<...> is hard. - - -=cut - - diff --git a/web/bin/lib/Pod/Simple/Text.pm b/web/bin/lib/Pod/Simple/Text.pm deleted file mode 100644 index df82c07..0000000 --- a/web/bin/lib/Pod/Simple/Text.pm +++ /dev/null @@ -1,152 +0,0 @@ - -require 5; -package Pod::Simple::Text; -use strict; -use Carp (); -use Pod::Simple::Methody (); -use Pod::Simple (); -use vars qw( @ISA $VERSION $FREAKYMODE); -$VERSION = '2.02'; -@ISA = ('Pod::Simple::Methody'); -BEGIN { *DEBUG = defined(&Pod::Simple::DEBUG) - ? \&Pod::Simple::DEBUG - : sub() {0} - } - -use Text::Wrap 98.112902 (); -$Text::Wrap::wrap = 'overflow'; -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - $new->accept_target_as_text(qw( text plaintext plain )); - $new->nix_X_codes(1); - $new->nbsp_for_S(1); - $new->{'Thispara'} = ''; - $new->{'Indent'} = 0; - $new->{'Indentstring'} = ' '; - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub handle_text { $_[0]{'Thispara'} .= $_[1] } - -sub start_Para { $_[0]{'Thispara'} = '' } -sub start_head1 { $_[0]{'Thispara'} = '' } -sub start_head2 { $_[0]{'Thispara'} = '' } -sub start_head3 { $_[0]{'Thispara'} = '' } -sub start_head4 { $_[0]{'Thispara'} = '' } - -sub start_Verbatim { $_[0]{'Thispara'} = '' } -sub start_item_bullet { $_[0]{'Thispara'} = $FREAKYMODE ? '' : '* ' } -sub start_item_number { $_[0]{'Thispara'} = $FREAKYMODE ? '' : "$_[1]{'number'}. " } -sub start_item_text { $_[0]{'Thispara'} = '' } - -sub start_over_bullet { ++$_[0]{'Indent'} } -sub start_over_number { ++$_[0]{'Indent'} } -sub start_over_text { ++$_[0]{'Indent'} } -sub start_over_block { ++$_[0]{'Indent'} } - -sub end_over_bullet { --$_[0]{'Indent'} } -sub end_over_number { --$_[0]{'Indent'} } -sub end_over_text { --$_[0]{'Indent'} } -sub end_over_block { --$_[0]{'Indent'} } - - -# . . . . . Now the actual formatters: - -sub end_head1 { $_[0]->emit_par(-4) } -sub end_head2 { $_[0]->emit_par(-3) } -sub end_head3 { $_[0]->emit_par(-2) } -sub end_head4 { $_[0]->emit_par(-1) } -sub end_Para { $_[0]->emit_par( 0) } -sub end_item_bullet { $_[0]->emit_par( 0) } -sub end_item_number { $_[0]->emit_par( 0) } -sub end_item_text { $_[0]->emit_par(-2) } - -sub emit_par { - my($self, $tweak_indent) = splice(@_,0,2); - my $indent = ' ' x ( 2 * $self->{'Indent'} + 4 + ($tweak_indent||0) ); - # Yes, 'STRING' x NEGATIVE gives '', same as 'STRING' x 0 - - $self->{'Thispara'} =~ tr{\xAD}{}d if Pod::Simple::ASCII; - my $out = Text::Wrap::wrap($indent, $indent, $self->{'Thispara'} .= "\n"); - $out =~ tr{\xA0}{ } if Pod::Simple::ASCII; - print {$self->{'output_fh'}} $out, "\n"; - $self->{'Thispara'} = ''; - - return; -} - -# . . . . . . . . . . And then off by its lonesome: - -sub end_Verbatim { - my $self = shift; - if(Pod::Simple::ASCII) { - $self->{'Thispara'} =~ tr{\xA0}{ }; - $self->{'Thispara'} =~ tr{\xAD}{}d; - } - - my $i = ' ' x ( 2 * $self->{'Indent'} + 4); - #my $i = ' ' x (4 + $self->{'Indent'}); - - $self->{'Thispara'} =~ s/^/$i/mg; - - print { $self->{'output_fh'} } '', - $self->{'Thispara'}, - "\n\n" - ; - $self->{'Thispara'} = ''; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - - -__END__ - -=head1 NAME - -Pod::Simple::Text -- format Pod as plaintext - -=head1 SYNOPSIS - - perl -MPod::Simple::Text -e \ - "exit Pod::Simple::Text->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -This class is a formatter that takes Pod and renders it as -wrapped plaintext. - -Its wrapping is done by L<Text::Wrap>, so you can change -C<$Text::Wrap::columns> as you like. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::TextContent>, L<Pod::Text> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/TextContent.pm b/web/bin/lib/Pod/Simple/TextContent.pm deleted file mode 100644 index 3675b00..0000000 --- a/web/bin/lib/Pod/Simple/TextContent.pm +++ /dev/null @@ -1,87 +0,0 @@ - - -require 5; -package Pod::Simple::TextContent; -use strict; -use Carp (); -use Pod::Simple (); -use vars qw( @ISA $VERSION ); -$VERSION = '2.02'; -@ISA = ('Pod::Simple'); - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - $new->nix_X_codes(1); - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub _handle_element_start { - print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s; - return; -} - -sub _handle_text { - if( chr(65) eq 'A' ) { # in ASCIIworld - $_[1] =~ tr/\xAD//d; - $_[1] =~ tr/\xA0/ /; - } - print {$_[0]{'output_fh'}} $_[1]; - return; -} - -sub _handle_element_end { - print {$_[0]{'output_fh'}} "\n" unless $_[1] =~ m/^[A-Z]$/s; - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - - -__END__ - -=head1 NAME - -Pod::Simple::TextContent -- get the text content of Pod - -=head1 SYNOPSIS - - TODO - - perl -MPod::Simple::TextContent -e \ - "exit Pod::Simple::TextContent->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -This class is that parses Pod and dumps just the text content. It is -mainly meant for use by the Pod::Simple test suite, but you may find -some other use for it. - -This is a subclass of L<Pod::Simple> and inherits all its methods. - -=head1 SEE ALSO - -L<Pod::Simple>, L<Pod::Simple::Text>, L<Pod::Spell> - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Simple/TiedOutFH.pm b/web/bin/lib/Pod/Simple/TiedOutFH.pm deleted file mode 100644 index b031fe5..0000000 --- a/web/bin/lib/Pod/Simple/TiedOutFH.pm +++ /dev/null @@ -1,103 +0,0 @@ - -use strict; -package Pod::Simple::TiedOutFH; -use Symbol ('gensym'); -use Carp (); - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub handle_on { # some horrible frightening things are encapsulated in here - my $class = shift; - $class = ref($class) || $class; - - Carp::croak "Usage: ${class}->handle_on(\$somescalar)" unless @_; - - my $x = (defined($_[0]) and ref($_[0])) - ? $_[0] - : ( \( $_[0] ) )[0] - ; - $$x = '' unless defined $$x; - - #Pod::Simple::DEBUG and print "New $class handle on $x = \"$$x\"\n"; - - my $new = gensym(); - tie *$new, $class, $x; - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub TIEHANDLE { # Ties to just a scalar ref - my($class, $scalar_ref) = @_; - $$scalar_ref = '' unless defined $$scalar_ref; - return bless \$scalar_ref, ref($class) || $class; -} - -sub PRINT { - my $it = shift; - foreach my $x (@_) { $$$it .= $x } - - #Pod::Simple::DEBUG > 10 and print " appended to $$it = \"$$$it\"\n"; - - return 1; -} - -sub FETCH { - return ${$_[0]}; -} - -sub PRINTF { - my $it = shift; - my $format = shift; - $$$it .= sprintf $format, @_; - return 1; -} - -sub FILENO { ${ $_[0] } + 100 } # just to produce SOME number - -sub CLOSE { 1 } - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1; -__END__ - -Chole - - * 1 large red onion - * 2 tomatillos - * 4 or 5 roma tomatoes (optionally with the pulp discarded) - * 1 tablespoons chopped ginger root (or more, to taste) - * 2 tablespoons canola oil (or vegetable oil) - - * 1 tablespoon garam masala - * 1/2 teaspoon red chili powder, or to taste - * Salt, to taste (probably quite a bit) - * 2 (15-ounce) cans chick peas or garbanzo beans, drained and rinsed - * juice of one smallish lime - * a dash of balsamic vinegar (to taste) - * cooked rice, preferably long-grain white rice (whether plain, - basmati rice, jasmine rice, or even a mild pilaf) - -In a blender or food processor, puree the onions, tomatoes, tomatillos, -and ginger root. You can even do it with a Braun hand "mixer", if you -chop things finer to start with, and work at it. - -In a saucepan set over moderate heat, warm the oil until hot. - -Add the puree and the balsamic vinegar, and cook, stirring occasionally, -for 20 to 40 minutes. (Cooking it longer will make it sweeter.) - -Add the Garam Masala, chili powder, and cook, stirring occasionally, for -5 minutes. - -Add the salt and chick peas and cook, stirring, until heated through. - -Stir in the lime juice, and optionally one or two teaspoons of tahini. -You can let it simmer longer, depending on how much softer you want the -garbanzos to get. - -Serve over rice, like a curry. - -Yields 5 to 7 servings. - - diff --git a/web/bin/lib/Pod/Simple/Transcode.pm b/web/bin/lib/Pod/Simple/Transcode.pm deleted file mode 100644 index 434f963..0000000 --- a/web/bin/lib/Pod/Simple/Transcode.pm +++ /dev/null @@ -1,33 +0,0 @@ - -require 5; -package Pod::Simple::Transcode; - -BEGIN { - if(defined &DEBUG) {;} # Okay - elsif( defined &Pod::Simple::DEBUG ) { *DEBUG = \&Pod::Simple::DEBUG; } - else { *DEBUG = sub () {0}; } -} - -foreach my $class ( - 'Pod::Simple::TranscodeSmart', - 'Pod::Simple::TranscodeDumb', - '', -) { - $class or die "Couldn't load any encoding classes"; - DEBUG and print "About to try loading $class...\n"; - eval "require $class;"; - if($@) { - DEBUG and print "Couldn't load $class: $@\n"; - } else { - DEBUG and print "OK, loaded $class.\n"; - @ISA = ($class); - last; - } -} - -sub _blorp { return; } # just to avoid any "empty class" warning - -1; -__END__ - - diff --git a/web/bin/lib/Pod/Simple/TranscodeDumb.pm b/web/bin/lib/Pod/Simple/TranscodeDumb.pm deleted file mode 100644 index d5eb7e5..0000000 --- a/web/bin/lib/Pod/Simple/TranscodeDumb.pm +++ /dev/null @@ -1,63 +0,0 @@ - -require 5; -## This module is to be use()'d only by Pod::Simple::Transcode - -package Pod::Simple::TranscodeDumb; -use strict; -use vars qw($VERSION %Supported); -$VERSION = '2.02'; -# This module basically pretends it knows how to transcode, except -# only for null-transcodings! We use this when Encode isn't -# available. - -%Supported = ( - 'ascii' => 1, - 'ascii-ctrl' => 1, - 'iso-8859-1' => 1, - 'null' => 1, - 'latin1' => 1, - 'latin-1' => 1, - %Supported, -); - -sub is_dumb {1} -sub is_smart {0} - -sub all_encodings { - return sort keys %Supported; -} - -sub encoding_is_available { - return exists $Supported{lc $_[1]}; -} - -sub encmodver { - return __PACKAGE__ . " v" .($VERSION || '?'); -} - -sub make_transcoder { - my($e) = $_[1]; - die "WHAT ENCODING!?!?" unless $e; - my $x; - return sub {; - #foreach $x (@_) { - # if(Pod::Simple::ASCII and !Pod::Simple::UNICODE and $] > 5.005) { - # # We're in horrible gimp territory, so we need to knock out - # # all the highbit things - # $x = - # pack 'C*', - # map {; ($_ < 128) ? $_ : 0x7e } - # unpack "C*", - # $x - # ; - # } - #} - # - #return; - }; -} - - -1; - - diff --git a/web/bin/lib/Pod/Simple/TranscodeSmart.pm b/web/bin/lib/Pod/Simple/TranscodeSmart.pm deleted file mode 100644 index 3fc26a4..0000000 --- a/web/bin/lib/Pod/Simple/TranscodeSmart.pm +++ /dev/null @@ -1,42 +0,0 @@ - -require 5; -use 5.008; -## Anything before 5.8.0 is GIMPY! -## This module is to be use()'d only by Pod::Simple::Transcode - -package Pod::Simple::TranscodeSmart; -use strict; -use Pod::Simple; -require Encode; - -sub is_dumb {0} -sub is_smart {1} - -sub all_encodings { - return Encode::->encodings(':all'); -} - -sub encoding_is_available { - return Encode::resolve_alias($_[1]); -} - -sub encmodver { - return "Encode.pm v" .($Encode::VERSION || '?'); -} - -sub make_transcoder { - my($e) = $_[1]; - die "WHAT ENCODING!?!?" unless $e; - my $x; - return sub { - foreach $x (@_) { - $x = Encode::decode($e, $x); - } - return; - }; -} - - -1; - - diff --git a/web/bin/lib/Pod/Simple/XMLOutStream.pm b/web/bin/lib/Pod/Simple/XMLOutStream.pm deleted file mode 100644 index 1e7ec15..0000000 --- a/web/bin/lib/Pod/Simple/XMLOutStream.pm +++ /dev/null @@ -1,157 +0,0 @@ - -require 5; -package Pod::Simple::XMLOutStream; -use strict; -use Carp (); -use Pod::Simple (); -use vars qw( $ATTR_PAD @ISA $VERSION $SORT_ATTRS); -$VERSION = '2.02'; -BEGIN { - @ISA = ('Pod::Simple'); - *DEBUG = \&Pod::Simple::DEBUG unless defined &DEBUG; -} - -$ATTR_PAD = "\n" unless defined $ATTR_PAD; - # Don't mess with this unless you know what you're doing. - -$SORT_ATTRS = 0 unless defined $SORT_ATTRS; - -sub new { - my $self = shift; - my $new = $self->SUPER::new(@_); - $new->{'output_fh'} ||= *STDOUT{IO}; - #$new->accept_codes('VerbatimFormatted'); - return $new; -} - -#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -sub _handle_element_start { - # ($self, $element_name, $attr_hash_r) - my $fh = $_[0]{'output_fh'}; - my($key, $value); - DEBUG and print "++ $_[1]\n"; - print $fh "<", $_[1]; - if($SORT_ATTRS) { - foreach my $key (sort keys %{$_[2]}) { - unless($key =~ m/^~/s) { - next if $key eq 'start_line' and $_[0]{'hide_line_numbers'}; - _xml_escape($value = $_[2]{$key}); - print $fh $ATTR_PAD, $key, '="', $value, '"'; - } - } - } else { # faster - while(($key,$value) = each %{$_[2]}) { - unless($key =~ m/^~/s) { - next if $key eq 'start_line' and $_[0]{'hide_line_numbers'}; - _xml_escape($value); - print $fh $ATTR_PAD, $key, '="', $value, '"'; - } - } - } - print $fh ">"; - return; -} - -sub _handle_text { - DEBUG and print "== \"$_[1]\"\n"; - if(length $_[1]) { - my $text = $_[1]; - _xml_escape($text); - print {$_[0]{'output_fh'}} $text; - } - return; -} - -sub _handle_element_end { - DEBUG and print "-- $_[1]\n"; - print {$_[0]{'output_fh'}} "</", $_[1], ">"; - return; -} - -# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -sub _xml_escape { - foreach my $x (@_) { - # Escape things very cautiously: - $x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg; - # Yes, stipulate the list without a range, so that this can work right on - # all charsets that this module happens to run under. - # Altho, hmm, what about that ord? Presumably that won't work right - # under non-ASCII charsets. Something should be done about that. - } - return; -} - -#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -1; - -__END__ - -=head1 NAME - -Pod::Simple::XMLOutStream -- turn Pod into XML - -=head1 SYNOPSIS - - perl -MPod::Simple::XMLOutStream -e \ - "exit Pod::Simple::XMLOutStream->filter(shift)->any_errata_seen" \ - thingy.pod - -=head1 DESCRIPTION - -Pod::Simple::XMLOutStream is a subclass of L<Pod::Simple> that parses -Pod and turns it into XML. - -Pod::Simple::XMLOutStream inherits methods from -L<Pod::Simple>. - - -=head1 SEE ALSO - -L<Pod::Simple::DumpAsXML> is rather like this class; see its -documentation for a discussion of the differences. - -L<Pod::Simple>, L<Pod::Simple::DumpAsXML>, L<Pod::SAX> - -L<Pod::Simple::Subclassing> - -The older (and possibly obsolete) libraries L<Pod::PXML>, L<Pod::XML> - - -=head1 ABOUT EXTENDING POD - -TODO: An example or two of =extend, then point to Pod::Simple::Subclassing - - -=head1 ASK ME! - -If you actually want to use Pod as a format that you want to render to -XML (particularly if to an XML instance with more elements than normal -Pod has), please email me (C<sburke@cpan.org>) and I'll probably have -some recommendations. - -For reasons of concision and energetic laziness, some methods and -options in this module (and the dozen modules it depends on) are -undocumented; but one of those undocumented bits might be just what -you're looking for. - - -=head1 COPYRIGHT AND DISCLAIMERS - -Copyright (c) 2002-4 Sean M. Burke. All rights reserved. - -This library is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -This program is distributed in the hope that it will be useful, but -without any warranty; without even the implied warranty of -merchantability or fitness for a particular purpose. - -=head1 AUTHOR - -Sean M. Burke C<sburke@cpan.org> - -=cut - diff --git a/web/bin/lib/Pod/Xhtml.pm b/web/bin/lib/Pod/Xhtml.pm deleted file mode 100644 index d83cc24..0000000 --- a/web/bin/lib/Pod/Xhtml.pm +++ /dev/null @@ -1,908 +0,0 @@ -# $Id: Xhtml.pm,v 1.59 2007/08/02 12:24:15 andreww Exp $ -package Pod::Xhtml; - -use strict; -use Pod::Parser; -use Pod::ParseUtils; -use Carp; -use vars qw/@ISA %COMMANDS %SEQ $VERSION $FirstAnchorId $ContentSuffix/; -use constant P2X_REGION => qr/(?:pod2)?xhtml/; - -$FirstAnchorId = "TOP"; -$ContentSuffix = "-CONTENT"; - -@ISA = qw(Pod::Parser); -($VERSION) = ('$Revision: 1.59 $' =~ m/([\d\.]+)/); - -# recognized commands -%COMMANDS = map { $_ => 1 } qw(pod head1 head2 head3 head4 item over back for begin end); - -# recognized special sequences -%SEQ = ( - B => \&seqB, - C => \&seqC, - E => \&seqE, - F => \&seqF, - I => \&seqI, - L => \&seqL, - S => \&seqS, - X => \&seqX, - Z => \&seqZ, -); - - -########## New PUBLIC methods for this class -sub asString { my $self = shift; return $self->{buffer}; } -sub asStringRef { my $self = shift; return \$self->{buffer}; } -sub addHeadText { my $self = shift; $self->{HeadText} .= shift; } -sub addBodyOpenText { my $self = shift; $self->{BodyOpenText} .= shift; } -sub addBodyCloseText { my $self = shift; $self->{BodyCloseText} .= shift; } - -########## Override methods in Pod::Parser -########## PUBLIC INTERFACE -sub parse_from_file { - my $self = shift; - $self->resetMe; - $self->SUPER::parse_from_file(@_); -} - -sub parse_from_filehandle { - my $self = shift; - $self->resetMe; - $self->SUPER::parse_from_filehandle(@_); -} - -########## INTERNALS -sub initialize { - my $self = shift; - - $self->{TopLinks} = qq(<p><a href="#<<<G?$FirstAnchorId>>>" class="toplink">Top</a></p>) unless defined $self->{TopLinks}; - $self->{MakeIndex} = 1 unless defined $self->{MakeIndex}; - $self->{MakeMeta} = 1 unless defined $self->{MakeMeta}; - $self->{FragmentOnly} = 0 unless defined $self->{FragmentOnly}; - $self->{HeadText} = $self->{BodyOpenText} = $self->{BodyCloseText} = ''; - $self->{LinkParser} ||= new Pod::Hyperlink; - $self->{TopHeading} ||= 1; - $self->{TopHeading} = int $self->{TopHeading}; # heading level must be an integer - croak "TopHeading must be greater than zero" if $self->{TopHeading} < 1; # (prevent negative heading levels) - $self->SUPER::initialize(); -} - -sub command { - my ($parser, $command, $paragraph, $line_num, $pod_para) = @_; - my $ptree = $parser->parse_text( $paragraph, $line_num ); - $pod_para->parse_tree( $ptree ); - $parser->parse_tree->append( $pod_para ); -} - -sub verbatim { - my ($parser, $paragraph, $line_num, $pod_para) = @_; - $parser->parse_tree->append( $pod_para ); -} - -sub textblock { - my ($parser, $paragraph, $line_num, $pod_para) = @_; - my $ptree = $parser->parse_text( $paragraph, $line_num ); - $pod_para->parse_tree( $ptree ); - $parser->parse_tree->append( $pod_para ); -} - -sub end_pod { - my $self = shift; - my $ptree = $self->parse_tree; - - # clean up tree ready for parse - foreach my $para (@$ptree) { - if ($para->{'-prefix'} eq '=') { - $para->{'TYPE'} = 'COMMAND'; - } elsif (! @{$para->{'-ptree'}}) { - $para->{'-ptree'}->[0] = $para->{'-text'}; - $para->{'TYPE'} = 'VERBATIM'; - } else { - $para->{'TYPE'} = 'TEXT'; - } - foreach (@{$para->{'-ptree'}}) { - unless (ref $_) { s/\n\s+$//; } - } - } - - # now loop over each para and expand any html escapes or sequences - $self->_paraExpand( $_ ) foreach (@$ptree); - - $self->{buffer} =~ s/(\n?)<\/pre>\s*<pre>/$1/sg; # concatenate 'pre' blocks - 1 while $self->{buffer} =~ s/<pre>(\s+)<\/pre>/$1/sg; - $self->{buffer} = $self->_makeIndex . $self->{buffer} if $self->{MakeIndex}; - $self->{buffer} =~ s/<<<G\?($FirstAnchorId)>>>/$1/ge; - $self->{buffer} = join "\n", qq[<div class="pod">], $self->{buffer}, - ( @{ $self->{sections} } > 1 && "</div>" ), "</div>"; - - # Expand internal L<> links to the correct sections - $self->{buffer} =~ s/#<<<(.*?)>>>/'#' . $self->_findSection($1)/eg; - die "gotcha" if $self->{buffer} =~ /#<<</; - - my $headblock = sprintf "%s\n%s\n%s\n\t<title>%s</title>\n", - qq(<?xml version="1.0" encoding="UTF-8"?>), - qq(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">), - qq(<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n<head>), - _htmlEscape( $self->{doctitle} ); - $headblock .= $self->_makeMeta if $self->{MakeMeta}; - - unless ($self->{FragmentOnly}) { - $self->{buffer} = $headblock . $self->{HeadText} . "</head>\n<body>\n" . $self->{BodyOpenText} . $self->{buffer}; - $self->{buffer} .= $self->{BodyCloseText} . "</body>\n</html>\n"; - } - - # in stringmode we only accumulate the XHTML else we print it to the - # filehandle - unless ($self->{StringMode}) { - my $out_fh = $self->output_handle; - print $out_fh $self->{buffer}; - } -} - -########## Everything else is PRIVATE -sub resetMe { - my $self = shift; - $self->{'-ptree'} = new Pod::ParseTree; - $self->{'sections'} = []; - $self->{'listKind'} = []; - $self->{'listHasItems'} = []; - $self->{'dataSections'} = []; - $self->{'section_names'} = {}; - $self->{'section_ids'} = {}; - $self->{'tagStack'} = []; - - foreach (qw(inList titleflag )) { $self->{$_} = 0; } - foreach (qw(buffer doctitle)) { $self->{$_} = ''; } - - # add the "$FirstAnchor" section into the sections - $self->_addSection ( '', $FirstAnchorId ); -} - -sub parse_tree { return $_[0]->{'-ptree'}; } - -sub _paraExpand { - my $self = shift; - my $para = shift; - - # skip data region unless its ident matches P2X_REGION (eg xhtml) - my $in_dsection = !!(@{$self->{dataSections}}); - my $p2x_region = $in_dsection && $self->{dataSections}->[-1] =~ P2X_REGION; - my $skip_region = $in_dsection && !$p2x_region; - - # collapse interior sequences and strings - # escape html unless it's a html data region - foreach ( @{$para->{'-ptree'}} ) { - $_ = (ref $_) ? $self->_handleSequence($_, $p2x_region) : - $p2x_region ? $_ : _htmlEscape($_); - } - # the parse tree has now been collapsed into a list of strings - my $string = join('', @{$para->{'-ptree'}}); - - if ($para->{TYPE} eq 'TEXT') { - return if $skip_region; - $self->_addTextblock($string, $p2x_region); - } elsif ($para->{TYPE} eq 'VERBATIM') { - return if $skip_region; - my $paragraph = "<pre>$string\n\n</pre>"; - $self->_addTextblock( $paragraph, 1 ); # no wrap - if ($self->{titleflag} != 0) { - $self->_setTitle( $paragraph ); - warn "NAME followed by verbatim paragraph"; - } - } elsif ($para->{TYPE} eq 'COMMAND') { - $self->_addCommand($para->{'-name'}, $string, $para->{'-text'}, $para->{'-line'} ) - } else { - warn "Unrecognized paragraph type $para->{TYPE} found at $self->{_INFILE} line $para->{'-line'}\n"; - } -} - -sub _addCommand { - my $self = shift; - my ($command, $paragraph, $raw_para, $line) = @_; - my $anchor; - - unless (exists $COMMANDS{$command}) { - warn "Unrecognized command '$command' skipped at $self->{_INFILE} line $line\n"; - return; - } - - for ($command) { - my $data_para = @{$self->{dataSections}}; # inside a data paragraph? - /^head1/ && !$data_para && do { - my $top_heading = 'h'. $self->{TopHeading}; - $top_heading = 'h1' if !$self->{FragmentOnly}; # ignore TopHeading when not in fragment mode - - # if ANY sections are open then close the previously opened div - $self->{buffer} .= "\n</div>\n" unless ( @{ $self->{sections} } == 1 ); - - $anchor = $self->_addSection( 'head1', $paragraph ); - my $anchorContent = $self->_addSection( '', $paragraph . $ContentSuffix); - - $self->{buffer} .= qq(<$top_heading id="$anchor">$paragraph</$top_heading>) - .($self->{TopLinks} ? $self->{TopLinks} : '')."\n" - ."<div id=\"$anchorContent\">\n"; - - if ($anchor eq 'NAME') { $self->{titleflag} = 1; } - last; - }; - /^head([234])/ && !$data_para && do { - my $head_level = $1; - if($self->{FragmentOnly}){ - $head_level += ($self->{TopHeading} - 1); - $head_level = 6 if $head_level > 6; - } - # if ANY sections are open then close the previously opened div - $self->{buffer} .= "\n</div>\n" unless ( @{ $self->{sections} } == 1 ); - - $anchor = $self->_addSection( "head${head_level}", $paragraph ); - my $anchorContent = $self->_addSection( '', $paragraph . $ContentSuffix); - - $self->{buffer} .= "<h${head_level} id=\"$anchor\">$paragraph</h${head_level}>\n" . "<div id=\"$anchorContent\">\n"; - last; - }; - /^item/ && !$data_para && do { - unless ($self->{inList}) { - warn "Not in list at $self->{_INFILE} line $line\n"; - last; - } - - $self->{listHasItems}[-1]++; - $self->{listCurrentParas}[-1] = 0; - - # is this the first item in the list? - if (@{$self->{listKind}} && $self->{listKind}[-1] == 0) { - my $parent_list = $self->{listKind}[-2]; # this is a sub-list - if ($parent_list && $parent_list == 1) { - # <ul> sub lists must be in an <li> [BEGIN] - $self->{buffer} .= $self->_tagLevel () . "<li>\n"; - push @{$self->{tagStack}}, "li"; - } elsif ($parent_list && $parent_list == 2) { - # <dl> sub lists must be in a <p> [BEGIN] - $self->{buffer} .= $self->_tagLevel () . "<p>\n"; - push @{$self->{tagStack}}, "p"; - } - - if ($paragraph eq '*') { - $self->{listKind}[-1] = 1; - $self->{buffer} .= $self->_tagLevel () . "<ul>\n"; - push @{$self->{tagStack}}, "ul"; - } else { - $self->{listKind}[-1] = 2; - $self->{buffer} .= $self->_tagLevel () . "<dl>\n"; - push @{$self->{tagStack}}, "dl"; - } - } else { - # close last list item's tag# - if ($self->{listKind}[-1] == 1) { - my $o = pop @{$self->{tagStack}}; - warn "expected 'li' to be on the tag stack but got '$o'\n" - if $o ne 'li'; - $self->{buffer} .= $self->_tagLevel () . "</li>\n"; - } - } - if (@{$self->{listKind}} && $self->{listKind}[-1] == 2) { - if (@{$self->{tagStack}} && $self->{tagStack}[-1] eq "dd") { - my $o = pop @{$self->{tagStack}}; - warn "expected 'dd' to be on the tag stack but got '$o'\n" - if $o ne 'dd'; - $self->{buffer} .= $self->_tagLevel () . "</dd>\n"; - } - $self->{buffer} .= $self->_tagLevel () . qq(<dt); - push @{$self->{tagStack}}, "dt"; - if ($self->{MakeIndex} >= 2) { - $anchor = $self->_addSection( 'item', $paragraph ); - $self->{buffer} .= qq( id="$anchor"); - } - $self->{buffer} .= ">"; - $self->{buffer} .= qq($paragraph</dt>\n); - my $o = pop @{$self->{tagStack}}; - warn "expected 'dt' to be on the tag stack but got '$o'\n" - if $o ne 'dt'; - } - last; - }; - /^over/ && !$data_para && do { - $self->{inList}++; - push @{$self->{listKind}}, 0; - push @{$self->{listHasItems}}, 0; - push @{$self->{sections}}, 'over' if $self->{MakeIndex} >= 2; - push @{$self->{listCurrentParas}}, 0; - }; - /^back/ && !$data_para && do { - my $listItems = pop @{$self->{listHasItems}}; - if (--$self->{inList} < 0) { - warn "=back commands don't balance =overs at $self->{_INFILE} line $line\n"; - last; - } elsif ($listItems == 0) { - warn "empty list at $self->{_INFILE} line $line\n"; - last; - } elsif (@{$self->{listKind}} && $self->{listKind}[-1] == 1) { - my $o = pop @{$self->{tagStack}}; - warn "expected 'li' to be on the tag stack but got '$o'\n" - if $o ne 'li'; - $o = pop @{$self->{tagStack}}; - warn "expected 'ul' to be on the tag stack but got '$o'\n" - if $o ne 'ul'; - $self->{buffer} .= "</li>\n</ul>\n\n"; - } else { - while (@{$self->{tagStack}} && $self->{tagStack}[-1] eq "dd") { - pop @{$self->{tagStack}}; - $self->{buffer} .=$self->_tagLevel () . "</dd>\n"; - } - my $o = pop @{$self->{tagStack}}; - warn "expected 'dl' to be on the tag stack but got '$o'\n" - if $o ne 'dl'; - $self->{buffer} .= $self->_tagLevel () . "</dl>\n"; - } - - my $parent_list = $self->{listKind}[-2]; # this is a sub-list - if ($parent_list && $parent_list == 1) { - my $o = pop @{$self->{tagStack}}; - warn "expected 'li' to be on the tag stack but got '$o'\n" - if $o ne 'li'; - # <ul> sub lists must be in an <li> [END] - $self->{buffer} .= $self->_tagLevel () . "</li>\n"; - } - if ($parent_list && $parent_list == 2) { - my $o = pop @{$self->{tagStack}}; - warn "expected 'p' to be on the tag stack but got '$o'\n" - if $o ne 'p'; - # <dl> sub lists must be in a <p> [END] - $self->{buffer} .= $self->_tagLevel () . "</p>\n"; - } - - if ( $self->{MakeIndex} >= 2 ) { - if ( ! ref $self->{sections}->[ -1 ] ) { - if ( $self->{sections}->[ -1 ] =~ /^over$/i ) { - pop @{ $self->{sections} }; - } - } else { - if ( $self->{sections}->[ -1 ] [ 0 ] =~ /^item$/i ) { - push @{ $self->{sections} }, 'back'; - } - } - } - - pop @{$self->{listKind}}; - pop @{$self->{listCurrentParas}}; - last; - }; - /^for/ && !$data_para && do { - my($ident, $html) = $raw_para =~ /^\s*(\S+)\s+(.*)/; - $html = undef unless $ident =~ P2X_REGION; - $self->{buffer} .= $html if $html; - }; - /^begin/ && !$data_para && do { - my ($ident) = $paragraph =~ /(\S+)/; - push @{$self->{dataSections}}, $ident; - last; - }; - /^end/ && do { - my ($ident) = $paragraph =~ /(\S+)/; - unless (@{$self->{dataSections}}) { - warn "no corresponding '=begin $ident' marker at $self->{_INFILE} line $line\n"; - last; - } - my $current_section = $self->{dataSections}[-1]; - unless ($current_section eq $ident) { - warn "'=end $ident' doesn't match '=begin $current_section' at $self->{_INFILE} line $line\n"; - last; - } - pop @{$self->{dataSections}}; - last; - }; - } -} - -sub _addTextblock { - my $self = shift; - my($paragraph, $no_wrap) = @_; - - if ($self->{titleflag} != 0) { $self->_setTitle( $paragraph ); } - - # DON'T wrap a paragraph in a <p> if it's a <pre>! - $no_wrap = 1 if $paragraph =~ m/^\s*<pre>/im; - - if (! @{$self->{listKind}} || $self->{listKind}[-1] == 0) { - if (!$no_wrap) { - $self->{buffer} .= $self->_tagLevel () . "<p>$paragraph</p>\n"; - } else { - $self->{buffer} .= "$paragraph\n"; - } - } elsif (@{$self->{listKind}} && $self->{listKind}[-1] == 1) { - if ($self->{listCurrentParas}[-1]++ == 0) { - # should this list item be closed? - push @{$self->{tagStack}}, "li"; - $self->{buffer} .= $self->_tagLevel () . "<li>$paragraph"; - } else { - $self->{buffer} .= "\n<br /><br />$paragraph"; - } - } else { - if ($self->{listCurrentParas}[-1]++ == 0) { - $self->{buffer} .= $self->_tagLevel () . "<dd>\n"; - push @{$self->{tagStack}}, "dd"; - } - - if (!$no_wrap) { - $self->{buffer} .= $self->_tagLevel () . "<p>$paragraph</p>\n"; - } else { - $self->{buffer} .= "$paragraph\n"; - } - } -} - -sub _tagLevel { - my $self = shift; - return ( "\t" x scalar @{$self->{tagStack}} ); -} - -# expand interior sequences recursively, bottom up -sub _handleSequence { - my $self = shift; - my($seq, $no_escape) = @_; - my $buffer = ''; - - foreach (@{$seq->{'-ptree'}}) { - if (ref $_) { - $buffer .= $self->_handleSequence($_); - } else { - $buffer .= $no_escape ? $_ : _htmlEscape($_); - } - } - - unless (exists $SEQ{$seq->{'-name'}}) { - warn "Unrecognized special sequence '$seq->{'-name'}' skipped at $self->{_INFILE} line $seq->{'-line'}\n"; - return $buffer; - } - return $SEQ{$seq->{'-name'}}->($self, $buffer); -} - -sub _makeIndexId { - my $arg = shift; - - $arg =~ s/\W+/_/g; - $arg =~ s/^_+|_+$//g; - $arg =~ s/__+/_/g; - $arg = substr($arg, 0, 36); - return $arg; -} - -sub _addSection { - my $self = shift; - my ($type, $htmlarg) = @_; - return unless defined $htmlarg; - - my $index_id; - if ($self->{section_names}{$htmlarg}) { - $index_id = $self->{section_names}{$htmlarg}; - } else { - $index_id = _makeIndexId($htmlarg); - } - - if ($self->{section_ids}{$index_id}++) { - $index_id .= "-" . $self->{section_ids}{$index_id}; - } - - # if {section_names}{$htmlarg} is already set then this is a duplicate 'id', - # so keep the reference to the first one - $self->{section_names}{$htmlarg} = $index_id - unless exists $self->{section_names}{$htmlarg}; - - push( @{$self->{sections}}, [$type, $index_id, $htmlarg]); - return $index_id; -} - -sub _findSection { - my $self = shift; - my ($htmlarg) = @_; - - my $index_id; - if ($index_id = $self->{section_names}{$htmlarg}) { - return $index_id; - } else { - return _makeIndexId($htmlarg); - } -} - -sub _get_elem_level { - my $elem = shift; - if (ref($elem)) { - my $type = $elem->[0]; - if ($type =~ /^head(\d+)$/) { - return $1; - } else { - return 0; - } - } else { - return 0; - } -} - -sub _makeTabbing { - my $level = shift || 0; - - return "\n" . ( "\t" x $level ); -} - -sub _makeIndex { - my $self = shift; - - my $string = "<!-- INDEX START -->\n<h3 id=\"$FirstAnchorId\">Index</h3>\n"; - - my $previous_level = 0; - my $previous_section = ''; - - SECTION: foreach my $section ( @{ $self->{sections} } ) - { - my $this_level = 0; - - if ( ! ref $section ) - { - for ( $section ) - { - if ( $section =~ m/^over$/i ) - { - $previous_level++; - $string .= ( $previous_section ne 'over' && "</li>\n" ) . - "<li>\n<ul>\n"; - } - elsif ( $section =~ m/^back$/i ) - { - $previous_level--; - $string .= "\n</li>\n</ul>"; - } - } - - $previous_section = $section; - } - else - { - my ( $type, $href, $name ) = @$section; - - if ( $section->[ 0 ] =~ m/^item$/i ) - { - $this_level = $previous_level; - } - else - { - $this_level = _get_elem_level ( $section ); - } - - next SECTION if $this_level == 0; - - if ( $this_level > $previous_level ) - { - # open new list(s) - $string .= "\n<ul>" . - ( "\n<li>\n<ul>" ) x ( $this_level - $previous_level - 1 ); - } - elsif ( $this_level < $previous_level ) - { - # close list(s) - $string .= "</li>\n" . - ( "</ul>\n</li>\n" ) x ( $previous_level - $this_level ); - } - else - { - $string .= "</li>\n" unless $previous_section =~ /^over$/i; - } - - $string .= '<li><a href="#' . $href . '">' . $name . '</a>'; - - $previous_level = $this_level; - - $previous_section = ( ref $section ? $section->[ 0 ] : $section ); - } - } - - $string .= ( "\n</li>\n</ul>" x $previous_level ); - $string .= "<hr />\n<!-- INDEX END -->\n\n"; - - return $string; -} - -sub _makeMeta { - my $self = shift; - return - qq(\t<meta name="description" content="Pod documentation for ) . _htmlEscape( $self->{doctitle} ) . qq(" />\n) - . qq(\t<meta name="inputfile" content=") . _htmlEscape( $self->input_file ) . qq(" />\n) - . qq(\t<meta name="outputfile" content=") . _htmlEscape( $self->output_file ) . qq(" />\n) - . qq(\t<meta name="created" content=") . _htmlEscape( scalar(localtime) ) . qq(" />\n) - . qq(\t<meta name="generator" content="Pod::Xhtml $VERSION" />\n); -} - -sub _setTitle { - my $self = shift; - my $paragraph = shift; - - if ($paragraph =~ m/^(.+?) - /) { - $self->{doctitle} = $1; - } elsif ($paragraph =~ m/^(.+?): /) { - $self->{doctitle} = $1; - } elsif ($paragraph =~ m/^(.+?)\.pm/) { - $self->{doctitle} = $1; - } else { - $self->{doctitle} = substr($paragraph, 0, 80); - } - $self->{titleflag} = 0; -} - -sub _htmlEscape { - my $txt = shift; - $txt =~ s/&/&/g; - $txt =~ s/</</g; - $txt =~ s/>/>/g; - $txt =~ s/\"/"/g; - return $txt; -} - -########## Sequence handlers -sub seqI { return '<i>' . $_[1] . '</i>'; } -sub seqB { return '<strong>' . $_[1] . '</strong>'; } -sub seqC { return '<code>' . $_[1] . '</code>'; } -sub seqF { return '<cite>' . $_[1] . '</cite>'; } -sub seqZ { return ''; } - -sub seqL { - my ($self, $link) = @_; - $self->{LinkParser}->parse( $link ); - - my $page = $self->{LinkParser}->page; - my $kind = $self->{LinkParser}->type; - my $string = ''; - - if ($kind eq 'hyperlink') { #easy, a hyperlink - my $targ = $self->{LinkParser}->node; - my $text = $self->{LinkParser}->text; - $string = qq(<a href="$targ">$text</a>); - } elsif ($kind =~ m/^bounceurl:(.+)$/) { - # Our link-parser has decided that the link should be handled by a particular URL - my $url = $1; - $url = _htmlEscape( $url ); # since the URL may contain ampersands - $string = $self->{LinkParser}->markup; - if ($string =~ m/P<.+>/) { # when there's no alternative text we get P, and maybe Q - $string =~ s|Q<(.+?)>|<strong class="pod_xhtml_bounce_url_text">$1</strong>|; - $string =~ s|P<(.+?)>|<a class="pod_xhtml_bounce_url" href="$url">$1</a>|; - } else { - $string =~ s|Q<(.+?)>|<a class="pod_xhtml_bounce_url" href="$url">$1</a>|; - } - } elsif ($page eq '') { # a link to this page - # Post-process these links so we can things up to the correct sections - my $targ = $self->{LinkParser}->node; - $string = $self->{LinkParser}->markup; - $string =~ s|Q<(.+?)>|<a href="#<<<$targ>>>">$1</a>|; - } elsif ($link !~ /\|/) { # a link off-page with _no_ alt text - $string = $self->{LinkParser}->markup; - $string =~ s|Q<(.+?)>|<b>$1</b>|; - $string =~ s|P<(.+?)>|<cite>$1</cite>|; - } else { # a link off-page with alt text - my $text = _htmlEscape( $self->{LinkParser}->text ); - my $targ = _htmlEscape( $self->{LinkParser}->node ); - $string = "<b>$text</b> ("; - $string .= "<b>$targ</b> in " if $targ; - $string .= "<cite>$page</cite>)"; - } - return $string; -} - -sub seqS { - my $text = $_[1]; - $text =~ s/\s/ /g; - return $text; -} - -sub seqX { - my $self = shift; - my $arg = shift; - my $anchor = $self->_addSection( 'head1', $arg ); - return qq[<span id="$anchor">$arg</span>]; -} - -sub seqE { - my $self = shift; - my $arg = shift; - my $rv; - - if ($arg eq 'sol') { - $rv = '/'; - } elsif ($arg eq 'verbar') { - $rv = '|'; - } elsif ($arg =~ /^\d$/) { - $rv = "&#$arg;"; - } elsif ($arg =~ /^0?x(\d+)$/) { - $rv = $1; - } else { - $rv = "&$arg;"; - } - return $rv; -} -1; -__END__ - -=head1 NAME - -Pod::Xhtml - Generate well-formed XHTML documents from POD format documentation - -=head1 SYNOPSIS - -This module inherits from Pod::Parser, hence you can use this familiar -interface: - - use Pod::Xhtml; - my $parser = new Pod::Xhtml; - $parser->parse_from_file( $infile, $outfile ); - - # or use filehandles instead - $parser->parse_from_filehandle($in_fh, $out_fh); - - # or get the XHTML as a scalar - my $parsertoo = new Pod::Xhtml( StringMode => 1 ); - $parsertoo->parse_from_file( $infile, $outfile ); - my $xhtml = $parsertoo->asString; - - # or get a reference to the XHTML string - my $xhtmlref = $parsertoo->asStringRef; - - # to parse some other pod file to another output file all you need to do is... - $parser->parse_from_file( $anotherinfile, $anotheroutfile ); - -There are options specific to Pod::Xhtml that you can pass in at construction -time, e.g.: - - my $parser = new Pod::Xhtml(StringMode => 1, MakeIndex => 0); - -See L<"OPTIONS">. For more information also see L<Pod::Parser> which this -module inherits from. - -=head1 DESCRIPTION - -=over 4 - -=item new Pod::Xhtml( [ OPTIONS ] ) - -Create a new object. Optionally pass in some options in the form -C<'new Pod::Xhtml( StringMode =E<gt> 1);'> - -=item $parser->parse_from_file( INPUTFILE, [OUTPUTFILE] ) - -Read POD from the input file, output to the output file (or STDOUT if no -file is given). See Pod::Parser docs for more. -Note that you can parse multiple files with the same object. All your options -will be preserved, as will any text you added with the add*Text methods. - -=item $parser->parse_from_filehandle( [INPUTFILEHANDLE, [OUTPUTFILEHANDLE]] ) - -Read POD from the input filehandle, output to the output filehandle -(STDIN/STDOUT if no filehandle(s) given). See Pod::Parser docs for more. Note -that you can parse multiple files with the same object. All your options will -be preserved, as will any text you added with the add*Text methods. - -=item $parser->asString - -Get the XHTML as a scalar. You'll probably want to use this with the -StringMode option. - -=item $parser->asStringRef - -As above, but you get a reference to the string, not the string itself. - -=item $parser->addHeadText( $text ) - -Inserts some text just before the closing head tag. For example you can add a -link to a stylesheet. May be called many times to add lots of text. Note: you -need to call this some time B<before> any output is done, e.g. straight after -new(). Make sure that you only insert valid XHTML fragments. - -=item $parser->addBodyOpenText( $text ) / $parser->addBodyCloseText( $text ) - -Inserts some text right at the beginning (or ending) of the body element. For -example you can add a navigation header and footer. May be called many times -to add lots of text. Note: you need to call this some time B<before> any output -is done, e.g. straight after new(). Make sure that you only insert valid XHTML -fragments. - -=back - -=head1 OPTIONS - -=over 4 - -=item StringMode - -Default: 0. If set to 1 this does no output at all, even if filenames/handles -are supplied. Use asString or asStringRef to access the text if you set this -option. - -=item MakeIndex - -Default: 1. If set to 1 then an index of sections is created at the top of the -body. If set to 2 then the index includes non-bulleted list items - -=item MakeMeta - -Default: 1. If set to 1 then some meta tags are created, recording things like -input file, description, etc. - -=item FragmentOnly - -Default: 0. If 1, we only produce an XHTML fragment (suitable for use as a -server-side include etc). There is no HEAD element nor any BODY or HTML -tags. Any text added with the add*Text methods will B<not> be output. - - -=item TopHeading - -Allows you to set the starting heading level when in fragment mode. -For example, if your document already has h1 tags and you want the -generated POD to nest inside the outline, you can specify - - TopHeading => 2 - -and C<=head1> will be tagged with h2 tags, C<=head3> with h3, and so -on. - -Note that XHTML doesn't allow for heading tags past h6, so h7 and up -will be translated to h6 as necessary. - -=item TopLinks - -At each section head this text is added to provide a link back to the top. -Set to 0 or '' to inhibit links, or define your own. - - Default: <p><a href="#TOP" class="toplink">Top</a></p> - -=item LinkParser - -An object that parses links in the POD document. By default, this is a regular -Pod::Hyperlink object. Any user-supplied link parser must conform the the -Pod::Hyperlink API. - -This module works with a L<Pod::Hyperlink::BounceURL> link parser and generates -hyperlinks as 'a' elements with a class of 'pod_xhtml_bounce_url'. The optional -text giving the "node" is enclosed in a 'strong' element with a class of 'pod_xhtml_bounce_url_text' - -=back - -=head1 RATIONALE - -There's Pod::PXML and Pod::XML, so why do we need Pod::Xhtml? You need an XSLT -to transform XML into XHTML and many people don't have the time or inclination -to do this. But they want to make sure that the pages they put on their web -site are well-formed, they want those pages to use stylesheets easily, and -possibly they want to squirt the XHTML through some kind of filter for more -processing. - -By generating well-formed XHTML straight away we allow anyone to just use the -output files as-is. For those who want to use XML tools or transformations they -can use the XHTML as a source, because it's a well-formed XML document. - -=head1 CAVEATS - -This module outputs well-formed XHTML if the POD is well-formed. To check this -you can use something like: - - use Pod::Checker; - my $syn = podchecker($defaultIn); - -If $syn is 0 there are no syntax errors. If it's -1 then no POD was found. Any -positive number indicates that that number of errors were found. If the input -POD has errors then the output XHTML I<should> be well-formed but will probably -omit information, and in addition Pod::Xhtml will emit warnings. Note that -Pod::Parser seems to be sensitive to the current setting of $/ so ensure it's -the end-of-line character when the parsing is done. - -=head1 AUTHOR - -P Kent E<amp> Simon Flack E<lt>cpan _at_ bbc _dot_ co _dot_ ukE<gt> - -=head1 COPYRIGHT - -(c) BBC 2004, 2005. This program is free software; you can redistribute it -and/or modify it under the GNU GPL. - -See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt - -=cut - -# vim:noet diff --git a/web/bin/lib/auto/Pod/Escapes/.exists b/web/bin/lib/auto/Pod/Escapes/.exists deleted file mode 100644 index e69de29..0000000 --- a/web/bin/lib/auto/Pod/Escapes/.exists +++ /dev/null diff --git a/web/bin/lib/auto/Pod/Simple/.exists b/web/bin/lib/auto/Pod/Simple/.exists deleted file mode 100644 index e69de29..0000000 --- a/web/bin/lib/auto/Pod/Simple/.exists +++ /dev/null diff --git a/web/bin/lib/perlpod.pod b/web/bin/lib/perlpod.pod deleted file mode 100644 index 80c9ba1..0000000 --- a/web/bin/lib/perlpod.pod +++ /dev/null @@ -1,685 +0,0 @@ - -=for comment -This document is in Pod format. To read this, use a Pod formatter, -like "perldoc perlpod". - -=head1 NAME - -perlpod - the Plain Old Documentation format - -=head1 DESCRIPTION - -Pod is a simple-to-use markup language used for writing documentation -for Perl, Perl programs, and Perl modules. - -Translators are available for converting Pod to various formats -like plain text, HTML, man pages, and more. - -Pod markup consists of three basic kinds of paragraphs: -L<ordinary|/"Ordinary Paragraph">, -L<verbatim|/"Verbatim Paragraph">, and -L<command|/"Command Paragraph">. - - -=head2 Ordinary Paragraph - -Most paragraphs in your documentation will be ordinary blocks -of text, like this one. You can simply type in your text without -any markup whatsoever, and with just a blank line before and -after. When it gets formatted, it will undergo minimal formatting, -like being rewrapped, probably put into a proportionally spaced -font, and maybe even justified. - -You can use formatting codes in ordinary paragraphs, for B<bold>, -I<italic>, C<code-style>, L<hyperlinks|perlfaq>, and more. Such -codes are explained in the "L<Formatting Codes|/"Formatting Codes">" -section, below. - - -=head2 Verbatim Paragraph - -Verbatim paragraphs are usually used for presenting a codeblock or -other text which does not require any special parsing or formatting, -and which shouldn't be wrapped. - -A verbatim paragraph is distinguished by having its first character -be a space or a tab. (And commonly, all its lines begin with spaces -and/or tabs.) It should be reproduced exactly, with tabs assumed to -be on 8-column boundaries. There are no special formatting codes, -so you can't italicize or anything like that. A \ means \, and -nothing else. - - -=head2 Command Paragraph - -A command paragraph is used for special treatment of whole chunks -of text, usually as headings or parts of lists. - -All command paragraphs (which are typically only one line long) start -with "=", followed by an identifier, followed by arbitrary text that -the command can use however it pleases. Currently recognized commands -are - - =head1 Heading Text - =head2 Heading Text - =head3 Heading Text - =head4 Heading Text - =over indentlevel - =item stuff - =back - =cut - =pod - =begin format - =end format - =for format text... - -To explain them each in detail: - -=over - -=item C<=head1 I<Heading Text>> - -=item C<=head2 I<Heading Text>> - -=item C<=head3 I<Heading Text>> - -=item C<=head4 I<Heading Text>> - -Head1 through head4 produce headings, head1 being the highest -level. The text in the rest of this paragraph is the content of the -heading. For example: - - =head2 Object Attributes - -The text "Object Attributes" comprises the heading there. (Note that -head3 and head4 are recent additions, not supported in older Pod -translators.) The text in these heading commands can use -formatting codes, as seen here: - - =head2 Possible Values for C<$/> - -Such commands are explained in the -"L<Formatting Codes|/"Formatting Codes">" section, below. - -=item C<=over I<indentlevel>> - -=item C<=item I<stuff...>> - -=item C<=back> - -Item, over, and back require a little more explanation: "=over" starts -a region specifically for the generation of a list using "=item" -commands, or for indenting (groups of) normal paragraphs. At the end -of your list, use "=back" to end it. The I<indentlevel> option to -"=over" indicates how far over to indent, generally in ems (where -one em is the width of an "M" in the document's base font) or roughly -comparable units; if there is no I<indentlevel> option, it defaults -to four. (And some formatters may just ignore whatever I<indentlevel> -you provide.) In the I<stuff> in C<=item I<stuff...>>, you may -use formatting codes, as seen here: - - =item Using C<$|> to Control Buffering - -Such commands are explained in the -"L<Formatting Codes|/"Formatting Codes">" section, below. - -Note also that there are some basic rules to using "=over" ... -"=back" regions: - -=over - -=item * - -Don't use "=item"s outside of an "=over" ... "=back" region. - -=item * - -The first thing after the "=over" command should be an "=item", unless -there aren't going to be any items at all in this "=over" ... "=back" -region. - -=item * - -Don't put "=headI<n>" commands inside an "=over" ... "=back" region. - -=item * - -And perhaps most importantly, keep the items consistent: either use -"=item *" for all of them, to produce bullets; or use "=item 1.", -"=item 2.", etc., to produce numbered lists; or use "=item foo", -"=item bar", etc. -- namely, things that look nothing like bullets or -numbers. - -If you start with bullets or numbers, stick with them, as -formatters use the first "=item" type to decide how to format the -list. - -=back - -=item C<=cut> - -To end a Pod block, use a blank line, -then a line beginning with "=cut", and a blank -line after it. This lets Perl (and the Pod formatter) know that -this is where Perl code is resuming. (The blank line before the "=cut" -is not technically necessary, but many older Pod processors require it.) - -=item C<=pod> - -The "=pod" command by itself doesn't do much of anything, but it -signals to Perl (and Pod formatters) that a Pod block starts here. A -Pod block starts with I<any> command paragraph, so a "=pod" command is -usually used just when you want to start a Pod block with an ordinary -paragraph or a verbatim paragraph. For example: - - =item stuff() - - This function does stuff. - - =cut - - sub stuff { - ... - } - - =pod - - Remember to check its return value, as in: - - stuff() || die "Couldn't do stuff!"; - - =cut - -=item C<=begin I<formatname>> - -=item C<=end I<formatname>> - -=item C<=for I<formatname> I<text...>> - -For, begin, and end will let you have regions of text/code/data that -are not generally interpreted as normal Pod text, but are passed -directly to particular formatters, or are otherwise special. A -formatter that can use that format will use the region, otherwise it -will be completely ignored. - -A command "=begin I<formatname>", some paragraphs, and a -command "=end I<formatname>", mean that the text/data inbetween -is meant for formatters that understand the special format -called I<formatname>. For example, - - =begin html - - <hr> <img src="thang.png"> - <p> This is a raw HTML paragraph </p> - - =end html - -The command "=for I<formatname> I<text...>" -specifies that the remainder of just this paragraph (starting -right after I<formatname>) is in that special format. - - =for html <hr> <img src="thang.png"> - <p> This is a raw HTML paragraph </p> - -This means the same thing as the above "=begin html" ... "=end html" -region. - -That is, with "=for", you can have only one paragraph's worth -of text (i.e., the text in "=foo targetname text..."), but with -"=begin targetname" ... "=end targetname", you can have any amount -of stuff inbetween. (Note that there still must be a blank line -after the "=begin" command and a blank line before the "=end" -command. - -Here are some examples of how to use these: - - =begin html - - <br>Figure 1.<br><IMG SRC="figure1.png"><br> - - =end html - - =begin text - - --------------- - | foo | - | bar | - --------------- - - ^^^^ Figure 1. ^^^^ - - =end text - -Some format names that formatters currently are known to accept -include "roff", "man", "latex", "tex", "text", and "html". (Some -formatters will treat some of these as synonyms.) - -A format name of "comment" is common for just making notes (presumably -to yourself) that won't appear in any formatted version of the Pod -document: - - =for comment - Make sure that all the available options are documented! - -Some I<formatnames> will require a leading colon (as in -C<"=for :formatname">, or -C<"=begin :formatname" ... "=end :formatname">), -to signal that the text is not raw data, but instead I<is> Pod text -(i.e., possibly containing formatting codes) that's just not for -normal formatting (e.g., may not be a normal-use paragraph, but might -be for formatting as a footnote). - -=back - -And don't forget, when using any command, that the command lasts up -until the end of its I<paragraph>, not its line. So in the -examples below, you can see that every command needs the blank -line after it, to end its paragraph. - -Some examples of lists include: - - =over - - =item * - - First item - - =item * - - Second item - - =back - - =over - - =item Foo() - - Description of Foo function - - =item Bar() - - Description of Bar function - - =back - - -=head2 Formatting Codes - -In ordinary paragraphs and in some command paragraphs, various -formatting codes (a.k.a. "interior sequences") can be used: - -=for comment - "interior sequences" is such an opaque term. - Prefer "formatting codes" instead. - -=over - -=item C<IE<lt>textE<gt>> -- italic text - -Used for emphasis ("C<be IE<lt>careful!E<gt>>") and parameters -("C<redo IE<lt>LABELE<gt>>") - -=item C<BE<lt>textE<gt>> -- bold text - -Used for switches ("C<perl's BE<lt>-nE<gt> switch>"), programs -("C<some systems provide a BE<lt>chfnE<gt> for that>"), -emphasis ("C<be BE<lt>careful!E<gt>>"), and so on -("C<and that feature is known as BE<lt>autovivificationE<gt>>"). - -=item C<CE<lt>codeE<gt>> -- code text - -Renders code in a typewriter font, or gives some other indication that -this represents program text ("C<CE<lt>gmtime($^T)E<gt>>") or some other -form of computerese ("C<CE<lt>drwxr-xr-xE<gt>>"). - -=item C<LE<lt>nameE<gt>> -- a hyperlink - -There are various syntaxes, listed below. In the syntaxes given, -C<text>, C<name>, and C<section> cannot contain the characters -'/' and '|'; and any '<' or '>' should be matched. - -=over - -=item * - -C<LE<lt>nameE<gt>> - -Link to a Perl manual page (e.g., C<LE<lt>Net::PingE<gt>>). Note -that C<name> should not contain spaces. This syntax -is also occasionally used for references to UNIX man pages, as in -C<LE<lt>crontab(5)E<gt>>. - -=item * - -C<LE<lt>name/"sec"E<gt>> or C<LE<lt>name/secE<gt>> - -Link to a section in other manual page. E.g., -C<LE<lt>perlsyn/"For Loops"E<gt>> - -=item * - -C<LE<lt>/"sec"E<gt>> or C<LE<lt>/secE<gt>> or C<LE<lt>"sec"E<gt>> - -Link to a section in this manual page. E.g., -C<LE<lt>/"Object Methods"E<gt>> - -=back - -A section is started by the named heading or item. For -example, C<LE<lt>perlvar/$.E<gt>> or C<LE<lt>perlvar/"$."E<gt>> both -link to the section started by "C<=item $.>" in perlvar. And -C<LE<lt>perlsyn/For LoopsE<gt>> or C<LE<lt>perlsyn/"For Loops"E<gt>> -both link to the section started by "C<=head2 For Loops>" -in perlsyn. - -To control what text is used for display, you -use "C<LE<lt>text|...E<gt>>", as in: - -=over - -=item * - -C<LE<lt>text|nameE<gt>> - -Link this text to that manual page. E.g., -C<LE<lt>Perl Error Messages|perldiagE<gt>> - -=item * - -C<LE<lt>text|name/"sec"E<gt>> or C<LE<lt>text|name/secE<gt>> - -Link this text to that section in that manual page. E.g., -C<LE<lt>SWITCH statements|perlsyn/"Basic BLOCKs and Switch -Statements"E<gt>> - -=item * - -C<LE<lt>text|/"sec"E<gt>> or C<LE<lt>text|/secE<gt>> -or C<LE<lt>text|"sec"E<gt>> - -Link this text to that section in this manual page. E.g., -C<LE<lt>the various attributes|/"Member Data"E<gt>> - -=back - -Or you can link to a web page: - -=over - -=item * - -C<LE<lt>scheme:...E<gt>> - -Links to an absolute URL. For example, -C<LE<lt>http://www.perl.org/E<gt>>. But note -that there is no corresponding C<LE<lt>text|scheme:...E<gt>> syntax, for -various reasons. - -=back - -=item C<EE<lt>escapeE<gt>> -- a character escape - -Very similar to HTML/XML C<&I<foo>;> "entity references": - -=over - -=item * - -C<EE<lt>ltE<gt>> -- a literal E<lt> (less than) - -=item * - -C<EE<lt>gtE<gt>> -- a literal E<gt> (greater than) - -=item * - -C<EE<lt>verbarE<gt>> -- a literal | (I<ver>tical I<bar>) - -=item * - -C<EE<lt>solE<gt>> = a literal / (I<sol>idus) - -The above four are optional except in other formatting codes, -notably C<LE<lt>...E<gt>>, and when preceded by a -capital letter. - -=item * - -C<EE<lt>htmlnameE<gt>> - -Some non-numeric HTML entity name, such as C<EE<lt>eacuteE<gt>>, -meaning the same thing as C<é> in HTML -- i.e., a lowercase -e with an acute (/-shaped) accent. - -=item * - -C<EE<lt>numberE<gt>> - -The ASCII/Latin-1/Unicode character with that number. A -leading "0x" means that I<number> is hex, as in -C<EE<lt>0x201EE<gt>>. A leading "0" means that I<number> is octal, -as in C<EE<lt>075E<gt>>. Otherwise I<number> is interpreted as being -in decimal, as in C<EE<lt>181E<gt>>. - -Note that older Pod formatters might not recognize octal or -hex numeric escapes, and that many formatters cannot reliably -render characters above 255. (Some formatters may even have -to use compromised renderings of Latin-1 characters, like -rendering C<EE<lt>eacuteE<gt>> as just a plain "e".) - -=back - -=item C<FE<lt>filenameE<gt>> -- used for filenames - -Typically displayed in italics. Example: "C<FE<lt>.cshrcE<gt>>" - -=item C<SE<lt>textE<gt>> -- text contains non-breaking spaces - -This means that the words in I<text> should not be broken -across lines. Example: S<C<SE<lt>$x ? $y : $zE<gt>>>. - -=item C<XE<lt>topic nameE<gt>> -- an index entry - -This is ignored by most formatters, but some may use it for building -indexes. It always renders as empty-string. -Example: C<XE<lt>absolutizing relative URLsE<gt>> - -=item C<ZE<lt>E<gt>> -- a null (zero-effect) formatting code - -This is rarely used. It's one way to get around using an -EE<lt>...E<gt> code sometimes. For example, instead of -"C<NEE<lt>ltE<gt>3>" (for "NE<lt>3") you could write -"C<NZE<lt>E<gt>E<lt>3>" (the "ZE<lt>E<gt>" breaks up the "N" and -the "E<lt>" so they can't be considered -the part of a (fictitious) "NE<lt>...E<gt>" code. - -=for comment - This was formerly explained as a "zero-width character". But it in - most parser models, it parses to nothing at all, as opposed to parsing - as if it were a E<zwnj> or E<zwj>, which are REAL zero-width characters. - So "width" and "character" are exactly the wrong words. - -=back - -Most of the time, you will need only a single set of angle brackets to -delimit the beginning and end of formatting codes. However, -sometimes you will want to put a real right angle bracket (a -greater-than sign, '>') inside of a formatting code. This is particularly -common when using a formatting code to provide a different font-type for a -snippet of code. As with all things in Perl, there is more than -one way to do it. One way is to simply escape the closing bracket -using an C<E> code: - - C<$a E<lt>=E<gt> $b> - -This will produce: "C<$a E<lt>=E<gt> $b>" - -A more readable, and perhaps more "plain" way is to use an alternate -set of delimiters that doesn't require a single ">" to be escaped. With -the Pod formatters that are standard starting with perl5.5.660, doubled -angle brackets ("<<" and ">>") may be used I<if and only if there is -whitespace right after the opening delimiter and whitespace right -before the closing delimiter!> For example, the following will -do the trick: - - C<< $a <=> $b >> - -In fact, you can use as many repeated angle-brackets as you like so -long as you have the same number of them in the opening and closing -delimiters, and make sure that whitespace immediately follows the last -'<' of the opening delimiter, and immediately precedes the first '>' -of the closing delimiter. (The whitespace is ignored.) So the -following will also work: - - C<<< $a <=> $b >>> - C<<<< $a <=> $b >>>> - -And they all mean exactly the same as this: - - C<$a E<lt>=E<gt> $b> - -As a further example, this means that if you wanted to put these bits of -code in C<C> (code) style: - - open(X, ">>thing.dat") || die $! - $foo->bar(); - -you could do it like so: - - C<<< open(X, ">>thing.dat") || die $! >>> - C<< $foo->bar(); >> - -which is presumably easier to read than the old way: - - C<open(X, "E<gt>E<gt>thing.dat") || die $!> - C<$foo-E<gt>bar(); >> - -This is currently supported by pod2text (Pod::Text), pod2man (Pod::Man), -and any other pod2xxx or Pod::Xxxx translators that use -Pod::Parser 1.093 or later, or Pod::Tree 1.02 or later. - -=head2 The Intent - -The intent is simplicity of use, not power of expression. Paragraphs -look like paragraphs (block format), so that they stand out -visually, and so that I could run them through C<fmt> easily to reformat -them (that's F7 in my version of B<vi>, or Esc Q in my version of -B<emacs>). I wanted the translator to always leave the C<'> and C<`> and -C<"> quotes alone, in verbatim mode, so I could slurp in a -working program, shift it over four spaces, and have it print out, er, -verbatim. And presumably in a monospace font. - -The Pod format is not necessarily sufficient for writing a book. Pod -is just meant to be an idiot-proof common source for nroff, HTML, -TeX, and other markup languages, as used for online -documentation. Translators exist for B<pod2text>, B<pod2html>, -B<pod2man> (that's for nroff(1) and troff(1)), B<pod2latex>, and -B<pod2fm>. Various others are available in CPAN. - - -=head2 Embedding Pods in Perl Modules - -You can embed Pod documentation in your Perl modules and scripts. -Start your documentation with an empty line, a "=head1" command at the -beginning, and end it with a "=cut" command and an empty line. Perl -will ignore the Pod text. See any of the supplied library modules for -examples. If you're going to put your Pod at the end of the file, and -you're using an __END__ or __DATA__ cut mark, make sure to put an -empty line there before the first Pod command. - - __END__ - - =head1 NAME - - Time::Local - efficiently compute time from local and GMT time - -Without that empty line before the "=head1", many translators wouldn't -have recognized the "=head1" as starting a Pod block. - -=head2 Hints for Writing Pod - -=over - -=item * - -The B<podchecker> command is provided for checking Pod syntax for errors -and warnings. For example, it checks for completely blank lines in -Pod blocks and for unknown commands and formatting codes. You should -still also pass your document through one or more translators and proofread -the result, or print out the result and proofread that. Some of the -problems found may be bugs in the translators, which you may or may not -wish to work around. - -=item * - -If you're more familiar with writing in HTML than with writing in Pod, you -can try your hand at writing documentation in simple HTML, and converting -it to Pod with the experimental L<Pod::HTML2Pod|Pod::HTML2Pod> module, -(available in CPAN), and looking at the resulting code. The experimental -L<Pod::PXML|Pod::PXML> module in CPAN might also be useful. - -=item * - -Many older Pod translators require the lines before every Pod -command and after every Pod command (including "=cut"!) to be a blank -line. Having something like this: - - # - - - - - - - - - - - - - =item $firecracker->boom() - - This noisily detonates the firecracker object. - =cut - sub boom { - ... - -...will make such Pod translators completely fail to see the Pod block -at all. - -Instead, have it like this: - - # - - - - - - - - - - - - - - =item $firecracker->boom() - - This noisily detonates the firecracker object. - - =cut - - sub boom { - ... - -=item * - -Some older Pod translators require paragraphs (including command -paragraphs like "=head2 Functions") to be separated by I<completely> -empty lines. If you have an apparently empty line with some spaces -on it, this might not count as a separator for those translators, and -that could cause odd formatting. - -=item * - -Older translators might add wording around an LE<lt>E<gt> link, so that -C<LE<lt>Foo::BarE<gt>> may become "the Foo::Bar manpage", for example. -So you shouldn't write things like C<the LE<lt>fooE<gt> -documentation>, if you want the translated document to read sensibly --- instead write C<the LE<lt>Foo::Bar|Foo::BarE<gt> documentation> or -C<LE<lt>the Foo::Bar documentation|Foo::BarE<gt>>, to control how the -link comes out. - -=item * - -Going past the 70th column in a verbatim block might be ungracefully -wrapped by some formatters. - -=back - -=head1 SEE ALSO - -L<perlpodspec>, L<perlsyn/"PODs: Embedded Documentation">, -L<perlnewmod>, L<perldoc>, L<pod2html>, L<pod2man>, L<podchecker>. - -=head1 AUTHOR - -Larry Wall, Sean M. Burke - -=cut diff --git a/web/bin/lib/perlpodspec.pod b/web/bin/lib/perlpodspec.pod deleted file mode 100644 index 7387258..0000000 --- a/web/bin/lib/perlpodspec.pod +++ /dev/null @@ -1,1876 +0,0 @@ - -=head1 NAME - -perlpodspec - Plain Old Documentation: format specification and notes - -=head1 DESCRIPTION - -This document is detailed notes on the Pod markup language. Most -people will only have to read L<perlpod|perlpod> to know how to write -in Pod, but this document may answer some incidental questions to do -with parsing and rendering Pod. - -In this document, "must" / "must not", "should" / -"should not", and "may" have their conventional (cf. RFC 2119) -meanings: "X must do Y" means that if X doesn't do Y, it's against -this specification, and should really be fixed. "X should do Y" -means that it's recommended, but X may fail to do Y, if there's a -good reason. "X may do Y" is merely a note that X can do Y at -will (although it is up to the reader to detect any connotation of -"and I think it would be I<nice> if X did Y" versus "it wouldn't -really I<bother> me if X did Y"). - -Notably, when I say "the parser should do Y", the -parser may fail to do Y, if the calling application explicitly -requests that the parser I<not> do Y. I often phrase this as -"the parser should, by default, do Y." This doesn't I<require> -the parser to provide an option for turning off whatever -feature Y is (like expanding tabs in verbatim paragraphs), although -it implicates that such an option I<may> be provided. - -=head1 Pod Definitions - -Pod is embedded in files, typically Perl source files -- although you -can write a file that's nothing but Pod. - -A B<line> in a file consists of zero or more non-newline characters, -terminated by either a newline or the end of the file. - -A B<newline sequence> is usually a platform-dependent concept, but -Pod parsers should understand it to mean any of CR (ASCII 13), LF -(ASCII 10), or a CRLF (ASCII 13 followed immediately by ASCII 10), in -addition to any other system-specific meaning. The first CR/CRLF/LF -sequence in the file may be used as the basis for identifying the -newline sequence for parsing the rest of the file. - -A B<blank line> is a line consisting entirely of zero or more spaces -(ASCII 32) or tabs (ASCII 9), and terminated by a newline or end-of-file. -A B<non-blank line> is a line containing one or more characters other -than space or tab (and terminated by a newline or end-of-file). - -(I<Note:> Many older Pod parsers did not accept a line consisting of -spaces/tabs and then a newline as a blank line -- the only lines they -considered blank were lines consisting of I<no characters at all>, -terminated by a newline.) - -B<Whitespace> is used in this document as a blanket term for spaces, -tabs, and newline sequences. (By itself, this term usually refers -to literal whitespace. That is, sequences of whitespace characters -in Pod source, as opposed to "EE<lt>32>", which is a formatting -code that I<denotes> a whitespace character.) - -A B<Pod parser> is a module meant for parsing Pod (regardless of -whether this involves calling callbacks or building a parse tree or -directly formatting it). A B<Pod formatter> (or B<Pod translator>) -is a module or program that converts Pod to some other format (HTML, -plaintext, TeX, PostScript, RTF). A B<Pod processor> might be a -formatter or translator, or might be a program that does something -else with the Pod (like wordcounting it, scanning for index points, -etc.). - -Pod content is contained in B<Pod blocks>. A Pod block starts with a -line that matches <m/\A=[a-zA-Z]/>, and continues up to the next line -that matches C<m/\A=cut/> -- or up to the end of the file, if there is -no C<m/\A=cut/> line. - -=for comment - The current perlsyn says: - [beginquote] - Note that pod translators should look at only paragraphs beginning - with a pod directive (it makes parsing easier), whereas the compiler - actually knows to look for pod escapes even in the middle of a - paragraph. This means that the following secret stuff will be ignored - by both the compiler and the translators. - $a=3; - =secret stuff - warn "Neither POD nor CODE!?" - =cut back - print "got $a\n"; - You probably shouldn't rely upon the warn() being podded out forever. - Not all pod translators are well-behaved in this regard, and perhaps - the compiler will become pickier. - [endquote] - I think that those paragraphs should just be removed; paragraph-based - parsing seems to have been largely abandoned, because of the hassle - with non-empty blank lines messing up what people meant by "paragraph". - Even if the "it makes parsing easier" bit were especially true, - it wouldn't be worth the confusion of having perl and pod2whatever - actually disagree on what can constitute a Pod block. - -Within a Pod block, there are B<Pod paragraphs>. A Pod paragraph -consists of non-blank lines of text, separated by one or more blank -lines. - -For purposes of Pod processing, there are four types of paragraphs in -a Pod block: - -=over - -=item * - -A command paragraph (also called a "directive"). The first line of -this paragraph must match C<m/\A=[a-zA-Z]/>. Command paragraphs are -typically one line, as in: - - =head1 NOTES - - =item * - -But they may span several (non-blank) lines: - - =for comment - Hm, I wonder what it would look like if - you tried to write a BNF for Pod from this. - - =head3 Dr. Strangelove, or: How I Learned to - Stop Worrying and Love the Bomb - -I<Some> command paragraphs allow formatting codes in their content -(i.e., after the part that matches C<m/\A=[a-zA-Z]\S*\s*/>), as in: - - =head1 Did You Remember to C<use strict;>? - -In other words, the Pod processing handler for "head1" will apply the -same processing to "Did You Remember to CE<lt>use strict;>?" that it -would to an ordinary paragraph -- i.e., formatting codes (like -"CE<lt>...>") are parsed and presumably formatted appropriately, and -whitespace in the form of literal spaces and/or tabs is not -significant. - -=item * - -A B<verbatim paragraph>. The first line of this paragraph must be a -literal space or tab, and this paragraph must not be inside a "=begin -I<identifier>", ... "=end I<identifier>" sequence unless -"I<identifier>" begins with a colon (":"). That is, if a paragraph -starts with a literal space or tab, but I<is> inside a -"=begin I<identifier>", ... "=end I<identifier>" region, then it's -a data paragraph, unless "I<identifier>" begins with a colon. - -Whitespace I<is> significant in verbatim paragraphs (although, in -processing, tabs are probably expanded). - -=item * - -An B<ordinary paragraph>. A paragraph is an ordinary paragraph -if its first line matches neither C<m/\A=[a-zA-Z]/> nor -C<m/\A[ \t]/>, I<and> if it's not inside a "=begin I<identifier>", -... "=end I<identifier>" sequence unless "I<identifier>" begins with -a colon (":"). - -=item * - -A B<data paragraph>. This is a paragraph that I<is> inside a "=begin -I<identifier>" ... "=end I<identifier>" sequence where -"I<identifier>" does I<not> begin with a literal colon (":"). In -some sense, a data paragraph is not part of Pod at all (i.e., -effectively it's "out-of-band"), since it's not subject to most kinds -of Pod parsing; but it is specified here, since Pod -parsers need to be able to call an event for it, or store it in some -form in a parse tree, or at least just parse I<around> it. - -=back - -For example: consider the following paragraphs: - - # <- that's the 0th column - - =head1 Foo - - Stuff - - $foo->bar - - =cut - -Here, "=head1 Foo" and "=cut" are command paragraphs because the first -line of each matches C<m/\A=[a-zA-Z]/>. "I<[space][space]>$foo->bar" -is a verbatim paragraph, because its first line starts with a literal -whitespace character (and there's no "=begin"..."=end" region around). - -The "=begin I<identifier>" ... "=end I<identifier>" commands stop -paragraphs that they surround from being parsed as data or verbatim -paragraphs, if I<identifier> doesn't begin with a colon. This -is discussed in detail in the section -L</About Data Paragraphs and "=beginE<sol>=end" Regions>. - -=head1 Pod Commands - -This section is intended to supplement and clarify the discussion in -L<perlpod/"Command Paragraph">. These are the currently recognized -Pod commands: - -=over - -=item "=head1", "=head2", "=head3", "=head4" - -This command indicates that the text in the remainder of the paragraph -is a heading. That text may contain formatting codes. Examples: - - =head1 Object Attributes - - =head3 What B<Not> to Do! - -=item "=pod" - -This command indicates that this paragraph begins a Pod block. (If we -are already in the middle of a Pod block, this command has no effect at -all.) If there is any text in this command paragraph after "=pod", -it must be ignored. Examples: - - =pod - - This is a plain Pod paragraph. - - =pod This text is ignored. - -=item "=cut" - -This command indicates that this line is the end of this previously -started Pod block. If there is any text after "=cut" on the line, it must be -ignored. Examples: - - =cut - - =cut The documentation ends here. - - =cut - # This is the first line of program text. - sub foo { # This is the second. - -It is an error to try to I<start> a Pod black with a "=cut" command. In -that case, the Pod processor must halt parsing of the input file, and -must by default emit a warning. - -=item "=over" - -This command indicates that this is the start of a list/indent -region. If there is any text following the "=over", it must consist -of only a nonzero positive numeral. The semantics of this numeral is -explained in the L</"About =over...=back Regions"> section, further -below. Formatting codes are not expanded. Examples: - - =over 3 - - =over 3.5 - - =over - -=item "=item" - -This command indicates that an item in a list begins here. Formatting -codes are processed. The semantics of the (optional) text in the -remainder of this paragraph are -explained in the L</"About =over...=back Regions"> section, further -below. Examples: - - =item - - =item * - - =item * - - =item 14 - - =item 3. - - =item C<< $thing->stuff(I<dodad>) >> - - =item For transporting us beyond seas to be tried for pretended - offenses - - =item He is at this time transporting large armies of foreign - mercenaries to complete the works of death, desolation and - tyranny, already begun with circumstances of cruelty and perfidy - scarcely paralleled in the most barbarous ages, and totally - unworthy the head of a civilized nation. - -=item "=back" - -This command indicates that this is the end of the region begun -by the most recent "=over" command. It permits no text after the -"=back" command. - -=item "=begin formatname" - -This marks the following paragraphs (until the matching "=end -formatname") as being for some special kind of processing. Unless -"formatname" begins with a colon, the contained non-command -paragraphs are data paragraphs. But if "formatname" I<does> begin -with a colon, then non-command paragraphs are ordinary paragraphs -or data paragraphs. This is discussed in detail in the section -L</About Data Paragraphs and "=beginE<sol>=end" Regions>. - -It is advised that formatnames match the regexp -C<m/\A:?[-a-zA-Z0-9_]+\z/>. Implementors should anticipate future -expansion in the semantics and syntax of the first parameter -to "=begin"/"=end"/"=for". - -=item "=end formatname" - -This marks the end of the region opened by the matching -"=begin formatname" region. If "formatname" is not the formatname -of the most recent open "=begin formatname" region, then this -is an error, and must generate an error message. This -is discussed in detail in the section -L</About Data Paragraphs and "=beginE<sol>=end" Regions>. - -=item "=for formatname text..." - -This is synonymous with: - - =begin formatname - - text... - - =end formatname - -That is, it creates a region consisting of a single paragraph; that -paragraph is to be treated as a normal paragraph if "formatname" -begins with a ":"; if "formatname" I<doesn't> begin with a colon, -then "text..." will constitute a data paragraph. There is no way -to use "=for formatname text..." to express "text..." as a verbatim -paragraph. - -=back - -If a Pod processor sees any command other than the ones listed -above (like "=head", or "=haed1", or "=stuff", or "=cuttlefish", -or "=w123"), that processor must by default treat this as an -error. It must not process the paragraph beginning with that -command, must by default warn of this as an error, and may -abort the parse. A Pod parser may allow a way for particular -applications to add to the above list of known commands, and to -stipulate, for each additional command, whether formatting -codes should be processed. - -Future versions of this specification may add additional -commands. - - - -=head1 Pod Formatting Codes - -(Note that in previous drafts of this document and of perlpod, -formatting codes were referred to as "interior sequences", and -this term may still be found in the documentation for Pod parsers, -and in error messages from Pod processors.) - -There are two syntaxes for formatting codes: - -=over - -=item * - -A formatting code starts with a capital letter (just US-ASCII [A-Z]) -followed by a "<", any number of characters, and ending with the first -matching ">". Examples: - - That's what I<you> think! - - What's C<dump()> for? - - X<C<chmod> and C<unlink()> Under Different Operating Systems> - -=item * - -A formatting code starts with a capital letter (just US-ASCII [A-Z]) -followed by two or more "<"'s, one or more whitespace characters, -any number of characters, one or more whitespace characters, -and ending with the first matching sequence of two or more ">"'s, where -the number of ">"'s equals the number of "<"'s in the opening of this -formatting code. Examples: - - That's what I<< you >> think! - - C<<< open(X, ">>thing.dat") || die $! >>> - - B<< $foo->bar(); >> - -With this syntax, the whitespace character(s) after the "CE<lt><<" -and before the ">>" (or whatever letter) are I<not> renderable -- they -do not signify whitespace, are merely part of the formatting codes -themselves. That is, these are all synonymous: - - C<thing> - C<< thing >> - C<< thing >> - C<<< thing >>> - C<<<< - thing - >>>> - -and so on. - -=back - -In parsing Pod, a notably tricky part is the correct parsing of -(potentially nested!) formatting codes. Implementors should -consult the code in the C<parse_text> routine in Pod::Parser as an -example of a correct implementation. - -=over - -=item C<IE<lt>textE<gt>> -- italic text - -See the brief discussion in L<perlpod/"Formatting Codes">. - -=item C<BE<lt>textE<gt>> -- bold text - -See the brief discussion in L<perlpod/"Formatting Codes">. - -=item C<CE<lt>codeE<gt>> -- code text - -See the brief discussion in L<perlpod/"Formatting Codes">. - -=item C<FE<lt>filenameE<gt>> -- style for filenames - -See the brief discussion in L<perlpod/"Formatting Codes">. - -=item C<XE<lt>topic nameE<gt>> -- an index entry - -See the brief discussion in L<perlpod/"Formatting Codes">. - -This code is unusual in that most formatters completely discard -this code and its content. Other formatters will render it with -invisible codes that can be used in building an index of -the current document. - -=item C<ZE<lt>E<gt>> -- a null (zero-effect) formatting code - -Discussed briefly in L<perlpod/"Formatting Codes">. - -This code is unusual is that it should have no content. That is, -a processor may complain if it sees C<ZE<lt>potatoesE<gt>>. Whether -or not it complains, the I<potatoes> text should ignored. - -=item C<LE<lt>nameE<gt>> -- a hyperlink - -The complicated syntaxes of this code are discussed at length in -L<perlpod/"Formatting Codes">, and implementation details are -discussed below, in L</"About LE<lt>...E<gt> Codes">. Parsing the -contents of LE<lt>content> is tricky. Notably, the content has to be -checked for whether it looks like a URL, or whether it has to be split -on literal "|" and/or "/" (in the right order!), and so on, -I<before> EE<lt>...> codes are resolved. - -=item C<EE<lt>escapeE<gt>> -- a character escape - -See L<perlpod/"Formatting Codes">, and several points in -L</Notes on Implementing Pod Processors>. - -=item C<SE<lt>textE<gt>> -- text contains non-breaking spaces - -This formatting code is syntactically simple, but semantically -complex. What it means is that each space in the printable -content of this code signifies a nonbreaking space. - -Consider: - - C<$x ? $y : $z> - - S<C<$x ? $y : $z>> - -Both signify the monospace (c[ode] style) text consisting of -"$x", one space, "?", one space, ":", one space, "$z". The -difference is that in the latter, with the S code, those spaces -are not "normal" spaces, but instead are nonbreaking spaces. - -=back - - -If a Pod processor sees any formatting code other than the ones -listed above (as in "NE<lt>...>", or "QE<lt>...>", etc.), that -processor must by default treat this as an error. -A Pod parser may allow a way for particular -applications to add to the above list of known formatting codes; -a Pod parser might even allow a way to stipulate, for each additional -command, whether it requires some form of special processing, as -LE<lt>...> does. - -Future versions of this specification may add additional -formatting codes. - -Historical note: A few older Pod processors would not see a ">" as -closing a "CE<lt>" code, if the ">" was immediately preceded by -a "-". This was so that this: - - C<$foo->bar> - -would parse as equivalent to this: - - C<$foo-E<lt>bar> - -instead of as equivalent to a "C" formatting code containing -only "$foo-", and then a "bar>" outside the "C" formatting code. This -problem has since been solved by the addition of syntaxes like this: - - C<< $foo->bar >> - -Compliant parsers must not treat "->" as special. - -Formatting codes absolutely cannot span paragraphs. If a code is -opened in one paragraph, and no closing code is found by the end of -that paragraph, the Pod parser must close that formatting code, -and should complain (as in "Unterminated I code in the paragraph -starting at line 123: 'Time objects are not...'"). So these -two paragraphs: - - I<I told you not to do this! - - Don't make me say it again!> - -...must I<not> be parsed as two paragraphs in italics (with the I -code starting in one paragraph and starting in another.) Instead, -the first paragraph should generate a warning, but that aside, the -above code must parse as if it were: - - I<I told you not to do this!> - - Don't make me say it again!E<gt> - -(In SGMLish jargon, all Pod commands are like block-level -elements, whereas all Pod formatting codes are like inline-level -elements.) - - - -=head1 Notes on Implementing Pod Processors - -The following is a long section of miscellaneous requirements -and suggestions to do with Pod processing. - -=over - -=item * - -Pod formatters should tolerate lines in verbatim blocks that are of -any length, even if that means having to break them (possibly several -times, for very long lines) to avoid text running off the side of the -page. Pod formatters may warn of such line-breaking. Such warnings -are particularly appropriate for lines are over 100 characters long, which -are usually not intentional. - -=item * - -Pod parsers must recognize I<all> of the three well-known newline -formats: CR, LF, and CRLF. See L<perlport|perlport>. - -=item * - -Pod parsers should accept input lines that are of any length. - -=item * - -Since Perl recognizes a Unicode Byte Order Mark at the start of files -as signaling that the file is Unicode encoded as in UTF-16 (whether -big-endian or little-endian) or UTF-8, Pod parsers should do the -same. Otherwise, the character encoding should be understood as -being UTF-8 if the first highbit byte sequence in the file seems -valid as a UTF-8 sequence, or otherwise as Latin-1. - -Future versions of this specification may specify -how Pod can accept other encodings. Presumably treatment of other -encodings in Pod parsing would be as in XML parsing: whatever the -encoding declared by a particular Pod file, content is to be -stored in memory as Unicode characters. - -=item * - -The well known Unicode Byte Order Marks are as follows: if the -file begins with the two literal byte values 0xFE 0xFF, this is -the BOM for big-endian UTF-16. If the file begins with the two -literal byte value 0xFF 0xFE, this is the BOM for little-endian -UTF-16. If the file begins with the three literal byte values -0xEF 0xBB 0xBF, this is the BOM for UTF-8. - -=for comment - use bytes; print map sprintf(" 0x%02X", ord $_), split '', "\x{feff}"; - 0xEF 0xBB 0xBF - -=for comment - If toke.c is modified to support UTF32, add mention of those here. - -=item * - -A naive but sufficient heuristic for testing the first highbit -byte-sequence in a BOM-less file (whether in code or in Pod!), to see -whether that sequence is valid as UTF-8 (RFC 2279) is to check whether -that the first byte in the sequence is in the range 0xC0 - 0xFD -I<and> whether the next byte is in the range -0x80 - 0xBF. If so, the parser may conclude that this file is in -UTF-8, and all highbit sequences in the file should be assumed to -be UTF-8. Otherwise the parser should treat the file as being -in Latin-1. In the unlikely circumstance that the first highbit -sequence in a truly non-UTF-8 file happens to appear to be UTF-8, one -can cater to our heuristic (as well as any more intelligent heuristic) -by prefacing that line with a comment line containing a highbit -sequence that is clearly I<not> valid as UTF-8. A line consisting -of simply "#", an e-acute, and any non-highbit byte, -is sufficient to establish this file's encoding. - -=for comment - If/WHEN some brave soul makes these heuristics into a generic - text-file class (or PerlIO layer?), we can presumably delete - mention of these icky details from this file, and can instead - tell people to just use appropriate class/layer. - Auto-recognition of newline sequences would be another desirable - feature of such a class/layer. - HINT HINT HINT. - -=for comment - "The probability that a string of characters - in any other encoding appears as valid UTF-8 is low" - RFC2279 - -=item * - -This document's requirements and suggestions about encodings -do not apply to Pod processors running on non-ASCII platforms, -notably EBCDIC platforms. - -=item * - -Pod processors must treat a "=for [label] [content...]" paragraph as -meaning the same thing as a "=begin [label]" paragraph, content, and -an "=end [label]" paragraph. (The parser may conflate these two -constructs, or may leave them distinct, in the expectation that the -formatter will nevertheless treat them the same.) - -=item * - -When rendering Pod to a format that allows comments (i.e., to nearly -any format other than plaintext), a Pod formatter must insert comment -text identifying its name and version number, and the name and -version numbers of any modules it might be using to process the Pod. -Minimal examples: - - %% POD::Pod2PS v3.14159, using POD::Parser v1.92 - - <!-- Pod::HTML v3.14159, using POD::Parser v1.92 --> - - {\doccomm generated by Pod::Tree::RTF 3.14159 using Pod::Tree 1.08} - - .\" Pod::Man version 3.14159, using POD::Parser version 1.92 - -Formatters may also insert additional comments, including: the -release date of the Pod formatter program, the contact address for -the author(s) of the formatter, the current time, the name of input -file, the formatting options in effect, version of Perl used, etc. - -Formatters may also choose to note errors/warnings as comments, -besides or instead of emitting them otherwise (as in messages to -STDERR, or C<die>ing). - -=item * - -Pod parsers I<may> emit warnings or error messages ("Unknown E code -EE<lt>zslig>!") to STDERR (whether through printing to STDERR, or -C<warn>ing/C<carp>ing, or C<die>ing/C<croak>ing), but I<must> allow -suppressing all such STDERR output, and instead allow an option for -reporting errors/warnings -in some other way, whether by triggering a callback, or noting errors -in some attribute of the document object, or some similarly unobtrusive -mechanism -- or even by appending a "Pod Errors" section to the end of -the parsed form of the document. - -=item * - -In cases of exceptionally aberrant documents, Pod parsers may abort the -parse. Even then, using C<die>ing/C<croak>ing is to be avoided; where -possible, the parser library may simply close the input file -and add text like "*** Formatting Aborted ***" to the end of the -(partial) in-memory document. - -=item * - -In paragraphs where formatting codes (like EE<lt>...>, BE<lt>...>) -are understood (i.e., I<not> verbatim paragraphs, but I<including> -ordinary paragraphs, and command paragraphs that produce renderable -text, like "=head1"), literal whitespace should generally be considered -"insignificant", in that one literal space has the same meaning as any -(nonzero) number of literal spaces, literal newlines, and literal tabs -(as long as this produces no blank lines, since those would terminate -the paragraph). Pod parsers should compact literal whitespace in each -processed paragraph, but may provide an option for overriding this -(since some processing tasks do not require it), or may follow -additional special rules (for example, specially treating -period-space-space or period-newline sequences). - -=item * - -Pod parsers should not, by default, try to coerce apostrophe (') and -quote (") into smart quotes (little 9's, 66's, 99's, etc), nor try to -turn backtick (`) into anything else but a single backtick character -(distinct from an openquote character!), nor "--" into anything but -two minus signs. They I<must never> do any of those things to text -in CE<lt>...> formatting codes, and never I<ever> to text in verbatim -paragraphs. - -=item * - -When rendering Pod to a format that has two kinds of hyphens (-), one -that's a nonbreaking hyphen, and another that's a breakable hyphen -(as in "object-oriented", which can be split across lines as -"object-", newline, "oriented"), formatters are encouraged to -generally translate "-" to nonbreaking hyphen, but may apply -heuristics to convert some of these to breaking hyphens. - -=item * - -Pod formatters should make reasonable efforts to keep words of Perl -code from being broken across lines. For example, "Foo::Bar" in some -formatting systems is seen as eligible for being broken across lines -as "Foo::" newline "Bar" or even "Foo::-" newline "Bar". This should -be avoided where possible, either by disabling all line-breaking in -mid-word, or by wrapping particular words with internal punctuation -in "don't break this across lines" codes (which in some formats may -not be a single code, but might be a matter of inserting non-breaking -zero-width spaces between every pair of characters in a word.) - -=item * - -Pod parsers should, by default, expand tabs in verbatim paragraphs as -they are processed, before passing them to the formatter or other -processor. Parsers may also allow an option for overriding this. - -=item * - -Pod parsers should, by default, remove newlines from the end of -ordinary and verbatim paragraphs before passing them to the -formatter. For example, while the paragraph you're reading now -could be considered, in Pod source, to end with (and contain) -the newline(s) that end it, it should be processed as ending with -(and containing) the period character that ends this sentence. - -=item * - -Pod parsers, when reporting errors, should make some effort to report -an approximate line number ("Nested EE<lt>>'s in Paragraph #52, near -line 633 of Thing/Foo.pm!"), instead of merely noting the paragraph -number ("Nested EE<lt>>'s in Paragraph #52 of Thing/Foo.pm!"). Where -this is problematic, the paragraph number should at least be -accompanied by an excerpt from the paragraph ("Nested EE<lt>>'s in -Paragraph #52 of Thing/Foo.pm, which begins 'Read/write accessor for -the CE<lt>interest rate> attribute...'"). - -=item * - -Pod parsers, when processing a series of verbatim paragraphs one -after another, should consider them to be one large verbatim -paragraph that happens to contain blank lines. I.e., these two -lines, which have a blank line between them: - - use Foo; - - print Foo->VERSION - -should be unified into one paragraph ("\tuse Foo;\n\n\tprint -Foo->VERSION") before being passed to the formatter or other -processor. Parsers may also allow an option for overriding this. - -While this might be too cumbersome to implement in event-based Pod -parsers, it is straightforward for parsers that return parse trees. - -=item * - -Pod formatters, where feasible, are advised to avoid splitting short -verbatim paragraphs (under twelve lines, say) across pages. - -=item * - -Pod parsers must treat a line with only spaces and/or tabs on it as a -"blank line" such as separates paragraphs. (Some older parsers -recognized only two adjacent newlines as a "blank line" but would not -recognize a newline, a space, and a newline, as a blank line. This -is noncompliant behavior.) - -=item * - -Authors of Pod formatters/processors should make every effort to -avoid writing their own Pod parser. There are already several in -CPAN, with a wide range of interface styles -- and one of them, -Pod::Parser, comes with modern versions of Perl. - -=item * - -Characters in Pod documents may be conveyed either as literals, or by -number in EE<lt>n> codes, or by an equivalent mnemonic, as in -EE<lt>eacute> which is exactly equivalent to EE<lt>233>. - -Characters in the range 32-126 refer to those well known US-ASCII -characters (also defined there by Unicode, with the same meaning), -which all Pod formatters must render faithfully. Characters -in the ranges 0-31 and 127-159 should not be used (neither as -literals, nor as EE<lt>number> codes), except for the -literal byte-sequences for newline (13, 13 10, or 10), and tab (9). - -Characters in the range 160-255 refer to Latin-1 characters (also -defined there by Unicode, with the same meaning). Characters above -255 should be understood to refer to Unicode characters. - -=item * - -Be warned -that some formatters cannot reliably render characters outside 32-126; -and many are able to handle 32-126 and 160-255, but nothing above -255. - -=item * - -Besides the well-known "EE<lt>lt>" and "EE<lt>gt>" codes for -less-than and greater-than, Pod parsers must understand "EE<lt>sol>" -for "/" (solidus, slash), and "EE<lt>verbar>" for "|" (vertical bar, -pipe). Pod parsers should also understand "EE<lt>lchevron>" and -"EE<lt>rchevron>" as legacy codes for characters 171 and 187, i.e., -"left-pointing double angle quotation mark" = "left pointing -guillemet" and "right-pointing double angle quotation mark" = "right -pointing guillemet". (These look like little "<<" and ">>", and they -are now preferably expressed with the HTML/XHTML codes "EE<lt>laquo>" -and "EE<lt>raquo>".) - -=item * - -Pod parsers should understand all "EE<lt>html>" codes as defined -in the entity declarations in the most recent XHTML specification at -C<www.W3.org>. Pod parsers must understand at least the entities -that define characters in the range 160-255 (Latin-1). Pod parsers, -when faced with some unknown "EE<lt>I<identifier>>" code, -shouldn't simply replace it with nullstring (by default, at least), -but may pass it through as a string consisting of the literal characters -E, less-than, I<identifier>, greater-than. Or Pod parsers may offer the -alternative option of processing such unknown -"EE<lt>I<identifier>>" codes by firing an event especially -for such codes, or by adding a special node-type to the in-memory -document tree. Such "EE<lt>I<identifier>>" may have special meaning -to some processors, or some processors may choose to add them to -a special error report. - -=item * - -Pod parsers must also support the XHTML codes "EE<lt>quot>" for -character 34 (doublequote, "), "EE<lt>amp>" for character 38 -(ampersand, &), and "EE<lt>apos>" for character 39 (apostrophe, '). - -=item * - -Note that in all cases of "EE<lt>whatever>", I<whatever> (whether -an htmlname, or a number in any base) must consist only of -alphanumeric characters -- that is, I<whatever> must watch -C<m/\A\w+\z/>. So "EE<lt> 0 1 2 3 >" is invalid, because -it contains spaces, which aren't alphanumeric characters. This -presumably does not I<need> special treatment by a Pod processor; -" 0 1 2 3 " doesn't look like a number in any base, so it would -presumably be looked up in the table of HTML-like names. Since -there isn't (and cannot be) an HTML-like entity called " 0 1 2 3 ", -this will be treated as an error. However, Pod processors may -treat "EE<lt> 0 1 2 3 >" or "EE<lt>e-acute>" as I<syntactically> -invalid, potentially earning a different error message than the -error message (or warning, or event) generated by a merely unknown -(but theoretically valid) htmlname, as in "EE<lt>qacute>" -[sic]. However, Pod parsers are not required to make this -distinction. - -=item * - -Note that EE<lt>number> I<must not> be interpreted as simply -"codepoint I<number> in the current/native character set". It always -means only "the character represented by codepoint I<number> in -Unicode." (This is identical to the semantics of &#I<number>; in XML.) - -This will likely require many formatters to have tables mapping from -treatable Unicode codepoints (such as the "\xE9" for the e-acute -character) to the escape sequences or codes necessary for conveying -such sequences in the target output format. A converter to *roff -would, for example know that "\xE9" (whether conveyed literally, or via -a EE<lt>...> sequence) is to be conveyed as "e\\*'". -Similarly, a program rendering Pod in a Mac OS application window, would -presumably need to know that "\xE9" maps to codepoint 142 in MacRoman -encoding that (at time of writing) is native for Mac OS. Such -Unicode2whatever mappings are presumably already widely available for -common output formats. (Such mappings may be incomplete! Implementers -are not expected to bend over backwards in an attempt to render -Cherokee syllabics, Etruscan runes, Byzantine musical symbols, or any -of the other weird things that Unicode can encode.) And -if a Pod document uses a character not found in such a mapping, the -formatter should consider it an unrenderable character. - -=item * - -If, surprisingly, the implementor of a Pod formatter can't find a -satisfactory pre-existing table mapping from Unicode characters to -escapes in the target format (e.g., a decent table of Unicode -characters to *roff escapes), it will be necessary to build such a -table. If you are in this circumstance, you should begin with the -characters in the range 0x00A0 - 0x00FF, which is mostly the heavily -used accented characters. Then proceed (as patience permits and -fastidiousness compels) through the characters that the (X)HTML -standards groups judged important enough to merit mnemonics -for. These are declared in the (X)HTML specifications at the -www.W3.org site. At time of writing (September 2001), the most recent -entity declaration files are: - - http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent - http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent - http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent - -Then you can progress through any remaining notable Unicode characters -in the range 0x2000-0x204D (consult the character tables at -www.unicode.org), and whatever else strikes your fancy. For example, -in F<xhtml-symbol.ent>, there is the entry: - - <!ENTITY infin "∞"> <!-- infinity, U+221E ISOtech --> - -While the mapping "infin" to the character "\x{221E}" will (hopefully) -have been already handled by the Pod parser, the presence of the -character in this file means that it's reasonably important enough to -include in a formatter's table that maps from notable Unicode characters -to the codes necessary for rendering them. So for a Unicode-to-*roff -mapping, for example, this would merit the entry: - - "\x{221E}" => '\(in', - -It is eagerly hoped that in the future, increasing numbers of formats -(and formatters) will support Unicode characters directly (as (X)HTML -does with C<∞>, C<∞>, or C<∞>), reducing the need -for idiosyncratic mappings of Unicode-to-I<my_escapes>. - -=item * - -It is up to individual Pod formatter to display good judgment when -confronted with an unrenderable character (which is distinct from an -unknown EE<lt>thing> sequence that the parser couldn't resolve to -anything, renderable or not). It is good practice to map Latin letters -with diacritics (like "EE<lt>eacute>"/"EE<lt>233>") to the corresponding -unaccented US-ASCII letters (like a simple character 101, "e"), but -clearly this is often not feasible, and an unrenderable character may -be represented as "?", or the like. In attempting a sane fallback -(as from EE<lt>233> to "e"), Pod formatters may use the -%Latin1Code_to_fallback table in L<Pod::Escapes|Pod::Escapes>, or -L<Text::Unidecode|Text::Unidecode>, if available. - -For example, this Pod text: - - magic is enabled if you set C<$Currency> to 'E<euro>'. - -may be rendered as: -"magic is enabled if you set C<$Currency> to 'I<?>'" or as -"magic is enabled if you set C<$Currency> to 'B<[euro]>'", or as -"magic is enabled if you set C<$Currency> to '[x20AC]', etc. - -A Pod formatter may also note, in a comment or warning, a list of what -unrenderable characters were encountered. - -=item * - -EE<lt>...> may freely appear in any formatting code (other than -in another EE<lt>...> or in an ZE<lt>>). That is, "XE<lt>The -EE<lt>euro>1,000,000 Solution>" is valid, as is "LE<lt>The -EE<lt>euro>1,000,000 Solution|Million::Euros>". - -=item * - -Some Pod formatters output to formats that implement nonbreaking -spaces as an individual character (which I'll call "NBSP"), and -others output to formats that implement nonbreaking spaces just as -spaces wrapped in a "don't break this across lines" code. Note that -at the level of Pod, both sorts of codes can occur: Pod can contain a -NBSP character (whether as a literal, or as a "EE<lt>160>" or -"EE<lt>nbsp>" code); and Pod can contain "SE<lt>foo -IE<lt>barE<gt> baz>" codes, where "mere spaces" (character 32) in -such codes are taken to represent nonbreaking spaces. Pod -parsers should consider supporting the optional parsing of "SE<lt>foo -IE<lt>barE<gt> baz>" as if it were -"fooI<NBSP>IE<lt>barE<gt>I<NBSP>baz", and, going the other way, the -optional parsing of groups of words joined by NBSP's as if each group -were in a SE<lt>...> code, so that formatters may use the -representation that maps best to what the output format demands. - -=item * - -Some processors may find that the C<SE<lt>...E<gt>> code is easiest to -implement by replacing each space in the parse tree under the content -of the S, with an NBSP. But note: the replacement should apply I<not> to -spaces in I<all> text, but I<only> to spaces in I<printable> text. (This -distinction may or may not be evident in the particular tree/event -model implemented by the Pod parser.) For example, consider this -unusual case: - - S<L</Autoloaded Functions>> - -This means that the space in the middle of the visible link text must -not be broken across lines. In other words, it's the same as this: - - L<"AutoloadedE<160>Functions"/Autoloaded Functions> - -However, a misapplied space-to-NBSP replacement could (wrongly) -produce something equivalent to this: - - L<"AutoloadedE<160>Functions"/AutoloadedE<160>Functions> - -...which is almost definitely not going to work as a hyperlink (assuming -this formatter outputs a format supporting hypertext). - -Formatters may choose to just not support the S format code, -especially in cases where the output format simply has no NBSP -character/code and no code for "don't break this stuff across lines". - -=item * - -Besides the NBSP character discussed above, implementors are reminded -of the existence of the other "special" character in Latin-1, the -"soft hyphen" character, also known as "discretionary hyphen", -i.e. C<EE<lt>173E<gt>> = C<EE<lt>0xADE<gt>> = -C<EE<lt>shyE<gt>>). This character expresses an optional hyphenation -point. That is, it normally renders as nothing, but may render as a -"-" if a formatter breaks the word at that point. Pod formatters -should, as appropriate, do one of the following: 1) render this with -a code with the same meaning (e.g., "\-" in RTF), 2) pass it through -in the expectation that the formatter understands this character as -such, or 3) delete it. - -For example: - - sigE<shy>action - manuE<shy>script - JarkE<shy>ko HieE<shy>taE<shy>nieE<shy>mi - -These signal to a formatter that if it is to hyphenate "sigaction" -or "manuscript", then it should be done as -"sig-I<[linebreak]>action" or "manu-I<[linebreak]>script" -(and if it doesn't hyphenate it, then the C<EE<lt>shyE<gt>> doesn't -show up at all). And if it is -to hyphenate "Jarkko" and/or "Hietaniemi", it can do -so only at the points where there is a C<EE<lt>shyE<gt>> code. - -In practice, it is anticipated that this character will not be used -often, but formatters should either support it, or delete it. - -=item * - -If you think that you want to add a new command to Pod (like, say, a -"=biblio" command), consider whether you could get the same -effect with a for or begin/end sequence: "=for biblio ..." or "=begin -biblio" ... "=end biblio". Pod processors that don't understand -"=for biblio", etc, will simply ignore it, whereas they may complain -loudly if they see "=biblio". - -=item * - -Throughout this document, "Pod" has been the preferred spelling for -the name of the documentation format. One may also use "POD" or -"pod". For the documentation that is (typically) in the Pod -format, you may use "pod", or "Pod", or "POD". Understanding these -distinctions is useful; but obsessing over how to spell them, usually -is not. - -=back - - - - - -=head1 About LE<lt>...E<gt> Codes - -As you can tell from a glance at L<perlpod|perlpod>, the LE<lt>...> -code is the most complex of the Pod formatting codes. The points below -will hopefully clarify what it means and how processors should deal -with it. - -=over - -=item * - -In parsing an LE<lt>...> code, Pod parsers must distinguish at least -four attributes: - -=over - -=item First: - -The link-text. If there is none, this must be undef. (E.g., in -"LE<lt>Perl Functions|perlfunc>", the link-text is "Perl Functions". -In "LE<lt>Time::HiRes>" and even "LE<lt>|Time::HiRes>", there is no -link text. Note that link text may contain formatting.) - -=item Second: - -The possibly inferred link-text -- i.e., if there was no real link -text, then this is the text that we'll infer in its place. (E.g., for -"LE<lt>Getopt::Std>", the inferred link text is "Getopt::Std".) - -=item Third: - -The name or URL, or undef if none. (E.g., in "LE<lt>Perl -Functions|perlfunc>", the name -- also sometimes called the page -- -is "perlfunc". In "LE<lt>/CAVEATS>", the name is undef.) - -=item Fourth: - -The section (AKA "item" in older perlpods), or undef if none. E.g., -in L<Getopt::Std/DESCRIPTION>, "DESCRIPTION" is the section. (Note -that this is not the same as a manpage section like the "5" in "man 5 -crontab". "Section Foo" in the Pod sense means the part of the text -that's introduced by the heading or item whose text is "Foo".) - -=back - -Pod parsers may also note additional attributes including: - -=over - -=item Fifth: - -A flag for whether item 3 (if present) is a URL (like -"http://lists.perl.org" is), in which case there should be no section -attribute; a Pod name (like "perldoc" and "Getopt::Std" are); or -possibly a man page name (like "crontab(5)" is). - -=item Sixth: - -The raw original LE<lt>...> content, before text is split on -"|", "/", etc, and before EE<lt>...> codes are expanded. - -=back - -(The above were numbered only for concise reference below. It is not -a requirement that these be passed as an actual list or array.) - -For example: - - L<Foo::Bar> - => undef, # link text - "Foo::Bar", # possibly inferred link text - "Foo::Bar", # name - undef, # section - 'pod', # what sort of link - "Foo::Bar" # original content - - L<Perlport's section on NL's|perlport/Newlines> - => "Perlport's section on NL's", # link text - "Perlport's section on NL's", # possibly inferred link text - "perlport", # name - "Newlines", # section - 'pod', # what sort of link - "Perlport's section on NL's|perlport/Newlines" # orig. content - - L<perlport/Newlines> - => undef, # link text - '"Newlines" in perlport', # possibly inferred link text - "perlport", # name - "Newlines", # section - 'pod', # what sort of link - "perlport/Newlines" # original content - - L<crontab(5)/"DESCRIPTION"> - => undef, # link text - '"DESCRIPTION" in crontab(5)', # possibly inferred link text - "crontab(5)", # name - "DESCRIPTION", # section - 'man', # what sort of link - 'crontab(5)/"DESCRIPTION"' # original content - - L</Object Attributes> - => undef, # link text - '"Object Attributes"', # possibly inferred link text - undef, # name - "Object Attributes", # section - 'pod', # what sort of link - "/Object Attributes" # original content - - L<http://www.perl.org/> - => undef, # link text - "http://www.perl.org/", # possibly inferred link text - "http://www.perl.org/", # name - undef, # section - 'url', # what sort of link - "http://www.perl.org/" # original content - -Note that you can distinguish URL-links from anything else by the -fact that they match C<m/\A\w+:[^:\s]\S*\z/>. So -C<LE<lt>http://www.perl.comE<gt>> is a URL, but -C<LE<lt>HTTP::ResponseE<gt>> isn't. - -=item * - -In case of LE<lt>...> codes with no "text|" part in them, -older formatters have exhibited great variation in actually displaying -the link or cross reference. For example, LE<lt>crontab(5)> would render -as "the C<crontab(5)> manpage", or "in the C<crontab(5)> manpage" -or just "C<crontab(5)>". - -Pod processors must now treat "text|"-less links as follows: - - L<name> => L<name|name> - L</section> => L<"section"|/section> - L<name/section> => L<"section" in name|name/section> - -=item * - -Note that section names might contain markup. I.e., if a section -starts with: - - =head2 About the C<-M> Operator - -or with: - - =item About the C<-M> Operator - -then a link to it would look like this: - - L<somedoc/About the C<-M> Operator> - -Formatters may choose to ignore the markup for purposes of resolving -the link and use only the renderable characters in the section name, -as in: - - <h1><a name="About_the_-M_Operator">About the <code>-M</code> - Operator</h1> - - ... - - <a href="somedoc#About_the_-M_Operator">About the <code>-M</code> - Operator" in somedoc</a> - -=item * - -Previous versions of perlpod distinguished C<LE<lt>name/"section"E<gt>> -links from C<LE<lt>name/itemE<gt>> links (and their targets). These -have been merged syntactically and semantically in the current -specification, and I<section> can refer either to a "=headI<n> Heading -Content" command or to a "=item Item Content" command. This -specification does not specify what behavior should be in the case -of a given document having several things all seeming to produce the -same I<section> identifier (e.g., in HTML, several things all producing -the same I<anchorname> in <a name="I<anchorname>">...</a> -elements). Where Pod processors can control this behavior, they should -use the first such anchor. That is, C<LE<lt>Foo/BarE<gt>> refers to the -I<first> "Bar" section in Foo. - -But for some processors/formats this cannot be easily controlled; as -with the HTML example, the behavior of multiple ambiguous -<a name="I<anchorname>">...</a> is most easily just left up to -browsers to decide. - -=item * - -Authors wanting to link to a particular (absolute) URL, must do so -only with "LE<lt>scheme:...>" codes (like -LE<lt>http://www.perl.org>), and must not attempt "LE<lt>Some Site -Name|scheme:...>" codes. This restriction avoids many problems -in parsing and rendering LE<lt>...> codes. - -=item * - -In a C<LE<lt>text|...E<gt>> code, text may contain formatting codes -for formatting or for EE<lt>...> escapes, as in: - - L<B<ummE<234>stuff>|...> - -For C<LE<lt>...E<gt>> codes without a "name|" part, only -C<EE<lt>...E<gt>> and C<ZE<lt>E<gt>> codes may occur -- no -other formatting codes. That is, authors should not use -"C<LE<lt>BE<lt>Foo::BarE<gt>E<gt>>". - -Note, however, that formatting codes and ZE<lt>>'s can occur in any -and all parts of an LE<lt>...> (i.e., in I<name>, I<section>, I<text>, -and I<url>). - -Authors must not nest LE<lt>...> codes. For example, "LE<lt>The -LE<lt>Foo::Bar> man page>" should be treated as an error. - -=item * - -Note that Pod authors may use formatting codes inside the "text" -part of "LE<lt>text|name>" (and so on for LE<lt>text|/"sec">). - -In other words, this is valid: - - Go read L<the docs on C<$.>|perlvar/"$."> - -Some output formats that do allow rendering "LE<lt>...>" codes as -hypertext, might not allow the link-text to be formatted; in -that case, formatters will have to just ignore that formatting. - -=item * - -At time of writing, C<LE<lt>nameE<gt>> values are of two types: -either the name of a Pod page like C<LE<lt>Foo::BarE<gt>> (which -might be a real Perl module or program in an @INC / PATH -directory, or a .pod file in those places); or the name of a UNIX -man page, like C<LE<lt>crontab(5)E<gt>>. In theory, C<LE<lt>chmodE<gt>> -in ambiguous between a Pod page called "chmod", or the Unix man page -"chmod" (in whatever man-section). However, the presence of a string -in parens, as in "crontab(5)", is sufficient to signal that what -is being discussed is not a Pod page, and so is presumably a -UNIX man page. The distinction is of no importance to many -Pod processors, but some processors that render to hypertext formats -may need to distinguish them in order to know how to render a -given C<LE<lt>fooE<gt>> code. - -=item * - -Previous versions of perlpod allowed for a C<LE<lt>sectionE<gt>> syntax -(as in "C<LE<lt>Object AttributesE<gt>>"), which was not easily distinguishable -from C<LE<lt>nameE<gt>> syntax. This syntax is no longer in the -specification, and has been replaced by the C<LE<lt>"section"E<gt>> syntax -(where the quotes were formerly optional). Pod parsers should tolerate -the C<LE<lt>sectionE<gt>> syntax, for a while at least. The suggested -heuristic for distinguishing C<LE<lt>sectionE<gt>> from C<LE<lt>nameE<gt>> -is that if it contains any whitespace, it's a I<section>. Pod processors -may warn about this being deprecated syntax. - -=back - -=head1 About =over...=back Regions - -"=over"..."=back" regions are used for various kinds of list-like -structures. (I use the term "region" here simply as a collective -term for everything from the "=over" to the matching "=back".) - -=over - -=item * - -The non-zero numeric I<indentlevel> in "=over I<indentlevel>" ... -"=back" is used for giving the formatter a clue as to how many -"spaces" (ems, or roughly equivalent units) it should tab over, -although many formatters will have to convert this to an absolute -measurement that may not exactly match with the size of spaces (or M's) -in the document's base font. Other formatters may have to completely -ignore the number. The lack of any explicit I<indentlevel> parameter is -equivalent to an I<indentlevel> value of 4. Pod processors may -complain if I<indentlevel> is present but is not a positive number -matching C<m/\A(\d*\.)?\d+\z/>. - -=item * - -Authors of Pod formatters are reminded that "=over" ... "=back" may -map to several different constructs in your output format. For -example, in converting Pod to (X)HTML, it can map to any of -<ul>...</ul>, <ol>...</ol>, <dl>...</dl>, or -<blockquote>...</blockquote>. Similarly, "=item" can map to <li> or -<dt>. - -=item * - -Each "=over" ... "=back" region should be one of the following: - -=over - -=item * - -An "=over" ... "=back" region containing only "=item *" commands, -each followed by some number of ordinary/verbatim paragraphs, other -nested "=over" ... "=back" regions, "=for..." paragraphs, and -"=begin"..."=end" regions. - -(Pod processors must tolerate a bare "=item" as if it were "=item -*".) Whether "*" is rendered as a literal asterisk, an "o", or as -some kind of real bullet character, is left up to the Pod formatter, -and may depend on the level of nesting. - -=item * - -An "=over" ... "=back" region containing only -C<m/\A=item\s+\d+\.?\s*\z/> paragraphs, each one (or each group of them) -followed by some number of ordinary/verbatim paragraphs, other nested -"=over" ... "=back" regions, "=for..." paragraphs, and/or -"=begin"..."=end" codes. Note that the numbers must start at 1 -in each section, and must proceed in order and without skipping -numbers. - -(Pod processors must tolerate lines like "=item 1" as if they were -"=item 1.", with the period.) - -=item * - -An "=over" ... "=back" region containing only "=item [text]" -commands, each one (or each group of them) followed by some number of -ordinary/verbatim paragraphs, other nested "=over" ... "=back" -regions, or "=for..." paragraphs, and "=begin"..."=end" regions. - -The "=item [text]" paragraph should not match -C<m/\A=item\s+\d+\.?\s*\z/> or C<m/\A=item\s+\*\s*\z/>, nor should it -match just C<m/\A=item\s*\z/>. - -=item * - -An "=over" ... "=back" region containing no "=item" paragraphs at -all, and containing only some number of -ordinary/verbatim paragraphs, and possibly also some nested "=over" -... "=back" regions, "=for..." paragraphs, and "=begin"..."=end" -regions. Such an itemless "=over" ... "=back" region in Pod is -equivalent in meaning to a "<blockquote>...</blockquote>" element in -HTML. - -=back - -Note that with all the above cases, you can determine which type of -"=over" ... "=back" you have, by examining the first (non-"=cut", -non-"=pod") Pod paragraph after the "=over" command. - -=item * - -Pod formatters I<must> tolerate arbitrarily large amounts of text -in the "=item I<text...>" paragraph. In practice, most such -paragraphs are short, as in: - - =item For cutting off our trade with all parts of the world - -But they may be arbitrarily long: - - =item For transporting us beyond seas to be tried for pretended - offenses - - =item He is at this time transporting large armies of foreign - mercenaries to complete the works of death, desolation and - tyranny, already begun with circumstances of cruelty and perfidy - scarcely paralleled in the most barbarous ages, and totally - unworthy the head of a civilized nation. - -=item * - -Pod processors should tolerate "=item *" / "=item I<number>" commands -with no accompanying paragraph. The middle item is an example: - - =over - - =item 1 - - Pick up dry cleaning. - - =item 2 - - =item 3 - - Stop by the store. Get Abba Zabas, Stoli, and cheap lawn chairs. - - =back - -=item * - -No "=over" ... "=back" region can contain headings. Processors may -treat such a heading as an error. - -=item * - -Note that an "=over" ... "=back" region should have some -content. That is, authors should not have an empty region like this: - - =over - - =back - -Pod processors seeing such a contentless "=over" ... "=back" region, -may ignore it, or may report it as an error. - -=item * - -Processors must tolerate an "=over" list that goes off the end of the -document (i.e., which has no matching "=back"), but they may warn -about such a list. - -=item * - -Authors of Pod formatters should note that this construct: - - =item Neque - - =item Porro - - =item Quisquam Est - - Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci - velit, sed quia non numquam eius modi tempora incidunt ut - labore et dolore magnam aliquam quaerat voluptatem. - - =item Ut Enim - -is semantically ambiguous, in a way that makes formatting decisions -a bit difficult. On the one hand, it could be mention of an item -"Neque", mention of another item "Porro", and mention of another -item "Quisquam Est", with just the last one requiring the explanatory -paragraph "Qui dolorem ipsum quia dolor..."; and then an item -"Ut Enim". In that case, you'd want to format it like so: - - Neque - - Porro - - Quisquam Est - Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci - velit, sed quia non numquam eius modi tempora incidunt ut - labore et dolore magnam aliquam quaerat voluptatem. - - Ut Enim - -But it could equally well be a discussion of three (related or equivalent) -items, "Neque", "Porro", and "Quisquam Est", followed by a paragraph -explaining them all, and then a new item "Ut Enim". In that case, you'd -probably want to format it like so: - - Neque - Porro - Quisquam Est - Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci - velit, sed quia non numquam eius modi tempora incidunt ut - labore et dolore magnam aliquam quaerat voluptatem. - - Ut Enim - -But (for the forseeable future), Pod does not provide any way for Pod -authors to distinguish which grouping is meant by the above -"=item"-cluster structure. So formatters should format it like so: - - Neque - - Porro - - Quisquam Est - - Qui dolorem ipsum quia dolor sit amet, consectetur, adipisci - velit, sed quia non numquam eius modi tempora incidunt ut - labore et dolore magnam aliquam quaerat voluptatem. - - Ut Enim - -That is, there should be (at least roughly) equal spacing between -items as between paragraphs (although that spacing may well be less -than the full height of a line of text). This leaves it to the reader -to use (con)textual cues to figure out whether the "Qui dolorem -ipsum..." paragraph applies to the "Quisquam Est" item or to all three -items "Neque", "Porro", and "Quisquam Est". While not an ideal -situation, this is preferable to providing formatting cues that may -be actually contrary to the author's intent. - -=back - - - -=head1 About Data Paragraphs and "=begin/=end" Regions - -Data paragraphs are typically used for inlining non-Pod data that is -to be used (typically passed through) when rendering the document to -a specific format: - - =begin rtf - - \par{\pard\qr\sa4500{\i Printed\~\chdate\~\chtime}\par} - - =end rtf - -The exact same effect could, incidentally, be achieved with a single -"=for" paragraph: - - =for rtf \par{\pard\qr\sa4500{\i Printed\~\chdate\~\chtime}\par} - -(Although that is not formally a data paragraph, it has the same -meaning as one, and Pod parsers may parse it as one.) - -Another example of a data paragraph: - - =begin html - - I like <em>PIE</em>! - - <hr>Especially pecan pie! - - =end html - -If these were ordinary paragraphs, the Pod parser would try to -expand the "EE<lt>/em>" (in the first paragraph) as a formatting -code, just like "EE<lt>lt>" or "EE<lt>eacute>". But since this -is in a "=begin I<identifier>"..."=end I<identifier>" region I<and> -the identifier "html" doesn't begin have a ":" prefix, the contents -of this region are stored as data paragraphs, instead of being -processed as ordinary paragraphs (or if they began with a spaces -and/or tabs, as verbatim paragraphs). - -As a further example: At time of writing, no "biblio" identifier is -supported, but suppose some processor were written to recognize it as -a way of (say) denoting a bibliographic reference (necessarily -containing formatting codes in ordinary paragraphs). The fact that -"biblio" paragraphs were meant for ordinary processing would be -indicated by prefacing each "biblio" identifier with a colon: - - =begin :biblio - - Wirth, Niklaus. 1976. I<Algorithms + Data Structures = - Programs.> Prentice-Hall, Englewood Cliffs, NJ. - - =end :biblio - -This would signal to the parser that paragraphs in this begin...end -region are subject to normal handling as ordinary/verbatim paragraphs -(while still tagged as meant only for processors that understand the -"biblio" identifier). The same effect could be had with: - - =for :biblio - Wirth, Niklaus. 1976. I<Algorithms + Data Structures = - Programs.> Prentice-Hall, Englewood Cliffs, NJ. - -The ":" on these identifiers means simply "process this stuff -normally, even though the result will be for some special target". -I suggest that parser APIs report "biblio" as the target identifier, -but also report that it had a ":" prefix. (And similarly, with the -above "html", report "html" as the target identifier, and note the -I<lack> of a ":" prefix.) - -Note that a "=begin I<identifier>"..."=end I<identifier>" region where -I<identifier> begins with a colon, I<can> contain commands. For example: - - =begin :biblio - - Wirth's classic is available in several editions, including: - - =for comment - hm, check abebooks.com for how much used copies cost. - - =over - - =item - - Wirth, Niklaus. 1975. I<Algorithmen und Datenstrukturen.> - Teubner, Stuttgart. [Yes, it's in German.] - - =item - - Wirth, Niklaus. 1976. I<Algorithms + Data Structures = - Programs.> Prentice-Hall, Englewood Cliffs, NJ. - - =back - - =end :biblio - -Note, however, a "=begin I<identifier>"..."=end I<identifier>" -region where I<identifier> does I<not> begin with a colon, should not -directly contain "=head1" ... "=head4" commands, nor "=over", nor "=back", -nor "=item". For example, this may be considered invalid: - - =begin somedata - - This is a data paragraph. - - =head1 Don't do this! - - This is a data paragraph too. - - =end somedata - -A Pod processor may signal that the above (specifically the "=head1" -paragraph) is an error. Note, however, that the following should -I<not> be treated as an error: - - =begin somedata - - This is a data paragraph. - - =cut - - # Yup, this isn't Pod anymore. - sub excl { (rand() > .5) ? "hoo!" : "hah!" } - - =pod - - This is a data paragraph too. - - =end somedata - -And this too is valid: - - =begin someformat - - This is a data paragraph. - - And this is a data paragraph. - - =begin someotherformat - - This is a data paragraph too. - - And this is a data paragraph too. - - =begin :yetanotherformat - - =head2 This is a command paragraph! - - This is an ordinary paragraph! - - And this is a verbatim paragraph! - - =end :yetanotherformat - - =end someotherformat - - Another data paragraph! - - =end someformat - -The contents of the above "=begin :yetanotherformat" ... -"=end :yetanotherformat" region I<aren't> data paragraphs, because -the immediately containing region's identifier (":yetanotherformat") -begins with a colon. In practice, most regions that contain -data paragraphs will contain I<only> data paragraphs; however, -the above nesting is syntactically valid as Pod, even if it is -rare. However, the handlers for some formats, like "html", -will accept only data paragraphs, not nested regions; and they may -complain if they see (targeted for them) nested regions, or commands, -other than "=end", "=pod", and "=cut". - -Also consider this valid structure: - - =begin :biblio - - Wirth's classic is available in several editions, including: - - =over - - =item - - Wirth, Niklaus. 1975. I<Algorithmen und Datenstrukturen.> - Teubner, Stuttgart. [Yes, it's in German.] - - =item - - Wirth, Niklaus. 1976. I<Algorithms + Data Structures = - Programs.> Prentice-Hall, Englewood Cliffs, NJ. - - =back - - Buy buy buy! - - =begin html - - <img src='wirth_spokesmodeling_book.png'> - - <hr> - - =end html - - Now now now! - - =end :biblio - -There, the "=begin html"..."=end html" region is nested inside -the larger "=begin :biblio"..."=end :biblio" region. Note that the -content of the "=begin html"..."=end html" region is data -paragraph(s), because the immediately containing region's identifier -("html") I<doesn't> begin with a colon. - -Pod parsers, when processing a series of data paragraphs one -after another (within a single region), should consider them to -be one large data paragraph that happens to contain blank lines. So -the content of the above "=begin html"..."=end html" I<may> be stored -as two data paragraphs (one consisting of -"<img src='wirth_spokesmodeling_book.png'>\n" -and another consisting of "<hr>\n"), but I<should> be stored as -a single data paragraph (consisting of -"<img src='wirth_spokesmodeling_book.png'>\n\n<hr>\n"). - -Pod processors should tolerate empty -"=begin I<something>"..."=end I<something>" regions, -empty "=begin :I<something>"..."=end :I<something>" regions, and -contentless "=for I<something>" and "=for :I<something>" -paragraphs. I.e., these should be tolerated: - - =for html - - =begin html - - =end html - - =begin :biblio - - =end :biblio - -Incidentally, note that there's no easy way to express a data -paragraph starting with something that looks like a command. Consider: - - =begin stuff - - =shazbot - - =end stuff - -There, "=shazbot" will be parsed as a Pod command "shazbot", not as a data -paragraph "=shazbot\n". However, you can express a data paragraph consisting -of "=shazbot\n" using this code: - - =for stuff =shazbot - -The situation where this is necessary, is presumably quite rare. - -Note that =end commands must match the currently open =begin command. That -is, they must properly nest. For example, this is valid: - - =begin outer - - X - - =begin inner - - Y - - =end inner - - Z - - =end outer - -while this is invalid: - - =begin outer - - X - - =begin inner - - Y - - =end outer - - Z - - =end inner - -This latter is improper because when the "=end outer" command is seen, the -currently open region has the formatname "inner", not "outer". (It just -happens that "outer" is the format name of a higher-up region.) This is -an error. Processors must by default report this as an error, and may halt -processing the document containing that error. A corollary of this is that -regions cannot "overlap" -- i.e., the latter block above does not represent -a region called "outer" which contains X and Y, overlapping a region called -"inner" which contains Y and Z. But because it is invalid (as all -apparently overlapping regions would be), it doesn't represent that, or -anything at all. - -Similarly, this is invalid: - - =begin thing - - =end hting - -This is an error because the region is opened by "thing", and the "=end" -tries to close "hting" [sic]. - -This is also invalid: - - =begin thing - - =end - -This is invalid because every "=end" command must have a formatname -parameter. - -=head1 SEE ALSO - -L<perlpod>, L<perlsyn/"PODs: Embedded Documentation">, -L<podchecker> - -=head1 AUTHOR - -Sean M. Burke - -=cut - - diff --git a/web/bin/pod2wml.sh b/web/bin/pod2wml.sh deleted file mode 100755 index bb64d40..0000000 --- a/web/bin/pod2wml.sh +++ /dev/null @@ -1,61 +0,0 @@ -pod2wml (){ - base=$1 - [ -z "$descr" ] && descr=$base - [ -z "$menu" ] && menu=$descr - pod2html <$base.pod >$base.html -#Thing.pod Thing.html -# pod2html-5.8.8 --infile=$base.pod --outfile=$base.pre --noindex --htmlroot='$(ROOT)' --podroot=$SITEROOT --podpath=$PODPATH -# $SITEROOT/bin/fix-pod2html.pl $base.pre | $SITEROOT/bin/fix-hrefs.pl >$base.html - echo "<nav:but ${sect}_$base \"$menu\" $base/>" >>navbar.inc - printf "<dt><a href=\"$base.en.html\">" >>index.inc - grep -i $base $base.pod |fgrep ' - '|head -1|sed 's| - |</a></dt><dd>|' >>index.inc - echo "</dd>" >>index.inc - echo "<page page=\"${sect}_$base\"" > $base.wml - perl-5.8.8 -0777 -n -e 's|E<lt>|<|g;s|E<gt>|>|g;m|=head1 AUTHO\S+\s*(.+)| && do {$a=$1;$a =~ s/>.*/>/; $e="no\@address.nowhere";$a=~ s/\s*<(.+?)>\s*,?// and $e=$1; $e=~ s/\s\S+\s/\@/;print "author=\"$a <$e>\"/>\n"}' $base.pod >>$base.wml -true <<'XXXX' - perl-5.8.8 -0777 -n -e ' - s|.*?(<h1.+)</body>.*|$1|s; - for($i=5;$i>0;$i--){ - $j=$i-1; - s|(</?h)$j>|$1$i>|g - }; - s|<h2.*?>.*?NAME.*?</h2>.*?<p.*?>\s*(.+?)\s*- .*?</p>|<h1>$1</h1>|s; - s{<li></li>(.+?)(?=<li>|</?ul>|</?ol>)}{<li>$1</li>}sg; - s|<dt><strong>\s*(.*?)</strong>\s*<dd>|<dt>$1</dt>\n<dd>|sg; - s|<dd>\s*<p>\s*(.*?)\s*</p>\s*</dd>|<dd>$1</dd>|sg; - s|<li>\s*<p>([^<]+?)</p>\s*</li>|<li>$1</li>|sg; - s|<p>\s*</p>|\n|g; - s|\n\s|\n|g; - s|\s*</pre>\s*<pre>\s*|\n\n|g; - s|(\S)</pre>|$1\n</pre>|g; - s|<pre>(.+?)</pre>|<protect><pre>$1</pre></protect>|gs; -# s|<strong>\s*(.+?)\s*</strong><br />\s+</dt>|$1</dt>\n|g; - s|<hr />\s*(<h\d>)|$1|g; - s|<dd>\s*</dd>||gs; - s|<a href=".*?/website|<a href="\$(ROOT)|g; - s|(<h2><a.*?>)\s*(\S)(.+?)\s*(</a></h2>)|$1$2\L$3\E$4|g; - print - ' $base.html >>$base.wml -# rm $base.html - perl-5.8.8 -i~ -0777 -p -e 's|</dd>\s*<pre(.*?)</pre>\s*<dd>|</dd><dd><pre$1</pre></dd><dd>|sg' $base.wml -XXXX - perl-5.8.8 -0777 -n -e ' - s|<h2 id="NAME">.+?TENT">\s*<p>.*?\s-\s(.+?)</p>\s*</div>|<h1 id="NAME">$1</h1>|s; -# s|</p>\s*<dt>|</p></dd>\n<dt>|sg; -# s|</pre>\s*<dt>|</pre></dd>\n<dt>|sg; - s|<pre>(.+?)</pre>|<protect><pre>$1</pre></protect>|gs; -# s|.*?(<h1.+)</body>.*|$1|s; -# for($i=5;$i>0;$i--){ -# $j=$i-1; -# s|(</?h)$j>|$1$i>|g -# }; -# s{http://search.cpan.org/perldoc\?(cfgmaker|indexmaker|mrtg-.+?)"}{\$(ROOT)/doc/$1.en.html"}g; -# s|<h2.*?>.*?NAME.*?</h2>.*?<p.*?>\s*(.+?)\s*- .*?</p>|<h1>$1</h1>|s; - - print - ' $base.html >>$base.wml -# rm $base.html - rm $base.html -# $base.pre - descr="" -} diff --git a/web/build.sh b/web/build.sh deleted file mode 100755 index b533496..0000000 --- a/web/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -SITEROOT=`pwd` -PODPATH=`ls */build.sh | sed -e 's|/.*||g' | perl -0777 -e 'print join ":", map {"$_"} split /\n/, <>'` -export SITEROOT PODPATH -rm */pod*tmp -for x in `ls */build.sh | sed 's|/.*||g'`; do - echo '****' $x '****' - (cd $x;./build.sh) -done - - diff --git a/web/cast/build.sh b/web/cast/build.sh deleted file mode 100755 index 662e5a1..0000000 --- a/web/cast/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -perl -n -e 's/Tobi//;s/\s*[&+]\s*//;s/\s+and\s+//; /^From:\s*(\S+\s\S+)/i && do { $x=$1; $x =~ s/\s*<.+//;$x =~ s/"//g; $x=~ s/\s*location\s*$//; print "$x;\n"}' /home/oetiker/checkouts/mrtg/src/CHANGES | sort -u >contrib.inc diff --git a/web/cast/contrib.inc b/web/cast/contrib.inc deleted file mode 100644 index d545901..0000000 --- a/web/cast/contrib.inc +++ /dev/null @@ -1,379 +0,0 @@ -¶ÀªF¶©; -Adrian Minta; -Adrian Senn; -Adrian Turcu; -Akihiro Sagawa; -Albert Chin-A-Young; -Alberto Pasquale; -alex; -Alex; -Alexander V; -Alexandre BAUMEISTER; -Alexandre Steinberg; -Alexey Milevsky; -Alex Samorukov; -Alon Goldberg; -Al Payne; -Ambrose Li; -Amir Guindehi; -andre; -Andrea Rossi; -Andreas Papst; -Andreas Plesner; -Andrej Ota; -André Silveira; -Andres Kroonmaa; -Andrew A.; -Andrew Farrior; -Andrew Ivanov; -Anri Kopystyansky; -Anthony Fabian; -Anthony Howe; -Antonio Querubin; -Anton Voronin; -Artyom Adjemov; -Assakhof Bin; -Barry Rountree; -Barry van; -Bartosz Kwitniewski; -Ben; -Benjamin Despres; -Benjamin Gufler; -Benoit Artuso; -Bernard Martinet; -Bernd Drefs; -[big5] ¶ÀªF¶©; -bill shamam; -Bjorn Nordbo; -Blair Zajac; -blube; -Brad; -Brian Lube; -Brian Mudge; -Bruijn de,; -Butch Kemper; -calle olsen; -Calle Olsen; -Chad Mynhier; -CHOI Junho; -Chris Chiappa; -Chris Knipe; -chris.merrett melbourne.co.uk; -Chris Pepper; -Christian Birchinger; -Christian Rost; -Clas Mayer; -CmdrData; -Colin Horsington; -Colin Morey; -Cristian Caramida; -Curtis Doty; -Daisuke Aoyama; -Damien; -Dan Harkless; -Daniel Elvin; -Daniel Haun; -Daniel J; -Daniel Trinkle; -Dan Lukes; -Dan.McDonald austinenergy.com; -Dave Habben; -Dave Plonka; -David A.; -David Boone; -David Boyer; -David Corlette; -David Lee; -Davids, Ronald; -Dean, Mike; -Delev Zoran; -dima; -Dima Sivachenko; -Dimitar Kazakov; -Dimitar Pashev; -Dimitrios Stergiou; -Dinko Korunic; -Diogo Gomes; -Dmitry S.; -Dmitry Sivachenko; -Do Jong; -donlong; -Don Russell; -duncan_j_ferguson at; -Emilio Mena; -Erek Dyskant; -Eric Billeter; -Eric Einhorn; -Eric Murat; -Fabian Uebersax; -Fabrice Prigent; -Ferenc Toth; -Fernando Braghetto; -Fernando Nieto; -Francis VIVAT; -Francois Wolmarans; -Fred Korz; -Fuminori -Tany-; -Fuminori Uematsu; -Gellatly, Laurie; -Georgi Georgiev; -Gereon Ruetten; -Gerry Van; -Gianmarco Armellin; -Gill, Vern; -Gleydson Mazioli; -GOMEZ Henri; -Gordon Tetlow; -Gosselin, Gerry; -Graziano; -Graziano Sommariva; -Guenter Knauf; -Günter Knauf; -Hal Dell; -Halldor.Hognason; -Henning P; -Henry Steinhauer; -HERITIER Hervé; -Herold Heiko; -Hideyuki Suzuki; -Hleb Valoshka; -Hoorelbeke Rik; -Horak Daniel; -Hubert Figuiere; -Hui Zhang; -hw; -Ian Duplisse; -Ilja Pavkovic; -imacat; -Iulian Radu; -jackie; -Jaime Damiao; -Jakob Ilves; -Jamaludin Ahmad; -James Golovich; -James Overbeck; -Jan Kasprzak; -Jay Soffian; -Jef Considine; -Jeff Frost; -Jeff Liebermann; -Jeff Woolsey; -Jeremy Chadwick; -Jeremy Hinton; -Jeremy J.; -Jerzy Sobczyk; -Jessica Blackburn; -J. Nick; -Jodok Sutterluety; -Joe Pruett; -Johannes Demel; -John Begley; -john.belshaw cggveritas.com; -John Caruso; -John Dunning/NS/WSC; -John H.; -John Lange; -John Line; -John-Mark Gurney; -John Papandriopoulos; -John Van; -Jonathan Cohn; -Jon Barber; -Jones, Derek; -Jon Rifkin; -Joshua Nichols; -Jozsef Szilagyi; -jpturchi at; -Juergen Baier; -Juergen Obermann; -Juha Laine; -Jussi Siponen; -Justin McCann; -Justin Schoonover; -Justin Shore; -Kari.Hiitola; -Karl Friesen; -Karl M.; -Kenji; -Ken Stieers; -Kevin Benton; -Kevin Sartorelli; -Kit-pui Wong; -Klaus_Klein; -Klaus Schmidinger; -Klemens Kasemaa; -Kloberg Mac; -knut.groneng; -Krister Karlsson; -Ladislav Mihok; -Lars Christiansen; -Lech Szychowski; -Leitch, Roger; -Leonardo Reginin; -Leon Chang; -Levente Nagy; -LLuís Gras; -Lorenzo Colitti; -Lucas; -Lucas Nussbaum; -Luc Pauwels; -Luiz Encarnacao; -Luiz Felipe; -Lukasz Jokiel; -Mac Daddy; -Marc Baudoin; -Marcelo Roccasalva; -Mark D.; -Markley P.; -Markus Schlup; -Martin.Frys; -Martin Goebel; -Martin Opitz; -Martin Røsjorde; -MASUDA Takashi; -Mateusz; -Matija Grabnar; -Matthew Schumacher; -Matthias Cramer; -Mattias Lilliesköld; -Michael Bussmann; -Michael C.; -Michael Med; -Michael P.; -Michael_Soulier; -Michel; -Michele Michelotto; -Miguel Vitorino; -Mike Lawrie; -Mike Mitchel; -Mike Mitchell; -Mike Nealon; -Mike Tkatchouk; -Miloslav Trmac; -Miroslaw.Maczka; -Moose God; -MORI, Takahiro; -Morten Nielsen; -Morten S.; -Nathan Wiger; -Newman, Daniel; -Nick Ellson; -Nick Hilliard; -Nico Kadel-Garcia; -Norbert Klasen; -Norbert.Klasen; -Norm; -Norman Aronsen; -Norman Rasmussen; -NormW; -Oleg Krotoff; -Olexander Kunytsa; -oliver.haid; -Oliver Lehmann; -O'Shaughnessy Evans; -ozgurcd; -Pascal Eeftinck; -Patrick Koppen; -Patrik Andersin; -Paul E.; -Paul Slootman; -Pavel Gulchouck; -Pawe? Go?aszewski; -Pedro Marcolino; -Peter; -Peter Gervai; -Peter K; -Peter W.; -Peter Wirdemo; -Philipp Capoy; -Philippe.Simonet; -Pierfrancesco Caci; -Pietro Falessi; -Poetzel, Christopher; -Purvis, William; -Quentin Dunchue; -Quip; -Rafael Martinez; -Rainer Bawidamann; -Rainer.Bawidamann; -Ralf Weber; -Ratko Bucic; -Rawlin Blake; -redrat at; -Ricardo Bravo; -Richard Bullington-McGuire; -Richard Kwong; -riocat(^..^)~; -Robert Allmeroth; -Robert Boyle; -Roddy Strachan; -Rodrigue Assard; -Roman Festchook; -Ronald Florence; -Rory Clancy; -Roy-Magne Mo; -Ruben Cheng; -Russell Carleton; -Russ Price; -Ryan Finnie; -Sergio Chiesa; -Sergiy Guminilovych; -seweryn; -Simon Barnes; -Simon Butcher; -Simon Leinen; -Simon LeinenMike; -Simon Lyall; -Simos Xenitellis; -Spain, Jeffry; -Starkweather, Mike; -Stefan Loidl; -Stefan.Schnitter t-systems.com; -Stefan stefan; -Stephen Heise; -Stephen Satchell; -Steve Alligood; -Steve Bonds; -Steven Bakker; -Steven Micallef; -Steven Shipway; -Steven.Shipway; -Steve Pierce,; -Steve Shipway; -Stieers, Ken; -Stuart Henderson; -Sune Kirkeby; -Systems Administrator; -Szabo Balazs; -Tate; -Thomas Abthorpe; -Thomas Brian; -Thomas Lehnig; -Thomas Muggli; -Tim Cimarusti; -Tomas Pospisek; -Tom Pala; -Tony-Farr (Canberra); -T. Pospisek; -Ù¤Âê¹û; -Ulf Härnhammar; -Us; -Valerio Bontempi; -ve; -Vitezslav Crhonek; -Vlado Potisk; -Walery Kokarev; -webmaster; -Willem Jaap; -William P.; -Wolfgang Hoffmann; -x; -Xenitellis S; -Yo; -yoshimoto; -yours truely; -Yovko Lambrev; -Yozo Toda; -Yusaku Nakajima; -Zaphod Beeblebrox; -zurkabsd; diff --git a/web/cast/index.wml b/web/cast/index.wml deleted file mode 100644 index 66149b9..0000000 --- a/web/cast/index.wml +++ /dev/null @@ -1,31 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "cast"> - -<H1>Cast</H1> - -<h2>Main Characters</h2> - -<p><b><a href="http://tobi.oetiker.ch">Tobias Oetiker</a></b> -- original design, main developer.</p> -<p><b>Dave Rand</b> -- created the rateup program and got me started on mrtg-2.</p> -<p><b>Simon Leinen</b> -- wrote the perl SNMP library included with mrtg.</p> -<p><b>Daniel J McDonald</b> and <b>Mike Mitchell</b> -- contributed SNMPv3 support.</p> -<p><b>Jakob Ilves</b> -- rewrote cfgmaker for maximum flexibilty.</p> -<p><b>Valerio Bontempi</b> and <b>Lorenzo Colitti</b> -- added IpV6 support.</p> -<p><b>Alex van den Bogaerdt</b> and <b>Paul C. Williamson</b> -- act as mailinglist guardians.</p> - -<h2>Also With</h2> - -<p><b><a href="http://www.timkennedy.net">Tim Kennedy</a></b> -- who provides the www.mrtg.org dns reflector</p> - -<h2>Additional Cast</h2> - -<p>Over the years many people have coded for MRTG. Their contributions -have helped greatly to make MRTG as useful as it is today.</p> - -<p> -#include "contrib.inc" -</p> - -<p>Note that above list is generated from the records I have in the CHANGES -file. If your name came out wrong, please let me know so that I can fix -it.</p> diff --git a/web/design.css b/web/design.css deleted file mode 100644 index 4865530..0000000 --- a/web/design.css +++ /dev/null @@ -1,316 +0,0 @@ -body { - background-color:#FFFFFF; - padding:10px; - font-family: sans-serif; - margin:0px; - max-width: 80em; - min-width: 910px; -} - -/* hide old stuff */ -.legacy { - display: none -} - -#page_header { - background-image : url('images/mrtg_logo.gif'); - background-repeat : no-repeat; - background-position: 0px 10px; - height:71px; - width:100%; - font-size: 10pt; - text-align:right; - border-bottom:3px solid #fe754d; - padding-top:25px; -} - -#page_header a { - color:#345d98; - text-decoration: none; -} - -#main_container { - width: 100%; -} - - -.orange_ruller { -height:3px; -font-size:2px; -background-color: #fe754d; -width:100%; -margin:1px 0px; -padding:0px; -clear :both; -} - -/*Navbar styles start*/ -#navbar_container { - width: 205px; -} - -#menu { - width:205px; - vertical-align:top; - font-size: 10pt; -} - -#menu a { - text-decoration : none; -} -#menu a:hover { - text-decoration : underline; -} - - -/*Removing list decoration in navbar*/ -div#menu ul { - padding:0px; - margin:0px; -} -div#menu li { - list-style-type:none; - padding:0px; - margin:0px; -} - -div#menu li > div { - padding-top: 2px; -} -div#menu > ul > li > div.selected_head { - border:1px solid #345d98; - background-image : url('images/minus.gif'); - background-repeat : no-repeat; - background-position : 4px 0.4ex; - background-color : #345d98; - margin:1px 0px; -} - -div#menu > ul > li > div.selected_head > a { - color : #ffffff; - font-weight:bold; -} - - - -div#menu > ul > li > div { - border:1px solid #345d98; - background-image : url('images/plus.gif'); - background-repeat : no-repeat; - background-position : 4px 0.4ex; - background-color : #345d98; - margin:1px 0px; - padding-left:17px; -} - -div#menu ul > li > div.selected { - background-image : url('images/arr_black_right.gif'); - background-position : 4px 0.5ex; - background-color :#fe754d; - color : #345d98; - font-weight:bold; -} - -div#menu > ul > li > div > a { - color : #ffffff; - font-weight:bold; -} - -div#menu > ul > li > ul > li > div { - background-color:#ffffff; - margin:1px 0px; - border : 1px solid #345d98; -} -div#menu > ul > li > ul > li > div > a { - background-color:#ffffff; - color : #345d98; - font-weight:bold; - margin-left:15px; -} - - -div#menu > ul > li > ul > li > div.selected { - background-image:url('images/arr_black_right.gif'); - background-repeat: no-repeat; - background-position: 5px 0.5ex; - background-color: #fe754d; - border:1px solid #345d98; - padding-left:15px; - font-weight:bold; -} - -div#menu > ul > li > ul > li > div.selected > a { - color:#FFFFFF; -} - - -div#menu > ul > li > ul > li > div.selected_head { - background-image:url('images/arr_black.gif'); - background-repeat : no-repeat; - background-position : 5px 0.6ex; - background-color :#fe754d; - border:1px solid #345d98; -} - -div#menu > ul > li > ul > li > div.selected_head > a { - margin-left:15px; - color:#FFFFFF; - background-color :#fe754d; - font-weight:bold; -} - -div#menu > ul > li > ul > li > ul > li > div { - background-color:#e4e4e4; - background-image:url('images/arr_white.gif'); - background-repeat:no-repeat; - background-position:15px 3px; - border:1px solid #345d98; - margin-top:1px; -} -div#menu > ul > li > ul > li > ul > li > div a { - color : #345d98; - margin-left:23px; -} - -/*Navbar styles end*/ - -/* Content styles start*/ -#content_container { - vertical-align:top; - padding-left:20px; - line-height: 2.6ex; -} - -#content_container h1 { - background-color:#e4e4e4; - padding-left:8px; - padding-top:0.6ex; - padding-bottom: 0.5ex; - margin-top: 1px; - margin-bottom:0.3ex; - line-height: 2.0ex; - -} - -#content_container h1, -#content_container h2, -#content_container h3 -{ - color:#345d98; -} - -#content_container a { - text-decoration:none; -} - -#content_container a[href] { - color:#345d98; - font-weight:bold; - text-decoration:underline; -} - -#content_container pre { - border-style: solid; - border-width: 1px; - border-color: #345d98; - padding: 5px; -} - -#content_container dt { - margin-top: 1ex; - color:#345d98; - font-weight:bold; -} - -#content_container dt a { - color:#345d98; - font-weight:bold; -} - -#content_container dd { - margin-left: 0px; -} - -#content_container dd a { - color:#345d98; - font-weight:bold; -} - -.desc_text { - font-weight:normal; - font-size:10pt; - color : #000000; -} -.orange { - color:#fe754d; -} -/* Content styles end*/ - -/* Footer styles start */ - -#content_container #pageauthor { - color: black; - padding-top: 1em; - padding-bottom: 1em; - font-size: small; -} - -#content_container #pageauthor > a { - text-decoration: none; - color: black; - font-weight:normal; -} - -div#googlead_right { - background-color: #ffffff; - padding-left: 15px; - padding-top: 1px; - padding-bottom: 10px; - float: right; -} - -div#googlead_firefox { - padding-top: 20px; -} - -#page_footer { - clear:both; - /* - background-image : url('images/foot_logo.jpg'); - background-repeat : no-repeat; - background-position : 0px 5px; - */ - border-top:6px solid #345d98; - text-align:right; - height:80px; - width:100%; -} -.footer_splitter { - margin-top:2px; - width:100%; -} -.footer_splitter -#footer_logo { - text-align:left; - vertical-align:middle; -} -#footer_logo img { - margin-top:2px; - border:none; -} -.footer_splitter td { - padding:0px; - margin:0px; - vertical-align:middle; - text-align:right; -} -#page_footer, -#page_footer a { - color:black; - font-weight:normal; - font-size: 10pt; - text-decoration:none; -} - - -/*Footer styles end*/ diff --git a/web/doc/.gitignore b/web/doc/.gitignore deleted file mode 100644 index b1277aa..0000000 --- a/web/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.pod -*.wml -*.tmp
\ No newline at end of file diff --git a/web/doc/build.sh b/web/doc/build.sh deleted file mode 100755 index 89c746e..0000000 --- a/web/doc/build.sh +++ /dev/null @@ -1,25 +0,0 @@ - -#!/bin/sh -sect=doc -src=/home/oetiker/checkouts/mrtg/src/ -. ../bin/pod2wml.sh - -pod2descr() { - pod=$1.pod - descr=`egrep "$1 *- " $pod|head -1|sed 's/.*- //'` - menu=`egrep "$1 *- " $pod|head -1|sed 's/ -.*//'` -} - - -# build probe list -rm -f navbar.inc -rm -f index.inc - -for pod in mrtg.pod mrtg-unix-guide.pod mrtg-nt-guide.pod mrtg-nw-guide.pod mrtg-reference.pod cfgmaker.pod indexmaker.pod mrtg-contrib.pod mrtg-faq.pod mrtg-ipv6.pod mrtg-logfile.pod mrtg-mibhelp.pod mrtg-rrd.pod mrtg-webserver.pod; do - base=`echo $pod |sed 's,.pod,,'` - echo $base - cat $src/doc/$pod > $base.pod - pod2descr $base - pod2wml $base -done - diff --git a/web/doc/index.inc b/web/doc/index.inc deleted file mode 100644 index 87d3ed3..0000000 --- a/web/doc/index.inc +++ /dev/null @@ -1,28 +0,0 @@ -<dt><a href="mrtg.en.html">mrtg</a></dt><dd>What is MRTG ? -</dd> -<dt><a href="mrtg-unix-guide.en.html">mrtg-unix-guide</a></dt><dd>The MRTG 2.17.4 Linux/Unix Installation Guide -</dd> -<dt><a href="mrtg-nt-guide.en.html">mrtg-nt-guide</a></dt><dd>The MRTG 2.17.4 Windows Installation Guide -</dd> -<dt><a href="mrtg-nw-guide.en.html">mrtg-nw-guide</a></dt><dd>MRTG for NetWare -</dd> -<dt><a href="mrtg-reference.en.html">mrtg-reference</a></dt><dd>MRTG 2.17.4 configuration reference -</dd> -<dt><a href="cfgmaker.en.html">cfgmaker</a></dt><dd>Creates mrtg.cfg files (for mrtg-2.17.4) -</dd> -<dt><a href="indexmaker.en.html">indexmaker</a></dt><dd>Creates index files for mrtg web sites (mrtg-2.17.4) -</dd> -<dt><a href="mrtg-contrib.en.html">mrtg-contrib</a></dt><dd>Contribution Guidelines for MRTG -</dd> -<dt><a href="mrtg-faq.en.html">mrtg-faq</a></dt><dd>How to get help if you have problems with MRTG -</dd> -<dt><a href="mrtg-ipv6.en.html">mrtg-ipv6</a></dt><dd>IPv6 support in MRTG -</dd> -<dt><a href="mrtg-logfile.en.html">mrtg-logfile</a></dt><dd>description of the mrtg-2 logfile format -</dd> -<dt><a href="mrtg-mibhelp.en.html">mrtg-mibhelp</a></dt><dd>A Table of some interesting OIDs -</dd> -<dt><a href="mrtg-rrd.en.html">mrtg-rrd</a></dt><dd>How to use RRDtool with MRTG -</dd> -<dt><a href="mrtg-webserver.en.html">mrtg-webserver</a></dt><dd>hints for web server configuration -</dd> diff --git a/web/doc/index.wml b/web/doc/index.wml deleted file mode 100644 index 66780b3..0000000 --- a/web/doc/index.wml +++ /dev/null @@ -1,8 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "doc"> - -<H1>MRTG Documentation</H1> - -<dl> -#include "index.inc" -</dl> diff --git a/web/doc/navbar.inc b/web/doc/navbar.inc deleted file mode 100644 index 193daa1..0000000 --- a/web/doc/navbar.inc +++ /dev/null @@ -1,14 +0,0 @@ -<nav:but doc_mrtg "mrtg" mrtg/> -<nav:but doc_mrtg-unix-guide "mrtg-unix-guide" mrtg-unix-guide/> -<nav:but doc_mrtg-nt-guide "mrtg-nt-guide" mrtg-nt-guide/> -<nav:but doc_mrtg-nw-guide "mrtg-nw-guide" mrtg-nw-guide/> -<nav:but doc_mrtg-reference "mrtg-reference" mrtg-reference/> -<nav:but doc_cfgmaker "cfgmaker" cfgmaker/> -<nav:but doc_indexmaker "indexmaker" indexmaker/> -<nav:but doc_mrtg-contrib "mrtg-contrib" mrtg-contrib/> -<nav:but doc_mrtg-faq "mrtg-faq" mrtg-faq/> -<nav:but doc_mrtg-ipv6 "mrtg-ipv6" mrtg-ipv6/> -<nav:but doc_mrtg-logfile "mrtg-logfile" mrtg-logfile/> -<nav:but doc_mrtg-mibhelp "mrtg-mibhelp" mrtg-mibhelp/> -<nav:but doc_mrtg-rrd "mrtg-rrd" mrtg-rrd/> -<nav:but doc_mrtg-webserver "mrtg-webserver" mrtg-webserver/> diff --git a/web/download.wml b/web/download.wml deleted file mode 100644 index fa52d44..0000000 --- a/web/download.wml +++ /dev/null @@ -1,20 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "down"> - -<H1>MRTG Download</H1> - -You can download MRTG from several places: - -<H2>Primary Distribution Point</H2> - -<p>If you are running Unix, look for the *.tar.gz files, if you work with -Windows, you will be happier with the *.zip files.</p> - -<UL> - <LI><A HREF="pub/?M=D">Stable Release</A></LI> - <LI><A HREF="pub/beta/?M=D">Development SnapShots</A></LI> -</UL> - -<p>You might want to read the <a href="doc/">documentation</a> for inspiration on -how to install and configure it.</p> - diff --git a/web/fb-logo.png b/web/fb-logo.png Binary files differdeleted file mode 100644 index 3da6d85..0000000 --- a/web/fb-logo.png +++ /dev/null diff --git a/web/hoster.html b/web/hoster.html deleted file mode 100644 index 7f1f48c..0000000 --- a/web/hoster.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> -<style type="text/css"> -body { - margin: 0px; - padding: 0px; - font-family: sans-serif; -} - -#hoster a { - color: black; - text-decoration: none; -} -</style> -</head> -<body> -<div id="hoster"> -<a target="_top" href="http://www.init7.com/bandwidth.php">bandwidth</a> by <a href="http://www.init7.net/" target="_top">Init7</a> -</div> -</body> -</html> diff --git a/web/images/arr_black.gif b/web/images/arr_black.gif Binary files differdeleted file mode 100644 index 9245579..0000000 --- a/web/images/arr_black.gif +++ /dev/null diff --git a/web/images/arr_black_right.gif b/web/images/arr_black_right.gif Binary files differdeleted file mode 100644 index 19e5634..0000000 --- a/web/images/arr_black_right.gif +++ /dev/null diff --git a/web/images/arr_white.gif b/web/images/arr_white.gif Binary files differdeleted file mode 100644 index d6745b2..0000000 --- a/web/images/arr_white.gif +++ /dev/null diff --git a/web/images/foot_logo.gif b/web/images/foot_logo.gif Binary files differdeleted file mode 100644 index ea4fa24..0000000 --- a/web/images/foot_logo.gif +++ /dev/null diff --git a/web/images/foot_px.gif b/web/images/foot_px.gif Binary files differdeleted file mode 100644 index 1844f54..0000000 --- a/web/images/foot_px.gif +++ /dev/null diff --git a/web/images/minus.gif b/web/images/minus.gif Binary files differdeleted file mode 100644 index 6b81c89..0000000 --- a/web/images/minus.gif +++ /dev/null diff --git a/web/images/mrtg_logo.gif b/web/images/mrtg_logo.gif Binary files differdeleted file mode 100644 index d7b0552..0000000 --- a/web/images/mrtg_logo.gif +++ /dev/null diff --git a/web/images/plus.gif b/web/images/plus.gif Binary files differdeleted file mode 100644 index c98fa95..0000000 --- a/web/images/plus.gif +++ /dev/null diff --git a/web/images/px.gif b/web/images/px.gif Binary files differdeleted file mode 100644 index 8ac8785..0000000 --- a/web/images/px.gif +++ /dev/null diff --git a/web/images/spacer.gif b/web/images/spacer.gif Binary files differdeleted file mode 100644 index 5bfd67a..0000000 --- a/web/images/spacer.gif +++ /dev/null diff --git a/web/inc/IE7/README.txt b/web/inc/IE7/README.txt deleted file mode 100644 index e546ce4..0000000 --- a/web/inc/IE7/README.txt +++ /dev/null @@ -1,34 +0,0 @@ -Installation
-------------
-
-Follow these simple instructions to get IE7 working immediately on your server:
-
- * download the latest IE7 ZIP file (https://sourceforge.net/project/showfiles.php?group_id=109983&package_id=119707)
-
- * extract the contents to a directory on your server (keep the folder names used in the ZIP)
-
- * you will now have an IE7 directory on your server
-
- * include the IE7 JavaScript library in the page you wish to test
-
- <!-- compliance patch for microsoft browsers -->
- <!--[if lt IE 7]><script src="/ie7/ie7-standard-p.js" type="text/javascript"></script><![endif]-->
-
- * make sure this also points to the same directory
-
- * open the page in your web browser
-
- * the page should now be IE7 enabled.
-
- * if you are using the PNG solution then be aware that it operates on files
- names "something-trans.png"
-
- * see this page for more configuration and usage options:
- http://dean.edwards.name/IE7/usage/
-
-You may extract the contents of the ZIP file to your hard disk if you do not have access to a web server.
-
-
-Enjoy ;-)
-
-Dean Edwards, 23rd May 2005
diff --git a/web/inc/IE7/blank.gif b/web/inc/IE7/blank.gif Binary files differdeleted file mode 100644 index a4fe2e6..0000000 --- a/web/inc/IE7/blank.gif +++ /dev/null diff --git a/web/inc/IE7/ie7-base64.php b/web/inc/IE7/ie7-base64.php deleted file mode 100644 index 530392d..0000000 --- a/web/inc/IE7/ie7-base64.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php
-$data = split(";", $_SERVER["REDIRECT_QUERY_STRING"]);
-$type = $data[0];
-$data = split(",", $data[1]);
-header("Content-type: ".$type);
-echo base64_decode($data[1]);
-?>
\ No newline at end of file diff --git a/web/inc/IE7/ie7-content.htc b/web/inc/IE7/ie7-content.htc deleted file mode 100644 index cc480cb..0000000 --- a/web/inc/IE7/ie7-content.htc +++ /dev/null @@ -1,14 +0,0 @@ -<html>
-<!--
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
--->
-<head>
-<object id="dummy" width="0" height="0"></object>
-<base id="base">
-<style type="text/css">html,body,img{margin:0;}img{vertical-align:top}#dummy{display:inline}</style>
-<script type="text/javascript">public_description=new function(){var l=false;this.ie7_anon=true;this.load=function(o,c,u){if(l)return;l=true;base.href=o.document.URL;dummy.style.cssText=c;var _0=o.parentElement;var _1=Boolean(dummy.currentStyle.display=="inline");function r(){o.runtimeStyle.width=(_1)?image.offsetWidth:"100%";o.runtimeStyle.height=body.offsetHeight};image.onreadystatechange=function(){if(this.readyState=="complete")_2()};image.src=u;function _2(){function copy(p){try{body.style[p]=_0.currentStyle[p]}catch(i){}};for(var j in body.currentStyle)copy(j);body.style.width="";body.style.height="";body.style.border="none";body.style.padding="0";body.style.margin="0";body.style.textIndent="";body.style.position="static";while(_0&&_0.currentStyle.backgroundColor=="transparent"){_0=_0.parentElement}if(_0)document.body.style.backgroundColor=_0.currentStyle.backgroundColor;body.runtimeStyle.cssText=c;body.runtimeStyle.margin="0";if(_1)body.runtimeStyle.width="";r()}}};</script>
-</head>
-<body><span id="body"><img id="image"></span></body>
-</html>
diff --git a/web/inc/IE7/ie7-core.js b/web/inc/IE7/ie7-core.js deleted file mode 100644 index c3dbcef..0000000 --- a/web/inc/IE7/ie7-core.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('x(!1M.1j)z 6(){1l{1M.1j=8;4 1W=8.2m=z 26;8.O=6(){7"1j 2q 0.9 (5G)"};4 36=/36/.B(42.41.40);4 1G=(36)?6(m){1M.1G(1j+"\\n\\n"+m)}:1W;4 2t=5F.2t.1g(/5E (\\d\\.\\d)/)[1];4 2z=K.5D!="5C";x(/5B/.B(42.41.40)||2t<5||!/^5A/.B(K.1J.2A))7;4 1H=K.39=="1H";4 1t,5z;4 1J=K.1J,2s,3X,17=K.17;4 5y="!";4 22={};4 1u=1C;1j.2m=6(n,s){x(!22[n]){x(1u)1k("s="+2o(s));22[n]=z s()}};4 R=/^[\\w\\.]+[^:]*$/;6 1I(h,p){x(R.B(h))h=(p||"")+h;7 h};6 2e(h,p){h=1I(h,p);7 h.1d(0,h.3n("/")+1)};4 s=K.3Z[K.3Z.y-1];1l{1k(s.3z)}1i(i){}4 1R=2e(s.5x);4 1F;1l{4 l=(5w()>=5)?"5v":"5u";1F=z 5t(l+".5s")}1i(i){}4 2w={};6 2y(h,p){1l{h=1I(h,p);x(!2w[h]){1F.5r("5q",h,1C);1F.5p();x(1F.3Y==0||1F.3Y==5o){2w[h]=1F.5n}}}1i(i){1G("2x [1]: 30 5m 5l "+h)}37{7 2w[h]||""}};4 5k=1I("5j.5i",1R);6 1E(V){x(V!=1L){V.2v=13.16.2v;V.12=13.16.12}7 V};1E.12=6(p,c){x(!p)p={};x(!c)c=p.J;x(c=={}.J)c=z 26("8.2v()");c.Y=z 26("7 8");c.Y.16=z 8.Y;c.Y.16.12(p);c.16=z c.Y;c.Y.16.J=c.16.J=c;c.1r=8;c.12=F.32;c.2u=8.2u;7 c};1E.Y=z 26("7 8");1E.Y.16={J:1E,2v:6(){7 F.32.5h.1r.2k(8,F)},12:6(V){x(8==8.J.16&&8.J.12){7 8.J.Y.16.12(V)}D(4 i 5g V){2K(i){1o"J":1o"O":1o"Y":2X}x(2V V[i]=="6"&&V[i]!=8[i]){V[i].1r=8[i]}8[i]=V[i]}x(V.O!=8.O&&V.O!={}.O){V.O.1r=8.O;8.O=V.O}7 8}};6 13(){};8.13=1E.12({J:13,O:6(){7"[5f "+(8.J.2Z||"5e")+"]"},5d:6(1h){7 8.J==1h||1h.2u(8.J)}});13.2Z="13";13.1r=1L;13.2u=6(1h){1f(1h&&1h.1r!=8)1h=1h.1r;7 3J(1h)};13.Y.1r=1E;2a 8.13;4 3A=13.12({J:6(){8.5c=[];8.1p=[]},1s:1W});x(2t<5.5)1k(2y("Z-5b.3a",1R));4 35=1C;1j.1s=6(){1l{x(35)7;35=1H=1c;2s=K.2s;3X=(2z)?2s:1J;x(1K&&1t)1t.2k();15.2k();1n();1G("1u 5a")}1i(e){1G("2x [2]: "+e.38)}};4 1p=[];6 2C(r){1p.11(r)};6 1n(){H.3P();x(1K&&1t)1t.1n();15.1n();D(4 i=0;i<1p.y;i++)1p[i]()};6 23(){4 E=0,R=1,L=2;4 G=/\\(/g,S=/\\$\\d/,I=/^\\$\\d+$/,T=/([\'"])\\1\\+(.*)\\+\\1\\1$/,3Q=/\\\\./g,Q=/\'/,3W=/\\25[^\\25]*\\25/g;4 1X=8;8.18=6(e,r){x(!r)r="";4 l=(34(2o(e)).1g(G)||"").y+1;x(S.B(r)){x(I.B(r)){r=3e(r.1d(1))-1}1b{4 i=l;4 q=Q.B(34(r))?\'"\':"\'";1f(i)r=r.2S("$"+i--).2p(q+"+a[o+"+i+"]+"+q);r=z 26("a,o","7"+q+r.19(T,"$1")+q)}}3V(e||"/^$/",r,l)};8.1U=6(s){24.y=0;7 3R(3S(s,8.2r).19(z 1Z(1D,8.33?"2I":"g"),3T),8.2r).19(3W,"")};8.59=6(){1D.y=0};4 24=[];4 1D=[];4 3U=6(){7"("+2o(8[E]).1d(1,-1)+")"};1D.O=6(){7 8.2p("|")};6 3V(){F.O=3U;1D[1D.y]=F}6 3T(){x(!F[0])7"";4 i=1,j=0,p;1f(p=1D[j++]){x(F[i]){4 r=p[R];2K(2V r){1o"6":7 r(F,i);1o"58":7 F[r+i]}4 d=(F[i].57(1X.2r)==-1)?"":"\\25"+F[i]+"\\25";7 d+r}1b i+=p[L]}};6 3S(s,e){7 e?s.19(z 1Z("\\\\"+e+"(.)","g"),6(m,c){24[24.y]=c;7 e}):s};6 3R(s,e){4 i=0;7 e?s.19(z 1Z("\\\\"+e,"g"),6(){7 e+(24[i++]||"")}):s};6 34(s){7 s.19(3Q,"")}};23.16={J:23,33:1C,2r:""};13.12(23.16);4 1V=23.12({33:1c});4 H=6(){4 2q="2.0.2";4 C=/\\s*,\\s*/;4 H=6(s,14){1l{4 m=[];4 u=F.32.2Q&&!14;4 b=(14)?(14.J==3G)?14:[14]:[K];4 31=3D(s).2S(C),i;D(i=0;i<31.y;i++){s=2R(31[i]);x(3K&&s.1d(0,3).2p("")==" *#"){s=s.1d(2);14=3H([],b,s[1])}1b 14=b;4 j=0,t,f,a,c="";1f(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";x(s[j]=="("){1f(s[j++]!=")"&&j<s.y){a+=s[j]}a=a.1d(0,-1);c+="("+a+")"}14=(u&&1P[c])?1P[c]:3F(14,t,f,a);x(u)1P[c]=14}m=m.3t(14)}2a H.30;7 m}1i(e){H.30=e;7[]}};H.O=6(){7"6 H() {\\n [2q "+2q+"]\\n}"};4 1P={};H.2Q=1C;H.3P=6(s){x(s){s=2R(s).2p("");2a 1P[s]}1b 1P={}};4 22={};4 1u=1C;H.2m=6(n,s){x(1u)1k("s="+2o(s));22[n]=z s()};H.Y=6(c){7 c?1k(c):8};4 1B={};4 2n={};4 56={1g:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};4 55=[];1B[" "]=6(r,f,t,n){4 e,i,j;D(i=0;i<f.y;i++){4 s=2l(f[i],t,n);D(j=0;(e=s[j]);j++){x(1q(e)&&2T(e,n))r.11(e)}}};1B["#"]=6(r,f,i){4 e,j;D(j=0;(e=f[j]);j++)x(e.1a==i)r.11(e)};1B["."]=6(r,f,c){c=z 1Z("(^|\\\\s)"+c+"(\\\\s|$)");4 e,i;D(i=0;(e=f[i]);i++)x(c.B(e.2Z))r.11(e)};1B[":"]=6(r,f,p,a){4 t=2n[p],e,i;x(t)D(i=0;(e=f[i]);i++)x(t(e,a))r.11(e)};2n["21"]=6(e){4 d=2U(e);x(d.2Y)D(4 i=0;i<d.2Y.y;i++){x(d.2Y[i]==e)7 1c}};2n["2N"]=6(e){};4 1q=6(e){7(e&&e.3B==1&&e.2P!="!")?e:1L};4 3N=6(e){1f(e&&(e=e.54)&&!1q(e))2X;7 e};4 2W=6(e){1f(e&&(e=e.53)&&!1q(e))2X;7 e};4 3L=6(e){7 1q(e.3O)||2W(e.3O)};4 52=6(e){7 1q(e.3M)||3N(e.3M)};4 51=6(e){4 c=[];e=3L(e);1f(e){c.11(e);e=2W(e)}7 c};4 3K=1c;4 2O=6(e){4 d=2U(e);7(2V d.3I=="50")?/\\.4Z$/i.B(d.4Y):3J(d.3I=="4X 4W")};4 2U=6(e){7 e.4V||e.K};4 2l=6(e,t){7(t=="*"&&e.1A)?e.1A:e.2l(t)};4 4U=6(e,t,n){x(t=="*")7 1q(e);x(!2T(e,n))7 1C;x(!2O(e))t=t.4T();7 e.2P==t};4 2T=6(e,n){7!n||(n=="*")||(e.4S==n)};4 4R=6(e){7 e.4Q};6 3H(r,f,1a){4 m,i,j;D(i=0;i<f.y;i++){x(m=f[i].1A.4P(1a)){x(m.1a==1a)r.11(m);1b x(m.y!=1L){D(j=0;j<m.y;j++){x(m[j].1a==1a)r.11(m[j])}}}}7 r};x(![].11)3G.16.11=6(){D(4 i=0;i<F.y;i++){8[8.y]=F[i]}7 8.y};4 N=/\\|/;6 3F(14,t,f,a){x(N.B(f)){f=f.2S(N);a=f[0];f=f[1]}4 r=[];x(1B[t]){1B[t](r,14,f,a)}7 r};4 S=/^[^\\s>+~]/;4 3E=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 2R(s){x(S.B(s))s=" "+s;7 s.1g(3E)||[]};4 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;4 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;4 3D=6(s){7 s.19(W,"$1").19(I,"$1*$2")};4 1y={O:6(){7"\'"},1g:/^(\'[^\']*\')|("[^"]*")$/,B:6(s){7 8.1g.B(s)},18:6(s){7 8.B(s)?s:8+s+8},3C:6(s){7 8.B(s)?s.1d(1,-1):s}};4 1N=6(t){7 1y.3C(t)};4 E=/([\\/()[\\]?{}|*+-])/g;6 4O(s){7 s.19(E,"\\\\$1")};1u=1c;7 H}();H.2Q=1c;H.2m("Z",6(){1q=6(e){7(e&&e.3B==1&&e.2P!="!"&&!e.3d)?e:1L}});H.Y("1N=F[1]",3k);4 1K=!H.Y("2O(F[1])",1J);4 2h=":21{Z-21:21}:2N{Z-21:2N}"+(1K?"":"*{4N:0}");4 15=z(3A.12({2F:z 1V,1O:"",1w:"",2L:[],1s:6(){8.2M();8.2g()},2g:6(){15.1Y.X=2h+8.1O+8.1w},3y:6(){4 20=K.2l("1e"),s;D(4 i=20.y-1;(s=20[i]);i--){x(!s.2H&&!s.Z){8.2L.11(s.3z)}}},2k:6(){8.3y();8.2g();z 28("1O");8.3u()},3w:6(e,r){8.2F.18(e,r)},1n:6(){4 R=/3v\\d+/g;4 s=2h.1g(/[{,]/g).y;4 20=s+(8.1O.X.1g(/\\{/g)||"").y;4 3x=8.1Y.4M,r;4 2j,c,2i,e,i,j,k,1a;D(i=s;i<20;i++){r=3x[i];x(r&&(2j=r.1e.X.1g(R))){2i=H(r.4L);x(2i.y)D(j=0;j<2j.y;j++){1a=2j[j];c=15.1p[1a.1d(10)][2];D(k=0;(e=2i[k]);k++){x(e.1v[1a])c(e)}}}}},2C:6(p,t,h,r){t=z 1Z("([{;\\\\s])"+p+"\\\\s*:\\\\s*"+t+"[^;}]*");4 i=8.1p.y;x(r)r=p+":"+r;8.3w(t,6(m,o){7(r?m[o+1]+r:m[o])+";Z-"+m[o].1d(1)+";3v"+i+":1"});8.1p.11(F);7 i},1N:6(s){7 s.X||""},2M:6(){x(1H||!1K)K.2M();1b K.4K("<1e Z=1c></1e>");8.1Y=17[17.y-1];8.1Y.Z=1c;8.1Y.X=2h},3u:6(){D(4 i=0;i<17.y;i++){x(!17[i].Z&&17[i].X){17[i].X=""}}}}));6 28(m){8.1z=m;8.1S();15[m]=8;15.2g()};13.12({J:28,O:6(){7"@1z "+8.1z+"{"+8.X+"}"},1n:1W,1S:6(){8.X="";8.1N();8.3m();8.X=3j(8.X);f={}},1N:6(){4 3r=[].3t(15.2L);4 M=/@1z\\s+([^{]*)\\{([^@]+\\})\\s*\\}/2I;4 A=/\\4J\\b|^$/i,S=/\\4I\\b/i,P=/\\4H\\b/i;6 3q(c,m){2f.v=m;7 c.19(M,2f)};6 2f(4G,m,c){m=2J(m);2K(m){1o"1O":1o"1w":x(m!=2f.v)7"";1o"1A":7 c}7""};6 2J(m){x(A.B(m))7"1A";1b x(S.B(m))7(P.B(m))?"1A":"1O";1b x(P.B(m))7"1w"};4 1X=8;6 2G(s,p,m,l){4 c="";x(!l){m=2J(s.1z);l=0}x(m=="1A"||m==1X.1z){x(l<3){D(4 i=0;i<s.3s.y;i++){c+=2G(s.3s[i],2e(s.2d,p),m,l+1)}}c+=3l(s.2d?3p(s,p):3r.3h()||"");c=3q(c,1X.1z)}7 c};4 f={};6 3p(s,p){4 u=1I(s.2d,p);x(f[u])7"";f[u]=(s.2H)?"":3o(15.1N(s,p),2e(s.2d,p));7 f[u]};4 U=/(4F\\s*\\(\\s*[\'"]?)([\\w\\.]+[^:\\)]*[\'"]?\\))/2I;6 3o(c,p){7 c.19(U,"$1"+p.1d(0,p.3n("/")+1)+"$2")};D(4 i=0;i<17.y;i++){x(!17[i].2H&&!17[i].Z){8.X+=2G(17[i])}}},3m:6(){8.X=15.2F.1U(8.X)},1n:1W});4 1y=H.Y("1y");4 2b=[];6 3l(c){7 1x.1U(2c.1U(c))};6 2E(m,o){7 1y+(2b.11(m[o])-1)+1y};6 3k(v){7 1y.B(v)?1k(2b[1k(v)]):v};4 1x=z 1V;1x.18(/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//);1x.18(/\'[^\']*\'/,2E);1x.18(/"[^"]*"/,2E);1x.18(/\\s+/," ");1x.18(/@(4E|4D)[^;\\n]+[;\\n]|<!\\-\\-|\\-\\->/);4 2c=z 1V;2c.18(/\\\\\'/,"\\\\4C");2c.18(/\\\\"/,"\\\\4B");4 2D=z 1V;2D.18(/\'(\\d+)\'/,3i);6 3j(c){7 2D.1U(c)};6 3i(m,o){7 2b[m[o+1]]};4 2B=[];6 4A(h){2C(h);1Q(1M,"4z",h)};6 1Q(e,t,h){e.4y(t,h);2B.11(F)};6 3g(e,t,h){1l{e.4x(t,h)}1i(i){}};1Q(1M,"4w",6(){4 h;1f(h=2B.3h()){3g(h[0],h[1],h[2])}});6 4v(h,e,c){x(!h.29)h.29={};x(c)h.29[e.2A]=e;1b 2a h.29[e.2A];7 c};1Q(1M,"4u",6(){x(!15.1w)z 28("1w");15.1w.1n()});4 3f=/^\\d+(4t)?$/i;4 4s=/^\\d+%$/;4 4r=6(e,v){x(3f.B(v))7 3e(v);4 s=e.1e.1m;4 r=e.1T.1m;e.1T.1m=e.1v.1m;e.1e.1m=v||0;v=e.1e.4q;e.1e.1m=s;e.1T.1m=r;7 v};6 4p(t){4 e=K.4o(t||"4n");e.1e.X="3c:4m;4l:0;4k:4j;4i:4h;4g:4f(0 0 0 0);1m:-4e";e.3d=1c;7 e};4 27="Z-";6 4d(e){7 e.1v["Z-3c"]=="4c"};6 4b(e,p){7 e.1v[27+p]||e.1v[p]};6 4a(e,p,v){x(e.1v[27+p]==1L){e.1T[27+p]=e.1v[p]}e.1T[p]=v};6 49(o,c,u){4 t=48(6(){1l{x(!o.1S)7;o.1S(o,c,u);3b(t)}1i(i){3b(t)}},10)};1u=1c;x(2z)1k(2y("Z-47.3a",1R));15.1s();x(1K&&1t)1t.1s();x(1H)1j.1s();1b{1J.46(1I("Z-1S.45",1R));1Q(K,"44",6(){x(K.39=="1H")43(1j.1s,0)})}}1i(e){1G("2x [0]: "+e.38)}37{}};',62,353,'||||var||function|return|this|||||||||||||||||||||||||if|length|new||test||for||arguments||cssQuery||constructor|document||||toString|||||||that||cssText|valueOf|ie7||push|specialize|Common|fr|ie7CSS|prototype|styleSheets|add|replace|id|else|true|slice|style|while|match|klass|catch|IE7|eval|try|left|recalc|case|recalcs|thisElement|ancestor|init|ie7HTML|loaded|currentStyle|print|encoder|Quote|media|all|selectors|false|_0|ICommon|httpRequest|alert|complete|makePath|documentElement|isHTML|null|window|getText|screen|cache|addEventHandler|path|load|runtimeStyle|exec|Parser|DUMMY|self|styleSheet|RegExp|st|link|modules|ParseMaster|_1|x01|Function|_2|StyleSheet|elements|delete|_3|safeString|href|getPath|_4|refresh|HEADER|el|ca|apply|getElementsByTagName|addModule|pseudoClasses|String|join|version|escapeChar|body|appVersion|ancestorOf|inherit|_5|Error|loadFile|quirksMode|uniqueID|_6|addRecalc|decoder|_7|parser|_8|disabled|gi|_9|switch|styles|createStyleSheet|visited|isXML|tagName|caching|_10|split|compareNamespace|getDocument|typeof|nextElementSibling|continue|links|className|error|se|callee|ignoreCase|_11|_12|ie7_debug|finally|description|readyState|js|clearInterval|position|ie7_anon|parseInt|PIXEL|removeEventHandler|pop|_13|decode|getString|_14|parse|lastIndexOf|_15|_16|_17|_18|imports|concat|trash|ie7_recalc|addFix|ru|getInlineStyles|innerHTML|Fix|nodeType|remove|parseSelector|ST|select|Array|_19|mimeType|Boolean|isMSIE|firstElementChild|lastChild|previousElementSibling|firstChild|clearCache|ES|_20|_21|_22|_23|_24|DE|viewport|status|scripts|search|location|top|setTimeout|onreadystatechange|htc|addBehavior|quirks|setInterval|addTimer|setOverrideStyle|getDefinedStyle|fixed|isFixed|9999|rect|clip|none|border|block|display|padding|absolute|object|createElement|createTempElement|pixelLeft|getPixelValue|PERCENT|px|onbeforeprint|register|onunload|detachEvent|attachEvent|onresize|addResize|x22|x27|import|namespace|url|ma|bprint|bscreen|ball|write|selectorText|rules|margin|regEscape|item|innerText|getTextContent|scopeName|toUpperCase|compareTagName|ownerDocument|Document|XML|URL|xml|unknown|childElements|lastElementChild|nextSibling|previousSibling|attributeSelectors|AttributeSelector|indexOf|number|reset|successfully|ie5|fixes|instanceOf|Object|common|in|caller|gif|blank|BLANK_GIF|file|loading|responseText|200|send|GET|open|XMLHTTP|ActiveXObject|Microsoft|Msxml2|ScriptEngineMajorVersion|src|ANON|ie7Layout|ms_|ie7_off|CSS1Compat|compatMode|MSIE|navigator|alpha'.split('|'),0,{}))
diff --git a/web/inc/IE7/ie7-css-strict.js b/web/inc/IE7/ie7-css-strict.js deleted file mode 100644 index 0c7e330..0000000 --- a/web/inc/IE7/ie7-css-strict.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-css-strict",function(){if(!modules["ie7-css2-selectors"])return;StyleSheet.prototype.specialize({parse:function(){this.inherit();var r=[].concat(this.rules);r.sort(ie7CSS.Rule.compare);this.cssText=r.join("\n")},createRule:function(s,c){var m;if(m=s.match(ie7CSS.PseudoElement.MATCH))return new ie7CSS.PseudoElement(m[1],m[2],c);else if(m=s.match(ie7CSS.DynamicRule.MATCH))return new ie7CSS.DynamicRule(s,m[1],m[2],m[3],c);else return new ie7CSS.Rule(s,c)}});ie7CSS.specialize({apply:function(){this.inherit();this.Rule.MATCH=/([^{}]+)(\{[^{}]*\})/g}});ie7CSS.Rule.compare=function(r1,r2){return r1.specificity-r2.specificity};var N=[],I=/#/g,C=/[.:\[]/g,T=/^\w|[\s>+~]\w/g;ie7CSS.Rule.score=function(s){return(s.match(I)||N).length*10000+(s.match(C)||N).length*100+(s.match(T)||N).length};ie7CSS.Rule.simple=function(){return""};ie7CSS.Rule.prototype.specialize({specificity:0,init:function(){this.specificity=ie7CSS.Rule.score(this.selector)}})});
diff --git a/web/inc/IE7/ie7-css2-selectors.js b/web/inc/IE7/ie7-css2-selectors.js deleted file mode 100644 index bb08da3..0000000 --- a/web/inc/IE7/ie7-css2-selectors.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-css2-selectors",function(){cssQuery.addModule("css-level2",function(){selectors[">"]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=childElements(f[i]);for(j=0;(e=s[j]);j++)if(compareTagName(e,t,n))r.push(e)}};selectors["+"]=function(r,f,t,n){for(var i=0;i<f.length;i++){var e=nextElementSibling(f[i]);if(e&&compareTagName(e,t,n))r.push(e)}};selectors["@"]=function(r,f,a){var t=attributeSelectors[a].test;var e,i;for(i=0;(e=f[i]);i++)if(t(e))r.push(e)};pseudoClasses["first-child"]=function(e){return!previousElementSibling(e)};pseudoClasses["lang"]=function(e,c){c=new RegExp("^"+c,"i");while(e&&!e.getAttribute("lang"))e=e.parentNode;return e&&c.test(e.getAttribute("lang"))};AttributeSelector.NS_IE=/\\:/g;AttributeSelector.PREFIX="@";AttributeSelector.tests={};AttributeSelector.replace=function(m,a,n,c,v){var k=this.PREFIX+m;if(!attributeSelectors[k]){a=this.create(a,c||"",v||"");attributeSelectors[k]=a;attributeSelectors.push(a)}return attributeSelectors[k].id};AttributeSelector.parse=function(s){s=s.replace(this.NS_IE,"|");var m;while(m=s.match(this.match)){var r=this.replace(m[0],m[1],m[2],m[3],m[4]);s=s.replace(this.match,r)}return s};AttributeSelector.create=function(p,t,v){var a={};a.id=this.PREFIX+attributeSelectors.length;a.name=p;t=this.tests[t];t=t?t(this.getAttribute(p),getText(v)):false;a.test=new Function("e","return "+t);return a};AttributeSelector.getAttribute=function(n){switch(n.toLowerCase()){case"id":return"e.id";case"class":return"e.className";case"for":return"e.htmlFor";case"href":if(isMSIE){return"String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')"}}return"e.getAttribute('"+n.replace(N,":")+"')"};AttributeSelector.tests[""]=function(a){return a};AttributeSelector.tests["="]=function(a,v){return a+"=="+Quote.add(v)};AttributeSelector.tests["~="]=function(a,v){return"/(^| )"+regEscape(v)+"( |$)/.test("+a+")"};AttributeSelector.tests["|="]=function(a,v){return"/^"+regEscape(v)+"(-|$)/.test("+a+")"};var _6=parseSelector;parseSelector=function(s){return _6(AttributeSelector.parse(s))}});var AttributeSelector=cssQuery.valueOf("AttributeSelector");var H=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var B1=/\s*\{\s*/,B2=/\s*\}\s*/,C=/\s*\,\s*/;var F=/(.*)(:first-(line|letter))/;StyleSheet.prototype.specialize({parse:function(){this.inherit();var o=ie7CSS.rules.length;var ru=this.cssText.split(B2),r;var se,c,i,j;for(i=0;i<ru.length;i++){r=ru[i].split(B1);se=r[0].split(C);c=r[1];for(j=0;j<se.length;j++){se[j]=c?this.createRule(se[j],c):""}ru[i]=se.join("\n")}this.cssText=ru.join("\n");this.rules=ie7CSS.rules.slice(o)},recalc:function(){var r,i;for(i=0;(r=this.rules[i]);i++)r.recalc()},createRule:function(s,c){if(ie7CSS.UNKNOWN.test(s)){var m;if(m=s.match(PseudoElement.MATCH)){return new PseudoElement(m[1],m[2],c)}else if(m=s.match(DynamicRule.MATCH)){if(!isHTML||!H.test(m)||DynamicRule.COMPLEX.test(m)){return new DynamicRule(s,m[1],m[2],m[3],c)}}else return new Rule(s,c)}return s+" {"+c+"}"}});ie7CSS.specialize({rules:[],pseudoClasses:cssQuery.valueOf("pseudoClasses"),dynamicPseudoClasses:{},cache:cssQuery.valueOf("cache"),Rule:Rule,DynamicRule:DynamicRule,PseudoElement:PseudoElement,DynamicPseudoClass:DynamicPseudoClass,apply:function(){var p=this.pseudoClasses+"|before|after|"+this.dynamicPseudoClasses;p=p.replace(/(link|visited)\|/g,"");this.UNKNOWN=new RegExp("[>+~\[]|([:.])[\\w-()]+\\1|:("+p+")");var c="[^\\s(]+\\s*[+~]|@\\d+|:(";Rule.COMPLEX=new RegExp(c+p+")","g");DynamicRule.COMPLEX=new RegExp(c+this.pseudoClasses+")","g");DynamicRule.MATCH=new RegExp("(.*):("+this.dynamicPseudoClasses+")(.*)");PseudoElement.MATCH=/(.*):(before|after).*/;this.inherit()},recalc:function(){this.screen.recalc();this.inherit()},getText:function(s,p){return httpRequest?(loadFile(s.href,p)||s.cssText):this.inherit(s)},addEventHandler:function(e,t,h){addEventHandler(e,t,h)}});function Rule(s,c){this.id=ie7CSS.rules.length;this.className=Rule.PREFIX+this.id;s=(s).match(F)||s||"*";this.selector=s[1]||s;this.selectorText=Rule.simple(this.selector)+"."+this.className+(s[2]||"");this.cssText=c;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");ie7CSS.rules.push(this);this.init()};Common.specialize({constructor:Rule,toString:function(){return this.selectorText+" {"+this.cssText+"}"},init:DUMMY,add:function(e){e.className+=" "+this.className},remove:function(e){e.className=e.className.replace(this.MATCH,"$1")},recalc:function(){var m=ie7CSS.cache[" *."+this.className]=cssQuery(this.selector);for(i=0;i<m.length;i++)this.add(m[i])}});Rule.PREFIX="ie7_class";Rule.CHILD=/>/g;Rule.simple=function(s){s=AttributeSelector.parse(s);return s.replace(this.COMPLEX,"").replace(this.CHILD," ")};function DynamicRule(s,a,d,t,c){this.attach=a||"*";this.dynamicPseudoClass=ie7CSS.dynamicPseudoClasses[d];this.target=t;this.inherit(s,c)};Rule.specialize({constructor:DynamicRule,recalc:function(){var m=cssQuery(this.attach);for(var i=0;i<m.length;i++){var t=(this.target)?cssQuery(this.target,m[i]):[m[i]];if(t.length)this.dynamicPseudoClass.apply(m[i],t,this)}}});var A=/^attr/;var U=/^url\s*\(\s*([^)]*)\)$/;var M={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var _5=makePath("ie7-content.htc",path)+"?";HEADER+=".ie7_anon{display:none}";function PseudoElement(s,p,c){this.position=p;var co=c.match(PseudoElement.CONTENT),m,e;if(co){co=co[1];m=co.split(/\s+/);for(var i=0;(e=m[i]);i++){m[i]=A.test(e)?{attr:e.slice(5,-1)}:(e.charAt(0)=="'")?getString(e):decode(e)}co=m}this.content=co;this.inherit(s,decode(c))};Rule.specialize({constructor:PseudoElement,toString:function(){return"."+this.className+"{display:inline}"},init:function(){this.match=cssQuery(this.selector);for(var i=0;i<this.match.length;i++){var r=this.match[i].runtimeStyle;if(!r[this.position])r[this.position]={cssText:""};r[this.position].cssText+=";"+this.cssText;if(this.content!=null)r[this.position].content=this.content}},recalc:function(){if(this.content==null)return;for(var i=0;i<this.match.length;i++){this.create(this.match[i])}},create:function(t){var g=t.runtimeStyle[this.position];if(g){var c=[].concat(g.content||"");for(var j=0;j<c.length;j++){if(typeof c[j]=="object"){c[j]=t.getAttribute(c[j].attr)}}c=c.join("");var u=c.match(U);var h=PseudoElement[u?"OBJECT":"ANON"].replace(/%1/,this.className);var cs=g.cssText.replace(/'/g,'"');var po=M[this.position+Number(t.canHaveChildren)];if(u){var p=document.createElement(h);t.insertAdjacentElement(po,p);p.data=_5;addTimer(p,cs,Quote.remove(u[1]))}else{h=h.replace(/%2/,cs).replace(/%3/,c);t.insertAdjacentHTML(po,h)}t.runtimeStyle[this.position]=null}}});PseudoElement.CONTENT=/content\s*:\s*([^;]*)(;|$)/;PseudoElement.OBJECT="<object class='ie7_anon %1' ie7_anon width=100% height=0 type=text/x-scriptlet>";PseudoElement.ANON="<ie7:! class='ie7_anon %1' ie7_anon style='%2'>%3</ie7:!>";function DynamicPseudoClass(n,a){this.name=n;this.apply=a;this.instances={};ie7CSS.dynamicPseudoClasses[n]=this};Common.specialize({constructor:DynamicPseudoClass,register:function(i){var c=i[2];i.id=c.id+i[0].uniqueID;if(!this.instances[i.id]){var t=i[1],j;for(j=0;j<t.length;j++)c.add(t[j]);this.instances[i.id]=i}},unregister:function(i){if(this.instances[i.id]){var c=i[2];var t=i[1],j;for(j=0;j<t.length;j++)c.remove(t[j]);delete this.instances[i.id]}}});ie7CSS.pseudoClasses.toString=function(){var t=[],p;for(p in this){if(this[p].length>1)p+="\\([^)]*\\)";t.push(p)}return t.join("|")};ie7CSS.pseudoClasses["link"]=function(e){return e.currentStyle["ie7-link"]=="link"};ie7CSS.pseudoClasses["visited"]=function(e){return e.currentStyle["ie7-link"]=="visited"};var _4=(appVersion<5.5)?"onmouseover":"onmouseenter";var _3=(appVersion<5.5)?"onmouseout":"onmouseleave";ie7CSS.dynamicPseudoClasses.toString=ie7CSS.pseudoClasses.toString;var _0=new DynamicPseudoClass("hover",function(e){var i=arguments;ie7CSS.addEventHandler(e,_4,function(){_0.register(i)});ie7CSS.addEventHandler(e,_3,function(){_0.unregister(i)})});var _1=new DynamicPseudoClass("focus",function(e){var i=arguments;ie7CSS.addEventHandler(e,"onfocus",function(){_1.unregister(i);_1.register(i)});ie7CSS.addEventHandler(e,"onblur",function(){_1.unregister(i)});if(e==document.activeElement){_1.register(i)}});var _2=new DynamicPseudoClass("active",function(e){var i=arguments;ie7CSS.addEventHandler(e,"onmousedown",function(){_2.register(i)})});addEventHandler(document,"onmouseup",function(){var i=_2.instances,j;for(j in i)_2.unregister(i[j]);i=_0.instances;for(j in i)if(!i[j][0].contains(event.srcElement))_0.unregister(i[j])});ICommon(AttributeSelector);AttributeSelector.specialize({getAttribute:function(n){switch(n.toLowerCase()){case"class":return"e.className.replace(/\\b\\s*ie7_class\\d+/g,'')";case"src":return"(e.pngSrc||e.src)"}return this.inherit(n)}});encoder.add(/::/,":");safeString.add(/\\([\da-fA-F]{1,4})/,function(m,o){m=m[o+1];return"\\u"+"0000".slice(m.length)+m})});
diff --git a/web/inc/IE7/ie7-css3-selectors.js b/web/inc/IE7/ie7-css3-selectors.js deleted file mode 100644 index 7337b82..0000000 --- a/web/inc/IE7/ie7-css3-selectors.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-css3-selectors",function(){cssQuery.addModule("css-level3",function(){selectors["~"]=function(r,f,t,n){var e,i;for(i=0;(e=f[i]);i++){while(e=nextElementSibling(e)){if(compareTagName(e,t,n))r.push(e)}}};pseudoClasses["contains"]=function(e,t){t=new RegExp(regEscape(getText(t)));return t.test(getTextContent(e))};pseudoClasses["root"]=function(e){return e==getDocument(e).documentElement};pseudoClasses["empty"]=function(e){var n,i;for(i=0;(n=e.childNodes[i]);i++){if(thisElement(n)||n.nodeType==3)return false}return true};pseudoClasses["last-child"]=function(e){return!nextElementSibling(e)};pseudoClasses["only-child"]=function(e){e=e.parentNode;return firstElementChild(e)==lastElementChild(e)};pseudoClasses["not"]=function(e,s){var n=cssQuery(s,getDocument(e));for(var i=0;i<n.length;i++){if(n[i]==e)return false}return true};pseudoClasses["nth-child"]=function(e,a){return nthChild(e,a,previousElementSibling)};pseudoClasses["nth-last-child"]=function(e,a){return nthChild(e,a,nextElementSibling)};pseudoClasses["target"]=function(e){return e.id==location.hash.slice(1)};pseudoClasses["checked"]=function(e){return e.checked};pseudoClasses["enabled"]=function(e){return e.disabled===false};pseudoClasses["disabled"]=function(e){return e.disabled};pseudoClasses["indeterminate"]=function(e){return e.indeterminate};AttributeSelector.tests["^="]=function(a,v){return"/^"+regEscape(v)+"/.test("+a+")"};AttributeSelector.tests["$="]=function(a,v){return"/"+regEscape(v)+"$/.test("+a+")"};AttributeSelector.tests["*="]=function(a,v){return"/"+regEscape(v)+"/.test("+a+")"};function nthChild(e,a,t){switch(a){case"n":return true;case"even":a="2n";break;case"odd":a="2n+1"}var ch=childElements(e.parentNode);function _5(i){var i=(t==nextElementSibling)?ch.length-i:i-1;return ch[i]==e};if(!isNaN(a))return _5(a);a=a.split("n");var m=parseInt(a[0]);var s=parseInt(a[1]);if((isNaN(m)||m==1)&&s==0)return true;if(m==0&&!isNaN(s))return _5(s);if(isNaN(s))s=0;var c=1;while(e=t(e))c++;if(isNaN(m)||m==1)return(t==nextElementSibling)?(c<=s):(s>=c);return(c%m)==s}});var firstElementChild=cssQuery.valueOf("firstElementChild");ie7CSS.pseudoClasses["root"]=function(e){return(e==viewport)||(!isHTML&&e==firstElementChild(body))};var _4=new ie7CSS.DynamicPseudoClass("checked",function(e){if(typeof e.checked!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="checked"){if(e.checked)_4.register(i);else _4.unregister(i)}});if(e.checked)_4.register(i)});var _3=new ie7CSS.DynamicPseudoClass("enabled",function(e){if(typeof e.disabled!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="disabled"){if(!e.isDisabled)_3.register(i);else _3.unregister(i)}});if(!e.isDisabled)_3.register(i)});var _2=new ie7CSS.DynamicPseudoClass("disabled",function(e){if(typeof e.disabled!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="disabled"){if(e.isDisabled)_2.register(i);else _2.unregister(i)}});if(e.isDisabled)_2.register(i)});var _1=new ie7CSS.DynamicPseudoClass("indeterminate",function(e){if(typeof e.indeterminate!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="indeterminate"){if(e.indeterminate)_1.register(i);else _1.unregister(i)}});ie7CSS.addEventHandler(e,"onclick",function(){_1.unregister(i)})});var _0=new ie7CSS.DynamicPseudoClass("target",function(e){var i=arguments;if(!e.tabIndex)e.tabIndex=0;ie7CSS.addEventHandler(document,"onpropertychange",function(){if(event.propertyName=="activeElement"){if(e.id==location.hash.slice(1))_0.register(i);else _0.unregister(i)}});if(e.id==location.hash.slice(1))_0.register(i)});decoder.add(/\|/,"\\:")});
diff --git a/web/inc/IE7/ie7-dhtml.js b/web/inc/IE7/ie7-dhtml.js deleted file mode 100644 index d768063..0000000 --- a/web/inc/IE7/ie7-dhtml.js +++ /dev/null @@ -1,57 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-dhtml", function() {
-
-/* ---------------------------------------------------------------------
- This module is still in development and should not be used.
---------------------------------------------------------------------- */
-
-ie7CSS.specialize("recalc", function() {
- this.inherit();
- for (var i = 0; i < this.recalcs.length; i++) {
- var $recalc = this.recalcs[i];
- for (var j = 0; i < $recalc[3].length; i++) {
- _addPropertyChangeHandler($recalc[3][j], _getPropertyName($recalc[2]), $recalc[1]);
- }
- }
-});
-
-// constants
-var _PATTERNS = {
- width: "(width|paddingLeft|paddingRight|borderLeftWidth|borderRightWidth|borderLeftStyle|borderRightStyle)",
- height: "(height|paddingTop|paddingBottom|borderTopHeight|borderBottomHeight|borderTopStyle|borderBottomStyle)"
-};
-var _PROPERTY_NAMES = {
- width: "fixedWidth",
- height: "fixedHeight",
- right: "width",
- bottom: "height"
-};
-var _DASH_LETTER = /-(\w)/g;
-var _PROPERTY_NAME = /\w+/;
-
-function _addPropertyChangeHandler($element, $propertyName, $fix) {
- addEventHandler($element, "onpropertychange", function() {
- if (_getPattern($propertyName).test(event.propertyName)) {
- _reset($element, $propertyName);
- $fix($element);
- }
- });
-};
-function _upper($match, $letter) {return $letter.toUpperCase()};
-function _getPropertyName($pattern) {
- return String(String($pattern).toLowerCase().replace(_DASH_LETTER, _upper).match(_PROPERTY_NAME));
-};
-function _getPattern($propertyName) {
- return eval("/^style." + (_PATTERNS[$propertyName] || $propertyName) + "$/");
-};
-function _reset($element, $propertyName) {
- $element.runtimeStyle[$propertyName] = "";
- $propertyName = _PROPERTY_NAMES[$propertyName]
- if ($propertyName) $element.runtimeStyle[$propertyName] = "";
-};
-
-});
diff --git a/web/inc/IE7/ie7-dynamic-attributes.js b/web/inc/IE7/ie7-dynamic-attributes.js deleted file mode 100644 index e066911..0000000 --- a/web/inc/IE7/ie7-dynamic-attributes.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-dynamic-attributes",function(){if(!modules["ie7-css2-selectors"])return;var attributeSelectors=cssQuery.valueOf("attributeSelectors");var parseSelector=cssQuery.valueOf("parseSelector");function DynamicAttribute(s,a,d,t,c){this.attach=a||"*";parseSelector(d);this.dynamicAttribute=attributeSelectors["@"+d];this.target=t;this.inherit(s,c)};ie7CSS.Rule.specialize({constructor:DynamicAttribute,recalc:function(){var m=cssQuery(this.attach);for(var i=0;i<m.length;i++){var t=(this.target)?cssQuery(this.target,m[i]):[m[i]];if(t.length)this.apply(m[i],t)}},apply:function(e,t){var self=this;addEventHandler(e,"onpropertychange",function(){if(event.propertyName==self.dynamicAttribute.name)self.test(e,t)});this.test(e,t)},test:function(e,t){var a=this.dynamicAttribute.test(e)?"add":"remove";for(var i=0;(e=t[i]);i++)this[a](e)}});DynamicAttribute.MATCH=/(.*)(\[[^\]]*\])(.*)/;StyleSheet.prototype.specialize({createRule:function(s,c){var m;if(m=s.match(DynamicAttribute.MATCH)){return new DynamicAttribute(s,m[1],m[2],m[3],c)}else return this.inherit(s,c)}})});
diff --git a/web/inc/IE7/ie7-fixed.js b/web/inc/IE7/ie7-fixed.js deleted file mode 100644 index 10d629f..0000000 --- a/web/inc/IE7/ie7-fixed.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-fixed",function(){ie7CSS.addRecalc("position","fixed",_6,"absolute");ie7CSS.addRecalc("background(-attachment)?","[^};]*fixed",_7);var _10=(quirksMode)?"body":"documentElement";var _8=function(){if(body.currentStyle.backgroundAttachment!="fixed"){if(body.currentStyle.backgroundImage=="none"){body.runtimeStyle.backgroundRepeat="no-repeat";body.runtimeStyle.backgroundImage="url("+BLANK_GIF+")"}body.runtimeStyle.backgroundAttachment="fixed"}_8=DUMMY};var _0=createTempElement("img");function _1(f){return _2.exec(String(f))};var _2=new ParseMaster;_2.add(/Left/,"Top");_2.add(/left/,"top");_2.add(/Width/,"Height");_2.add(/width/,"height");_2.add(/right/,"bottom");_2.add(/X/,"Y");function _3(e){return(e)?isFixed(e)||_3(e.parentElement):false};function setExpression(e,p,ex){setTimeout("document.all."+e.uniqueID+".runtimeStyle.setExpression('"+p+"','"+ex+"')",0)};function _7(e){if(register(_7,e,e.currentStyle.backgroundAttachment=="fixed"&&!e.contains(body))){_8();backgroundLeft(e);backgroundTop(e);_9(e)}};function _9(e){_0.src=e.currentStyle.backgroundImage.slice(5,-2);var p=(e.canHaveChildren)?e:e.parentElement;p.appendChild(_0);setOffsetLeft(e);setOffsetTop(e);p.removeChild(_0)};function backgroundLeft(e){e.style.backgroundPositionX=e.currentStyle.backgroundPositionX;if(!_3(e)){var ex="(parseInt(runtimeStyle.offsetLeft)+document."+_10+".scrollLeft)||0";setExpression(e,"backgroundPositionX",ex)}};eval(_1(backgroundLeft));function setOffsetLeft(e){var p=_3(e)?"backgroundPositionX":"offsetLeft";e.runtimeStyle[p]=getOffsetLeft(e,e.style.backgroundPositionX)-e.getBoundingClientRect().left-e.clientLeft+2};eval(_1(setOffsetLeft));function getOffsetLeft(e,p){switch(p){case"left":case"top":return 0;case"right":case"bottom":return viewport.clientWidth-_0.offsetWidth;case"center":return(viewport.clientWidth-_0.offsetWidth)/2;default:if(PERCENT.test(p)){return parseInt((viewport.clientWidth-_0.offsetWidth)*parseFloat(p)/100)}_0.style.left=p;return _0.offsetLeft}};eval(_1(getOffsetLeft));function _6(e){if(register(_6,e,isFixed(e))){setOverrideStyle(e,"position","absolute");setOverrideStyle(e,"left",e.currentStyle.left);setOverrideStyle(e,"top",e.currentStyle.top);_8();if(ie7Layout)ie7Layout.fixRight(e);_5(e)}};function _5(e,r){positionTop(e,r);positionLeft(e,r,true);if(!e.runtimeStyle.autoLeft&&e.currentStyle.marginLeft=="auto"&&e.currentStyle.right!="auto"){var l=viewport.clientWidth-getPixelWidth(e,e.currentStyle.right)-getPixelWidth(e,e.runtimeStyle._12)-e.clientWidth;if(e.currentStyle.marginRight=="auto")l=parseInt(l/2);if(_3(e.offsetParent))e.runtimeStyle.pixelLeft+=l;else e.runtimeStyle.shiftLeft=l}clipWidth(e);clipHeight(e)};function clipWidth(e){if(e.currentStyle.width!="auto"){var r=e.getBoundingClientRect();var w=e.offsetWidth-viewport.clientWidth+r.left-2;if(w>=0){w=Math.max(getPixelValue(e,e.currentStyle.width)-w,0);setOverrideStyle(e,"width",w)}}};eval(_1(clipWidth));function positionLeft(e,r){if(!r&&PERCENT.test(e.currentStyle.width)){e.runtimeStyle.fixWidth=e.currentStyle.width}if(e.runtimeStyle.fixWidth){e.runtimeStyle.width=getPixelWidth(e,e.runtimeStyle.fixWidth)}if(r){if(!e.runtimeStyle.autoLeft)return}else{e.runtimeStyle.shiftLeft=0;e.runtimeStyle._12=e.currentStyle.left;e.runtimeStyle.autoLeft=e.currentStyle.right!="auto"&&e.currentStyle.left=="auto"}e.runtimeStyle.left="";e.runtimeStyle.screenLeft=getScreenLeft(e);e.runtimeStyle.pixelLeft=e.runtimeStyle.screenLeft;if(!r&&!_3(e.offsetParent)){var ex="runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+_10+".scrollLeft";setExpression(e,"pixelLeft",ex)}};eval(_1(positionLeft));function getScreenLeft(e){var s=e.offsetLeft,n=1;if(e.runtimeStyle.autoLeft){s=viewport.clientWidth-e.offsetWidth-getPixelWidth(e,e.currentStyle.right)}if(e.currentStyle.marginLeft!="auto"){s-=getPixelWidth(e,e.currentStyle.marginLeft)}while(e=e.offsetParent){if(e.currentStyle.position!="static")n=-1;s+=e.offsetLeft*n}return s};eval(_1(getScreenLeft));function getPixelWidth(e,v){if(PERCENT.test(v))return parseInt(parseFloat(v)/100*viewport.clientWidth);return getPixelValue(e,v)};eval(_1(getPixelWidth));function _11(){var e=_7.elements;for(var i in e)_9(e[i]);e=_6.elements;for(i in e){_5(e[i],true);_5(e[i],true)}_4=0};var _4;addResize(function(){if(!_4)_4=setTimeout(_11,0)})});
\ No newline at end of file diff --git a/web/inc/IE7/ie7-graphics.js b/web/inc/IE7/ie7-graphics.js deleted file mode 100644 index 7e63c47..0000000 --- a/web/inc/IE7/ie7-graphics.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-graphics",function(){if(appVersion<5.5)return;var A="DXImageTransform.Microsoft.AlphaImageLoader";var F="progid:"+A+"(src='%1',sizingMethod='scale')";var _3=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");var _0=[];function _2(e){var f=e.filters[A];if(f){f.src=e.src;f.enabled=true}else{e.runtimeStyle.filter=F.replace(/%1/,e.src);_0.push(e)}e.src=BLANK_GIF};function _5(e){e.src=e.pngSrc;e.filters[A].enabled=false};ie7CSS.addFix(/opacity\s*:\s*([\d.]+)/,function(m,o){return"zoom:1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity="+((parseFloat(m[o+1])*100)||1)+")"});var B=/background(-image)?\s*:\s*([^\(};]*)url\(([^\)]+)\)([^;}]*)/;ie7CSS.addFix(B,function(m,o){var u=getString(m[o+3]);return _3.test(u)?"filter:"+F.replace(/scale/,"crop").replace(/%1/,u)+";zoom:1;background"+(m[o+1]||"")+":"+(m[o+2]||"")+"none"+(m[o+4]||""):m[o]});if(ie7HTML){ie7HTML.addRecalc("img,input",function(e){if(e.tagName=="INPUT"&&e.type!="image")return;_4(e);addEventHandler(e,"onpropertychange",function(){if(!_1&&event.propertyName=="src"&&e.src.indexOf(BLANK_GIF)==-1)_4(e)})});var B64=/^data:.*;base64/i;var _7=makePath("ie7-base64.php",path);function _4(e){if(_3.test(e.src)){var i=new Image(e.width,e.height);i.onload=function(){e.width=i.width;e.height=i.height;i=null};i.src=e.src;e.pngSrc=e.src;_2(e)}else if(B64.test(e.src)){e.src=_7+"?"+e.src.slice(5)}};var I=/^image/i;var _6=makePath("ie7-object.htc",path);ie7HTML.addRecalc("object",function(e){if(I.test(e.type)){var o=document.createElement("<object type=text/x-scriptlet>");o.style.width=e.currentStyle.width;o.style.height=e.currentStyle.height;o.data=_6;var u=makePath(e.data,getPath(location.href));e.parentNode.replaceChild(o,e);cssQuery.clearCache("object");addTimer(o,"",u);return o}})}var _1=false;addEventHandler(window,"onbeforeprint",function(){_1=true;for(var i=0;i<_0.length;i++)_5(_0[i])});addEventHandler(window,"onafterprint",function(){for(var i=0;i<_0.length;i++)_2(_0[i]);_1=false})});
diff --git a/web/inc/IE7/ie7-html4.js b/web/inc/IE7/ie7-html4.js deleted file mode 100644 index 3fcd891..0000000 --- a/web/inc/IE7/ie7-html4.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-html4",function(){if(!isHTML)return;HEADER+="h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}"+"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";var _0={};ie7HTML=new(Fix.specialize({init:DUMMY,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var i=0;i<this.fixes.length;i++){var m=cssQuery(this.fixes[i][0]);var f=this.fixes[i][1]||_1;for(var j=0;j<m.length;j++)f(m[j])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var m=cssQuery(this.recalcs[i][0]);var r=this.recalcs[i][1],e;var k=Math.pow(2,i);for(var j=0;(e=m[j]);j++){var u=e.uniqueID;if((_0[u]&k)==0){e=r(e)||e;_0[u]|=k}}}}}));ie7HTML.addFix("abbr");ie7HTML.addRecalc("label",function(e){if(!e.htmlFor){var f=cssQuery("input,textarea",e)[0];if(f){addEventHandler(e,"onclick",function(){f.click()})}}});ie7HTML.addRecalc("button,input",function(e){if(e.tagName=="BUTTON"){var m=e.outerHTML.match(/ value="([^"]*)"/i);e.runtimeStyle.value=(m)?m[1]:""}if(e.type=="submit"){addEventHandler(e,"onclick",function(){e.runtimeStyle.clicked=true;setTimeout("document.all."+e.uniqueID+".runtimeStyle.clicked=false",1)})}});var U=/^(submit|reset|button)$/;ie7HTML.addRecalc("form",function(e){addEventHandler(e,"onsubmit",function(){for(var i=0;i<e.length;i++){if(_2(e[i])){e[i].disabled=true;setTimeout("document.all."+e[i].uniqueID+".disabled=false",1)}else if(e[i].tagName=="BUTTON"&&e[i].type=="submit"){setTimeout("document.all."+e[i].uniqueID+".value='"+e[i].value+"'",1);e[i].value=e[i].runtimeStyle.value}}})});function _2(e){return U.test(e.type)&&!e.disabled&&!e.runtimeStyle.clicked};ie7HTML.addRecalc("img",function(e){if(e.alt&&!e.title)e.title=""});var P=(appVersion<5.5)?"HTML:":"";function _1(e){var f=document.createElement("<"+P+e.outerHTML.slice(1));if(e.outerHTML.slice(-2)!="/>"){var en="</"+e.tagName+">",n;while((n=e.nextSibling)&&n.outerHTML!=en){f.appendChild(n)}if(n)n.removeNode()}e.parentNode.replaceChild(f,e)}});
diff --git a/web/inc/IE7/ie7-ie5.js b/web/inc/IE7/ie7-ie5.js deleted file mode 100644 index a07fd98..0000000 --- a/web/inc/IE7/ie7-ie5.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-if(appVersion<5.5){ANON="HTML:!";var ap=function(f,o,a){f.apply(o,a)};if(''.replace(/^/,String)){var _0=String.prototype.replace;var _1=function(e,r){var m,n="",s=this;while(s&&(m=e.exec(s))){n+=s.slice(0,m.index)+ap(r,this,m);s=s.slice(m.lastIndex)}return n+s};String.prototype.replace=function(e,r){this.replace=(typeof r=="function")?_1:_0;return this.replace(e,r)}}if(!Function.apply){var APPLY="apply-"+Number(new Date);ap=function(f,o,a){var r;o[APPLY]=f;switch(a.length){case 0:r=o[APPLY]();break;case 1:r=o[APPLY](a[0]);break;case 2:r=o[APPLY](a[0],a[1]);break;case 3:r=o[APPLY](a[0],a[1],a[2]);break;case 4:r=o[APPLY](a[0],a[1],a[2],a[3]);break;default:var aa=[],i=a.length-1;do aa[i]="a["+i+"]";while(i--);eval("r=o[APPLY]("+aa+")")}delete o[APPLY];return r};ICommon.valueOf.prototype.inherit=function(){return ap(arguments.callee.caller.ancestor,this,arguments)}}if(![].push)Array.prototype.push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i]}return this.length};if(![].pop)Array.prototype.pop=function(){var i=this[this.length-1];this.length--;return i};if(isHTML){HEADER+="address,blockquote,body,dd,div,dt,fieldset,form,"+"frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+"hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}"}}
diff --git a/web/inc/IE7/ie7-layout.js b/web/inc/IE7/ie7-layout.js deleted file mode 100644 index d1b64eb..0000000 --- a/web/inc/IE7/ie7-layout.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-layout",function(){ie7Layout=this;HEADER+="*{boxSizing:content-box}";this.hasLayout=(appVersion<5.5)?function(e){return e.clientWidth}:function(e){return e.currentStyle.hasLayout};this.boxSizing=function(e){if(!ie7Layout.hasLayout(e)){e.style.height="0cm";if(e.currentStyle.verticalAlign=="auto")e.runtimeStyle.verticalAlign="top";_1(e)}};function _1(e){if(e!=viewport&&e.currentStyle.position!="absolute"){collapseMarginTop(e);collapseMarginBottom(e)}};var firstElementChild=cssQuery.valueOf("firstElementChild");var lastElementChild=cssQuery.valueOf("lastElementChild");function collapseMarginTop(e){if(!e.runtimeStyle.marginTop){var p=e.parentElement;if(p&&ie7Layout.hasLayout(p)&&e==firstElementChild(p))return;var f=firstElementChild(e);if(f&&f.currentStyle.styleFloat=="none"&&ie7Layout.hasLayout(f)){collapseMarginTop(f);m=_3(e,e.currentStyle.marginTop);c=_3(f,f.currentStyle.marginTop);if(m<0||c<0){e.runtimeStyle.marginTop=m+c}else{e.runtimeStyle.marginTop=Math.max(c,m)}f.runtimeStyle.marginTop="0px"}}};eval(String(collapseMarginTop).replace(/Top/g,"Bottom").replace(/first/g,"last"));function _3(e,v){return(v=="auto")?0:getPixelValue(e,v)};var U=/^[.\d][\w%]*$/,A=/^(auto|0cm)$/,N="[.\\d]";var applyWidth,applyHeight;function borderBox(e){applyWidth(e);applyHeight(e)};function fixWidth(H){applyWidth=function(e){if(!PERCENT.test(e.currentStyle.width))fixWidth(e);_1(e)};function fixWidth(e,v){if(!e.runtimeStyle.fixedWidth){if(!v)v=e.currentStyle.width;e.runtimeStyle.fixedWidth=(U.test(v))?Math.max(0,getFixedWidth(e,v)):v;setOverrideStyle(e,"width",e.runtimeStyle.fixedWidth)}};function layoutWidth(e){if(!isFixed(e)){var l=e.offsetParent;while(l&&!ie7Layout.hasLayout(l))l=l.offsetParent}return(l||viewport).clientWidth};function getPixelWidth(e,v){if(PERCENT.test(v))return parseInt(parseFloat(v)/100*layoutWidth(e));return getPixelValue(e,v)};var getFixedWidth=function(e,v){var b=e.currentStyle["box-sizing"]=="border-box";var a=0;if(quirksMode&&!b)a+=getBorderWidth(e)+getPaddingWidth(e);else if(!quirksMode&&b)a-=getBorderWidth(e)+getPaddingWidth(e);return getPixelWidth(e,v)+a};function getBorderWidth(e){return e.offsetWidth-e.clientWidth};function getPaddingWidth(e){return getPixelWidth(e,e.currentStyle.paddingLeft)+getPixelWidth(e,e.currentStyle.paddingRight)};eval(String(getPaddingWidth).replace(/padding/g,"margin").replace(/Padding/g,"Margin"));HEADER+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";function minWidth(e){if(e.currentStyle["min-width"]!=null){e.style.minWidth=e.currentStyle["min-width"]}if(register(minWidth,e,e.currentStyle.minWidth!="none")){ie7Layout.boxSizing(e);fixWidth(e);resizeWidth(e)}};eval(String(minWidth).replace(/min/g,"max"));ie7Layout.minWidth=minWidth;ie7Layout.maxWidth=maxWidth;function resizeWidth(e){var r=e.getBoundingClientRect();var w=r.right-r.left;if(e.currentStyle.minWidth!="none"&&w<=getFixedWidth(e,e.currentStyle.minWidth)){e.runtimeStyle.width=getFixedWidth(e,e.currentStyle.minWidth)}else if(e.currentStyle.maxWidth!="none"&&w>=getFixedWidth(e,e.currentStyle.maxWidth)){e.runtimeStyle.width=getFixedWidth(e,e.currentStyle.maxWidth)}else{e.runtimeStyle.width=e.runtimeStyle.fixedWidth}};function fixRight(e){if(register(fixRight,e,/^(fixed|absolute)$/.test(e.currentStyle.position)&&getDefinedStyle(e,"left")!="auto"&&getDefinedStyle(e,"right")!="auto"&&A.test(getDefinedStyle(e,"width")))){resizeRight(e);ie7Layout.boxSizing(e)}};ie7Layout.fixRight=fixRight;function resizeRight(e){var l=getPixelWidth(e,e.runtimeStyle._4||e.currentStyle.left);var w=layoutWidth(e)-getPixelWidth(e,e.currentStyle.right)-l-getMarginWidth(e);if(parseInt(e.runtimeStyle.width)==w)return;e.runtimeStyle.width="";if(isFixed(e)||H||e.offsetWidth<w){if(!quirksMode)w-=getBorderWidth(e)+getPaddingWidth(e);if(w<0)w=0;e.runtimeStyle.fixedWidth=w;setOverrideStyle(e,"width",w)}};var _2=0;addResize(function(){var i,w=(_2<viewport.clientWidth);_2=viewport.clientWidth;for(i in minWidth.elements){var e=minWidth.elements[i];var f=(parseInt(e.runtimeStyle.width)==getFixedWidth(e,e.currentStyle.minWidth));if(w&&f)e.runtimeStyle.width="";if(w==f)resizeWidth(e)}for(i in maxWidth.elements){var e=maxWidth.elements[i];var f=(parseInt(e.runtimeStyle.width)==getFixedWidth(e,e.currentStyle.maxWidth));if(!w&&f)e.runtimeStyle.width="";if(w!=f)resizeWidth(e)}for(i in fixRight.elements)resizeRight(fixRight.elements[i])});if(window.IE7_BOX_MODEL!==false){ie7CSS.addRecalc("width",N,quirksMode?applyWidth:_1)}ie7CSS.addRecalc("min-width",N,minWidth);ie7CSS.addRecalc("max-width",N,maxWidth);ie7CSS.addRecalc("right",N,fixRight)};ie7CSS.addRecalc("border-spacing",N,function(e){if(e.currentStyle.borderCollapse!="collapse"){e.cellSpacing=getPixelValue(e,e.currentStyle["border-spacing"])}});ie7CSS.addRecalc("box-sizing","content-box",this.boxSizing);ie7CSS.addRecalc("box-sizing","border-box",borderBox);var _0=new ParseMaster;_0.add(/Width/,"Height");_0.add(/width/,"height");_0.add(/Left/,"Top");_0.add(/left/,"top");_0.add(/Right/,"Bottom");_0.add(/right/,"bottom");eval(_0.exec(String(fixWidth)));fixWidth();fixHeight(true)});
diff --git a/web/inc/IE7/ie7-load.htc b/web/inc/IE7/ie7-load.htc deleted file mode 100644 index a6f1e7f..0000000 --- a/web/inc/IE7/ie7-load.htc +++ /dev/null @@ -1 +0,0 @@ -<component lightweight="true"><attach event="ondocumentready" onevent="IE7.init()"/></component>
diff --git a/web/inc/IE7/ie7-object.htc b/web/inc/IE7/ie7-object.htc deleted file mode 100644 index 392409e..0000000 --- a/web/inc/IE7/ie7-object.htc +++ /dev/null @@ -1,12 +0,0 @@ -<html>
-<!--
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
--->
-<head>
-<style type="text/css">body{margin:0}</style>
-<script type="text/javascript">public_description=new function(){var l=false;this.ie7_anon=true;this.load=function(o,c,u){if(l)return;l=true;function _0(t,p){t.style[p]=o.currentStyle[p]};var p=o;while(p&&p.currentStyle.backgroundColor=="transparent"){p=p.parentElement}if(p)body.style.backgroundColor=p.currentStyle.backgroundColor;_0(body,"backgroundImage");_0(body,"backgroundRepeat");_0(body,"backgroundPositionX");_0(body,"backgroundPositionY");_0(body,"fontFamily");_0(body,"fontSize");_0(wrapper,"paddingTop");_0(wrapper,"paddingRight");_0(wrapper,"paddingBottom");_0(wrapper,"paddingLeft");image.width=o.clientWidth;image.height=o.clientHeight;var B64=/^data:.*;base64/i,P=/.png$/i;if(B64.test(u))u="ie7-base64.php"+"?"+u.slice(5);if(P.test(u)&&!/MSIE 5.0/.test(navigator.userAgent)){image.src="blank.gif";image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+u+"',sizingMethod='scale')"}else{image.src=u}o.style.width=body.scrollWidth;o.style.height=body.scrollHeight}};</script>
-</head>
-<body id="body"><div id="wrapper"><img id="image"></div></body>
-</html>
diff --git a/web/inc/IE7/ie7-overflow.js b/web/inc/IE7/ie7-overflow.js deleted file mode 100644 index ad2e030..0000000 --- a/web/inc/IE7/ie7-overflow.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-overflow",function(){var S={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};function _3(p,s,t){t.style[p]=s.currentStyle[p];if(S[p]!=null){s.runtimeStyle[p]=S[p]}};ie7CSS.addRecalc("overflow","visible",function(e){if(e.parentNode.ie7_wrapper)return;if(ie7Layout&&e.currentStyle["max-height"]!="auto"){ie7Layout.maxHeight(e)}if(e.currentStyle.marginLeft=="auto")e.style.marginLeft=0;if(e.currentStyle.marginRight=="auto")e.style.marginRight=0;var w=document.createElement(ANON);w.ie7_wrapper=true;for(var p in S)_3(p,e,w);w.style.display="block";w.style.position="relative";e.runtimeStyle.position="absolute";e.parentNode.insertBefore(w,e);w.appendChild(e)});cssQuery.addModule("ie7-overflow",function(){function _0(e){return(e&&e.ie7_wrapper)?e.firstChild:e};var _2=previousElementSibling;previousElementSibling=function(e){return _0(_2(e))};var _1=nextElementSibling;nextElementSibling=function(e){return _0(_1(e))};selectors[" "]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=getElementsByTagName(f[i],t,n);for(j=0;(e=_0(s[j]));j++){if(thisElement(e)&&(!n||compareNamespace(e,n)))r.push(e)}}};selectors[">"]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=childElements(f[i]);for(j=0;(e=_0(s[j]));j++){if(compareTagName(e,t,n))r.push(e)}}}})});
diff --git a/web/inc/IE7/ie7-quirks.js b/web/inc/IE7/ie7-quirks.js deleted file mode 100644 index a1314dd..0000000 --- a/web/inc/IE7/ie7-quirks.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-quirks",function(){if(quirksMode){var F="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var i=0;i<F.length;i++){F[F[i]]=F[i-1]||"0.67em"}ie7CSS.addFix(new RegExp("(font(-size)?\\s*:\\s*)([\\w\\-\\.]+)"),function(m,o){return m[o+1]+(F[m[o+3]]||m[o+3])});if(appVersion<6){var N=/^\-/,L=/(em|ex)$/i;var EM=/em$/i,EX=/ex$/i;function _2(e){var s=1;_0.style.fontFamily=e.currentStyle.fontFamily;_0.style.lineHeight=e.currentStyle.lineHeight;while(e!=body){var f=e.currentStyle["ie7-font-size"];if(f){if(EM.test(f))s*=parseFloat(f);else if(PERCENT.test(f))s*=(parseFloat(f)/100);else if(EX.test(f))s*=(parseFloat(f)/2);else{_0.style.fontSize=f;return 1}}e=e.parentElement}return s};var _0=createTempElement();getPixelValue=function(e,v){if(PIXEL.test(v||0))return parseInt(v||0);var scale=N.test(v)?-1:1;if(L.test(v))scale*=_2(e);_0.style.width=(scale<0)?v.slice(1):v;body.appendChild(_0);v=scale*_0.offsetWidth;_0.removeNode();return parseInt(v)};HEADER=HEADER.replace(/(font(-size)?\s*:\s*([^\s;}\/]*))/gi,"ie7-font-size:$3;$1");ie7CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");ie7CSS.addFix(/display\s*:\s*list-item/,"display:block")}function getPaddingWidth(e){return getPixelValue(e,e.currentStyle.paddingLeft)+getPixelValue(e,e.currentStyle.paddingRight)};function _1(e){if(appVersion<5.5&&ie7Layout)ie7Layout.boxSizing(e.parentElement);var p=e.parentElement;var m=p.offsetWidth-e.offsetWidth-getPaddingWidth(p);var a=(e.currentStyle["ie7-margin"]&&e.currentStyle.marginRight=="auto")||e.currentStyle["ie7-margin-right"]=="auto";switch(p.currentStyle.textAlign){case"right":m=(a)?parseInt(m/2):0;e.runtimeStyle.marginRight=parseInt(m)+"px";break;case"center":if(a)m=0;default:if(a)m=parseInt(m/2);e.runtimeStyle.marginLeft=parseInt(m)+"px"}};ie7CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(e){if(register(_1,e,e.parentElement&&e.currentStyle.display=="block"&&e.currentStyle.marginLeft=="auto"&&e.currentStyle.position!="absolute")){_1(e)}});addResize(function(){for(var i in _1.elements){e=_1.elements[i];e.runtimeStyle.marginLeft=e.runtimeStyle.marginRight="";_1(e)}})}});
diff --git a/web/inc/IE7/ie7-recalc.js b/web/inc/IE7/ie7-recalc.js deleted file mode 100644 index 10cb839..0000000 --- a/web/inc/IE7/ie7-recalc.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-recalc",function(){C=/\sie7_class\d+/g;function _0(e){e.className=e.className.replace(C,"")};function _1(e){e.runtimeStyle.cssText=""};ie7CSS.specialize({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var e=this.elements;for(var i in e)_1(e[i]);this.elements={};if(this.Rule){var e=this.Rule.elements;for(var i in e)_0(e[i]);this.Rule.elements={}}},reload:function(){ie7CSS.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(p,t,h,r){this.inherit(p,t,function(e){h(e);ie7CSS.elements[e.uniqueID]=e},r)},recalc:function(){this.reset();this.inherit()},addEventHandler:function(e,t,h){e.attachEvent(t,h);this.handlers.push(arguments)},removeEventHandlers:function(){var h;while(h=this.handlers.pop()){removeEventHandler(h[0],h[1],h[2])}},getInlineStyles:function(){var st=document.getElementsByTagName("style"),s;for(var i=st.length-1;(s=st[i]);i--){if(!s.disabled&&!s.ie7){var c=s.c||s.innerHTML;this.styles.push(c);s.c=c}}},trash:function(){var s,i;for(i=0;i<styleSheets.length;i++){s=styleSheets[i];if(!s.ie7&&!s.c){s.c=s.cssText}}this.inherit()},getText:function(s){return s.c||this.inherit(s)}});addEventHandler(window,"onunload",function(){ie7CSS.removeEventHandlers()});if(ie7CSS.Rule){ie7CSS.Rule.elements={};ie7CSS.Rule.prototype.specialize({add:function(e){this.inherit(e);ie7CSS.Rule.elements[e.uniqueID]=e}});ie7CSS.PseudoElement.hash={};ie7CSS.PseudoElement.prototype.specialize({create:function(t){var k=this.selector+":"+t.uniqueID;if(!ie7CSS.PseudoElement.hash[k]){ie7CSS.PseudoElement.hash[k]=true;this.inherit(t)}}})}if(isHTML&&ie7HTML){ie7HTML.specialize({elements:{},addRecalc:function(s,h){this.inherit(s,function(e){if(!ie7HTML.elements[e.uniqueID]){h(e);ie7HTML.elements[e.uniqueID]=e}})}})}document.recalc=function(reload){if(ie7CSS.screen){if(reload)ie7CSS.reload();recalc()}}});
diff --git a/web/inc/IE7/ie7-server.css b/web/inc/IE7/ie7-server.css deleted file mode 100644 index 50ca605..0000000 --- a/web/inc/IE7/ie7-server.css +++ /dev/null @@ -1,44 +0,0 @@ -body, td, dd {font: 10pt Verdana, Arial, Helvetica, sans-serif; color: black;}
-body {margin: 8px; background: #333;}
-h1 {margin: 0;}
-h1 a:hover {background-color: transparent;}
-h2 {font-size: 1.75em;}
-h3 {font-size: 1.1em;}
-p.footnote {font-family: "Times New Roman", Times, serif; font-style: italic;}
-a:active {color: #ff0000;}
-a:link {color: #0a6cce;}
-a:visited {color: #0a6cce;}
-code, *.code {font-family: monospace; font-size: 100%; font-style: normal; white-space: nowrap;
- padding: 0 1px; background: #f2f3f8; border: #d6d9e9 1px solid;}
-code.box {display: block; padding: 10px; margin: 0.5em 0;}
-ul {list-style-type: square;}
-dd {margin: .2em 0 .5em 1em;}
-dl.library dt {display: list-item; margin-left: 3em; list-style-type: square;}
-dl.library dd {font-style: italic; margin-left: 3em;}
-dt {font-weight: bold;}
-dt.pack {color: brown;}
-a img {border-style: none;}
-hr {height: 1px; color: #000; border-style: solid;}
-hr.short {height: 2px; width: 100px;}
-div.document {background: #eef; padding: 20px 20px 5px 20px; width: 600px; border: 1px solid black;}
-hr {border-bottom-width: 0px;}
-div.header hr {color: #0a6cce; background-color: #0a6cce;}
-div.footer hr {color: #898e79; background-color: #898e79; }
-div.header, div.header a:link, div.header a:visited, h3 a:link, h3 a:visited {text-decoration: none;}
-a:hover {color: #fff; background-color: #0a6cce; text-decoration: none;}
-div.footer a:hover {background-color: transparent; text-decoration: none;}
-div.header .menu {text-align: right;}
-div.content {min-height: 100px;}
-div.footer {font-size: x-small; margin-top: 8px;}
-div.footnote {font-family: "times new roman", times; font-style: italic; margin-top: 10px;}
-#license {margin-top: 5px; font-size: xx-small;}
-table {border-top: 1px solid #000; border-left: 1px solid #000;}
-th {background-color: #fff; text-align: left;}
-th, td {border-right: 1px solid #000; border-bottom: 1px solid #000;}
-th.small {width: 100px;}
-th.medium {width: 200px;}
-th.large {width: 270px;}
-th.x-large {width: 408px;}
-table.fixed {table-layout: fixed;}
-span.comment {color: #666;}
-
diff --git a/web/inc/IE7/ie7-squish.js b/web/inc/IE7/ie7-squish.js deleted file mode 100644 index e5a1972..0000000 --- a/web/inc/IE7/ie7-squish.js +++ /dev/null @@ -1,45 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-IE7.addModule("ie7-squish", function() {
-
-/* ---------------------------------------------------------------------
-
- Squish some IE bugs!
-
- Some of these bug fixes may have adverse effects so they are
- not included in the standard library. Add your own if you want.
-
- -dean
-
---------------------------------------------------------------------- */
-
-// @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"
-
-// "doubled margin" bug
-// http://www.positioniseverything.net/explorer/doubled-margin.html
-ie7CSS.addFix(/float\s*:\s*(left|right)/, "display:inline;$1");
-
-if (ie7Layout) {
- // "peekaboo" bug
- // http://www.positioniseverything.net/explorer/peekaboo.html
- if (appVersion >= 6) ie7CSS.addRecalc("float", "left|right", function($element) {
- ie7Layout.boxSizing($element.parentElement);
- // "doubled margin" bug
- $element.runtimeStyle.display = "inline";
- });
-
- // "unscrollable content" bug
- // http://www.positioniseverything.net/explorer/unscrollable.html
- ie7CSS.addRecalc("position", "absolute|fixed", function($element) {
- if ($element.offsetParent && $element.offsetParent.currentStyle.position == "relative")
- ie7Layout.boxSizing($element.offsetParent);
- });
-}
-
-//# // get rid of Microsoft's pesky image toolbar
-//# if (!complete) document.write('<meta http-equiv="imagetoolbar" content="no">');
-
-});
diff --git a/web/inc/IE7/ie7-standard-p.js b/web/inc/IE7/ie7-standard-p.js deleted file mode 100644 index 6db85f5..0000000 --- a/web/inc/IE7/ie7-standard-p.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('y(!26.1F)11 7(){2C{26.1F=8;6 2s=8.24=11 3b;8.1g=7(){z"1F 4x 0.9 (ad)"};6 5T=/5T/.Z(2y.5h.7C);6 31=(5T)?7(m){26.31(1F+"\\n\\n"+m)}:2s;6 29=ac.29.19(/ab (\\d\\.\\d)/)[1];6 2m=16.aa!="a9";y(/a8/.Z(2y.5h.7C)||29<5||!/^a7/.Z(16.2F.2a))z;6 33=16.5W=="33";6 1s,1K;6 2F=16.2F,1X,1J,1R=16.1R;6 4E="!";6 3Q={};6 2G=1z;1F.24=7(n,s){y(!3Q[n]){y(2G)1k("s="+23(s));3Q[n]=11 s()}};6 R=/^[\\w\\.]+[^:]*$/;7 1Z(h,p){y(R.Z(h))h=(p||"")+h;z h};7 3F(h,p){h=1Z(h,p);z h.1q(0,h.7a("/")+1)};6 s=16.7B[16.7B.K-1];2C{1k(s.7j)}2j(i){}6 2k=3F(s.1l);6 2v;2C{6 l=(a6()>=5)?"a5":"5n";2v=11 a4(l+".a3")}2j(i){}6 4A={};7 3T(h,p){2C{h=1Z(h,p);y(!4A[h]){2v.a2("a1",h,1z);2v.a0();y(2v.7A==0||2v.7A==9Z){4A[h]=2v.9Y}}}2j(i){31("4B [1]: 5O 9X 9W "+h)}5U{z 4A[h]||""}};6 4i=1Z("9V.9U",2k);7 2o(1w){y(1w!=1U){1w.1T=1t.1C.1T;1w.1e=1t.1C.1e}z 1w};2o.1e=7(p,c){y(!p)p={};y(!c)c=p.1h;y(c=={}.1h)c=11 3b("8.1T()");c.1i=11 3b("z 8");c.1i.1C=11 8.1i;c.1i.1C.1e(p);c.1C=11 c.1i;c.1i.1C.1h=c.1C.1h=c;c.2E=8;c.1e=1a.5P;c.4z=8.4z;z c};2o.1i=11 3b("z 8");2o.1i.1C={1h:2o,1T:7(){z 1a.5P.9T.2E.2q(8,1a)},1e:7(1w){y(8==8.1h.1C&&8.1h.1e){z 8.1h.1i.1C.1e(1w)}O(6 i 28 1w){34(i){1m"1h":1m"1g":1m"1i":5M}y(3Y 1w[i]=="7"&&1w[i]!=8[i]){1w[i].2E=8[i]}8[i]=1w[i]}y(1w.1g!=8.1g&&1w.1g!={}.1g){1w.1g.2E=8.1g;8.1g=1w.1g}z 8}};7 1t(){};8.1t=2o.1e({1h:1t,1g:7(){z"[9S "+(8.1h.1x||"9R")+"]"},9Q:7(2i){z 8.1h==2i||2i.4z(8.1h)}});1t.1x="1t";1t.2E=1U;1t.4z=7(2i){1D(2i&&2i.2E!=8)2i=2i.2E;z 7q(2i)};1t.1i.2E=2o;3u 8.1t;6 5x=1t.1e({1h:7(){8.3L=[];8.1Q=[]},1S:2s});y(29<5.5)1k(3T("17-9P.5X",2k));6 5S=1z;1F.1S=7(){2C{y(5S)z;5S=33=1o;1X=16.1X;1J=(2m)?1X:2F;y(2l&&1s)1s.2q();V.2q();1u();31("2G 9O")}2j(e){31("4B [2]: "+e.5V)}};6 1Q=[];7 1n(r){1Q.1b(r)};7 1u(){14.5g();y(2l&&1s)1s.1u();V.1u();O(6 i=0;i<1Q.K;i++)1Q[i]()};7 2U(){6 E=0,R=1,L=2;6 G=/\\(/g,S=/\\$\\d/,I=/^\\$\\d+$/,T=/([\'"])\\1\\+(.*)\\+\\1\\1$/,7t=/\\\\./g,Q=/\'/,7z=/\\3S[^\\3S]*\\3S/g;6 3N=8;8.15=7(e,r){y(!r)r="";6 l=(5R(23(e)).19(G)||"").K+1;y(S.Z(r)){y(I.Z(r)){r=25(r.1q(1))-1}1d{6 i=l;6 q=Q.Z(5R(r))?\'"\':"\'";1D(i)r=r.2O("$"+i--).2p(q+"+a[o+"+i+"]+"+q);r=11 3b("a,o","z"+q+r.13(T,"$1")+q)}}7y(e||"/^$/",r,l)};8.2V=7(s){3R.K=0;z 7u(7v(s,8.4y).13(11 1N(30,8.5Q?"5D":"g"),7w),8.4y).13(7z,"")};8.72=7(){30.K=0};6 3R=[];6 30=[];6 7x=7(){z"("+23(8[E]).1q(1,-1)+")"};30.1g=7(){z 8.2p("|")};7 7y(){1a.1g=7x;30[30.K]=1a}7 7w(){y(!1a[0])z"";6 i=1,j=0,p;1D(p=30[j++]){y(1a[i]){6 r=p[R];34(3Y r){1m"7":z r(1a,i);1m"9N":z 1a[r+i]}6 d=(1a[i].6F(3N.4y)==-1)?"":"\\3S"+1a[i]+"\\3S";z d+r}1d i+=p[L]}};7 7v(s,e){z e?s.13(11 1N("\\\\"+e+"(.)","g"),7(m,c){3R[3R.K]=c;z e}):s};7 7u(s,e){6 i=0;z e?s.13(11 1N("\\\\"+e,"g"),7(){z e+(3R[i++]||"")}):s};7 5R(s){z s.13(7t,"")}};2U.1C={1h:2U,5Q:1z,4y:""};1t.1e(2U.1C);6 3M=2U.1e({5Q:1o});6 14=7(){6 4x="2.0.2";6 C=/\\s*,\\s*/;6 14=7(s,1E){2C{6 m=[];6 u=1a.5P.5I&&!1E;6 b=(1E)?(1E.1h==7n)?1E:[1E]:[16];6 2f=45(s).2O(C),i;O(i=0;i<2f.K;i++){s=5J(2f[i]);y(4P&&s.1q(0,3).2p("")==" *#"){s=s.1q(2);1E=7o([],b,s[1])}1d 1E=b;6 j=0,t,f,a,c="";1D(j<s.K){t=s[j++];f=s[j++];c+=t+f;a="";y(s[j]=="("){1D(s[j++]!=")"&&j<s.K){a+=s[j]}a=a.1q(0,-1);c+="("+a+")"}1E=(u&&2e[c])?2e[c]:7m(1E,t,f,a);y(u)2e[c]=1E}m=m.4J(1E)}3u 14.5O;z m}2j(e){14.5O=e;z[]}};14.1g=7(){z"7 14() {\\n [4x "+4x+"]\\n}"};6 2e={};14.5I=1z;14.5g=7(s){y(s){s=5J(s).2p("");3u 2e[s]}1d 2e={}};6 3Q={};6 2G=1z;14.24=7(n,s){y(2G)1k("s="+23(s));3Q[n]=11 s()};14.1i=7(c){z c?1k(c):8};6 1V={};6 1B={};6 1p={19:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};6 2R=[];1V[" "]=7(r,f,t,n){6 e,i,j;O(i=0;i<f.K;i++){6 s=4w(f[i],t,n);O(j=0;(e=s[j]);j++){y(2D(e)&&5K(e,n))r.1b(e)}}};1V["#"]=7(r,f,i){6 e,j;O(j=0;(e=f[j]);j++)y(e.1c==i)r.1b(e)};1V["."]=7(r,f,c){c=11 1N("(^|\\\\s)"+c+"(\\\\s|$)");6 e,i;O(i=0;(e=f[i]);i++)y(c.Z(e.1x))r.1b(e)};1V[":"]=7(r,f,p,a){6 t=1B[p],e,i;y(t)O(i=0;(e=f[i]);i++)y(t(e,a))r.1b(e)};1B["21"]=7(e){6 d=5L(e);y(d.5N)O(6 i=0;i<d.5N.K;i++){y(d.5N[i]==e)z 1o}};1B["37"]=7(e){};6 2D=7(e){z(e&&e.7k==1&&e.2W!="!")?e:1U};6 4S=7(e){1D(e&&(e=e.9M)&&!2D(e))5M;z e};6 47=7(e){1D(e&&(e=e.6W)&&!2D(e))5M;z e};6 3l=7(e){z 2D(e.7s)||47(e.7s)};6 5t=7(e){z 2D(e.7r)||4S(e.7r)};6 6q=7(e){6 c=[];e=3l(e);1D(e){c.1b(e);e=47(e)}z c};6 4P=1o;6 5H=7(e){6 d=5L(e);z(3Y d.7p=="9L")?/\\.9K$/i.Z(d.9J):7q(d.7p=="9I 9H")};6 5L=7(e){z e.9G||e.16};6 4w=7(e,t){z(t=="*"&&e.1Y)?e.1Y:e.4w(t)};6 4T=7(e,t,n){y(t=="*")z 2D(e);y(!5K(e,n))z 1z;y(!5H(e))t=t.9F();z e.2W==t};6 5K=7(e,n){z!n||(n=="*")||(e.9E==n)};6 9D=7(e){z e.9C};7 7o(r,f,1c){6 m,i,j;O(i=0;i<f.K;i++){y(m=f[i].1Y.9B(1c)){y(m.1c==1c)r.1b(m);1d y(m.K!=1U){O(j=0;j<m.K;j++){y(m[j].1c==1c)r.1b(m[j])}}}}z r};y(![].1b)7n.1C.1b=7(){O(6 i=0;i<1a.K;i++){8[8.K]=1a[i]}z 8.K};6 N=/\\|/;7 7m(1E,t,f,a){y(N.Z(f)){f=f.2O(N);a=f[0];f=f[1]}6 r=[];y(1V[t]){1V[t](r,1E,f,a)}z r};6 S=/^[^\\s>+~]/;6 7l=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;7 5J(s){y(S.Z(s))s=" "+s;z s.19(7l)||[]};6 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;6 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;6 45=7(s){z s.13(W,"$1").13(I,"$1*$2")};6 2c={1g:7(){z"\'"},19:/^(\'[^\']*\')|("[^"]*")$/,Z:7(s){z 8.19.Z(s)},15:7(s){z 8.Z(s)?s:8+s+8},3v:7(s){z 8.Z(s)?s.1q(1,-1):s}};6 2w=7(t){z 2c.3v(t)};6 E=/([\\/()[\\]?{}|*+-])/g;7 4O(s){z s.13(E,"\\\\$1")};2G=1o;z 14}();14.5I=1o;14.24("17",7(){2D=7(e){z(e&&e.7k==1&&e.2W!="!"&&!e.2K)?e:1U}});14.1i("2w=1a[1]",42);6 2l=!14.1i("5H(1a[1])",2F);6 2r=":21{17-21:21}:37{17-21:37}"+(2l?"":"*{6Q:0}");6 V=11(5x.1e({5B:11 3M,2P:"",2Y:"",5F:[],1S:7(){8.5G();8.4t()},4t:7(){V.3O.18=2r+8.2P+8.2Y},7i:7(){6 3P=16.4w("1r"),s;O(6 i=3P.K-1;(s=3P[i]);i--){y(!s.3m&&!s.17){8.5F.1b(s.7j)}}},2q:7(){8.7i();8.4t();11 3y("2P");8.7g()},3i:7(e,r){8.5B.15(e,r)},1u:7(){6 R=/7h\\d+/g;6 s=2r.19(/[{,]/g).K;6 3P=s+(8.2P.18.19(/\\{/g)||"").K;6 2Q=8.3O.2t,r;6 4v,c,4u,e,i,j,k,1c;O(i=s;i<3P;i++){r=2Q[i];y(r&&(4v=r.1r.18.19(R))){4u=14(r.4M);y(4u.K)O(j=0;j<4v.K;j++){1c=4v[j];c=V.1Q[1c.1q(10)][2];O(k=0;(e=4u[k]);k++){y(e.D[1c])c(e)}}}}},1n:7(p,t,h,r){t=11 1N("([{;\\\\s])"+p+"\\\\s*:\\\\s*"+t+"[^;}]*");6 i=8.1Q.K;y(r)r=p+":"+r;8.3i(t,7(m,o){z(r?m[o+1]+r:m[o])+";17-"+m[o].1q(1)+";7h"+i+":1"});8.1Q.1b(1a);z i},2w:7(s){z s.18||""},5G:7(){y(33||!2l)16.5G();1d 16.9A("<1r 17=1o></1r>");8.3O=1R[1R.K-1];8.3O.17=1o;8.3O.18=2r},7g:7(){O(6 i=0;i<1R.K;i++){y(!1R[i].17&&1R[i].18){1R[i].18=""}}}}));7 3y(m){8.2Z=m;8.3q();V[m]=8;V.4t()};1t.1e({1h:3y,1g:7(){z"@2Z "+8.2Z+"{"+8.18+"}"},1u:2s,3q:7(){8.18="";8.2w();8.38();8.18=41(8.18);f={}},2w:7(){6 7e=[].4J(V.5F);6 M=/@2Z\\s+([^{]*)\\{([^@]+\\})\\s*\\}/5D;6 A=/\\9z\\b|^$/i,S=/\\9y\\b/i,P=/\\9x\\b/i;7 7d(c,m){4s.v=m;z c.13(M,4s)};7 4s(9w,m,c){m=5E(m);34(m){1m"2P":1m"2Y":y(m!=4s.v)z"";1m"1Y":z c}z""};7 5E(m){y(A.Z(m))z"1Y";1d y(S.Z(m))z(P.Z(m))?"1Y":"2P";1d y(P.Z(m))z"2Y"};6 3N=8;7 5C(s,p,m,l){6 c="";y(!l){m=5E(s.2Z);l=0}y(m=="1Y"||m==3N.2Z){y(l<3){O(6 i=0;i<s.7f.K;i++){c+=5C(s.7f[i],3F(s.2u,p),m,l+1)}}c+=79(s.2u?7c(s,p):7e.77()||"");c=7d(c,3N.2Z)}z c};6 f={};7 7c(s,p){6 u=1Z(s.2u,p);y(f[u])z"";f[u]=(s.3m)?"":7b(V.2w(s,p),3F(s.2u,p));z f[u]};6 U=/(43\\s*\\(\\s*[\'"]?)([\\w\\.]+[^:\\)]*[\'"]?\\))/5D;7 7b(c,p){z c.13(U,"$1"+p.1q(0,p.7a("/")+1)+"$2")};O(6 i=0;i<1R.K;i++){y(!1R[i].3m&&!1R[i].17){8.18+=5C(1R[i])}}},38:7(){8.18=V.5B.2V(8.18)},1u:2s});6 2c=14.1i("2c");6 4r=[];7 79(c){z 2n.2V(3r.2V(c))};7 5A(m,o){z 2c+(4r.1b(m[o])-1)+2c};7 42(v){z 2c.Z(v)?1k(4r[1k(v)]):v};6 2n=11 3M;2n.15(/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//);2n.15(/\'[^\']*\'/,5A);2n.15(/"[^"]*"/,5A);2n.15(/\\s+/," ");2n.15(/@(9v|9u)[^;\\n]+[;\\n]|<!\\-\\-|\\-\\->/);6 3r=11 3M;3r.15(/\\\\\'/,"\\\\9t");3r.15(/\\\\"/,"\\\\46");6 5z=11 3M;5z.15(/\'(\\d+)\'/,78);7 41(c){z 5z.2V(c)};7 78(m,o){z 4r[m[o+1]]};6 5y=[];7 4U(h){1n(h);1j(26,"9s",h)};7 1j(e,t,h){e.9r(t,h);5y.1b(1a)};7 76(e,t,h){2C{e.9q(t,h)}2j(i){}};1j(26,"9p",7(){6 h;1D(h=5y.77()){76(h[0],h[1],h[2])}});7 20(h,e,c){y(!h.1O)h.1O={};y(c)h.1O[e.2a]=e;1d 3u h.1O[e.2a];z c};1j(26,"6z",7(){y(!V.2Y)11 3y("2Y");V.2Y.1u()});6 75=/^\\d+(9o)?$/i;6 3d=/^\\d+%$/;6 3c=7(e,v){y(75.Z(v))z 25(v);6 s=e.1r.1f;6 r=e.J.1f;e.J.1f=e.D.1f;e.1r.1f=v||0;v=e.1r.4e;e.1r.1f=s;e.J.1f=r;z v};7 6x(t){6 e=16.3X(t||"2M");e.1r.18="1y:3C;6R:0;4K:9n;3G:1M;9m:9l(0 0 0 0);1f:-9k";e.2K=1o;z e};6 4q="17-";7 3D(e){z e.D["17-1y"]=="2z"};7 4o(e,p){z e.D[4q+p]||e.D[p]};7 2T(e,p,v){y(e.D[4q+p]==1U){e.J[4q+p]=e.D[p]}e.J[p]=v};7 4H(o,c,u){6 t=9j(7(){2C{y(!o.3q)z;o.3q(o,c,u);74(t)}2j(i){74(t)}},10)};1F.24("17-9i",7(){y(!2l)z;2r+="9h{3p-3o:9g}9f{3p-3o:1.9e;}9d{3p-3o:1.9c;}"+"9b{3p-3o:9a}99{3p-3o:.98}97{3p-3o:.96}";6 5w={};1s=11(5x.1e({1S:2s,3i:7(){8.3L.1b(1a)},2q:7(){O(6 i=0;i<8.3L.K;i++){6 m=14(8.3L[i][0]);6 f=8.3L[i][1]||6X;O(6 j=0;j<m.K;j++)f(m[j])}},1n:7(){8.1Q.1b(1a)},1u:7(){O(6 i=0;i<8.1Q.K;i++){6 m=14(8.1Q[i][0]);6 r=8.1Q[i][1],e;6 k=4g.95(2,i);O(6 j=0;(e=m[j]);j++){6 u=e.2a;y((5w[u]&k)==0){e=r(e)||e;5w[u]|=k}}}}}));1s.3i("94");1s.1n("93",7(e){y(!e.6o){6 f=14("5l,92",e)[0];y(f){1j(e,"73",7(){f.91()})}}});1s.1n("71,5l",7(e){y(e.2W=="70"){6 m=e.3z.19(/ 3n="([^"]*)"/i);e.J.3n=(m)?m[1]:""}y(e.2L=="5v"){1j(e,"73",7(){e.J.5u=1o;32("16.1Y."+e.2a+".J.5u=1z",1)})}});6 U=/^(5v|72|71)$/;1s.1n("90",7(e){1j(e,"8Z",7(){O(6 i=0;i<e.K;i++){y(6Z(e[i])){e[i].3m=1o;32("16.1Y."+e[i].2a+".3m=1z",1)}1d y(e[i].2W=="70"&&e[i].2L=="5v"){32("16.1Y."+e[i].2a+".3n=\'"+e[i].3n+"\'",1);e[i].3n=e[i].J.3n}}})});7 6Z(e){z U.Z(e.2L)&&!e.3m&&!e.J.5u};1s.1n("5d",7(e){y(e.8Y&&!e.6Y)e.6Y=""});6 P=(29<5.5)?"8X:":"";7 6X(e){6 f=16.3X("<"+P+e.3z.1q(1));y(e.3z.1q(-2)!="/>"){6 6V="</"+e.2W+">",n;1D((n=e.6W)&&n.3z!=6V){f.6t(n)}y(n)n.8W()}e.4R.6A(f,e)}});1F.24("17-8V",7(){1K=8;2r+="*{3H:22-2X}";8.3j=(29<5.5)?7(e){z e.1I}:7(e){z e.D.3j};8.3H=7(e){y(!1K.3j(e)){e.1r.2b="6T";y(e.D.6U=="1P")e.J.6U="2y";4k(e)}};7 4k(e){y(e!=1J&&e.D.1y!="3C"){4p(e);8U(e)}};6 3l=14.1i("3l");6 5t=14.1i("5t");7 4p(e){y(!e.J.3k){6 p=e.59;y(p&&1K.3j(p)&&e==3l(p))z;6 f=3l(e);y(f&&f.D.8T=="1M"&&1K.3j(f)){4p(f);m=5s(e,e.D.3k);c=5s(f,f.D.3k);y(m<0||c<0){e.J.3k=m+c}1d{e.J.3k=4g.3g(c,m)}f.J.3k="8S"}}};1k(23(4p).13(/5c/g,"6N").13(/4N/g,"8R"));7 5s(e,v){z(v=="1P")?0:3c(e,v)};6 U=/^[.\\d][\\w%]*$/,A=/^(1P|6T)$/,N="[.\\\\d]";6 4l,6S;7 6O(e){4l(e);6S(e)};7 2g(H){4l=7(e){y(!3d.Z(e.D.12))2g(e);4k(e)};7 2g(e,v){y(!e.J.3J){y(!v)v=e.D.12;e.J.3J=(U.Z(v))?4g.3g(0,2B(e,v)):v;2T(e,"12",e.J.3J)}};7 5r(e){y(!3D(e)){6 l=e.3B;1D(l&&!1K.3j(l))l=l.3B}z(l||1J).1I};7 1H(e,v){y(3d.Z(v))z 25(4c(v)/3w*5r(e));z 3c(e,v)};6 2B=7(e,v){6 b=e.D["2X-5o"]=="3G-2X";6 a=0;y(2m&&!b)a+=4n(e)+3K(e);1d y(!2m&&b)a-=4n(e)+3K(e);z 1H(e,v)+a};7 4n(e){z e.2S-e.1I};7 3K(e){z 1H(e,e.D.8Q)+1H(e,e.D.8P)};1k(23(3K).13(/6R/g,"6Q").13(/8O/g,"8N"));2r+="*{1A:1M;27:1M;3I-12:1M;3g-12:1M}";7 1A(e){y(e.D["3I-12"]!=1U){e.1r.1A=e.D["3I-12"]}y(20(1A,e,e.D.1A!="1M")){1K.3H(e);2g(e);4m(e)}};1k(23(1A).13(/3I/g,"3g"));1K.1A=1A;1K.27=27;7 4m(e){6 r=e.54();6 w=r.1W-r.1f;y(e.D.1A!="1M"&&w<=2B(e,e.D.1A)){e.J.12=2B(e,e.D.1A)}1d y(e.D.27!="1M"&&w>=2B(e,e.D.27)){e.J.12=2B(e,e.D.27)}1d{e.J.12=e.J.3J}};7 2x(e){y(20(2x,e,/^(2z|3C)$/.Z(e.D.1y)&&4o(e,"1f")!="1P"&&4o(e,"1W")!="1P"&&A.Z(4o(e,"12")))){5p(e);1K.3H(e)}};1K.2x=2x;7 5p(e){6 l=1H(e,e.J.52||e.D.1f);6 w=5r(e)-1H(e,e.D.1W)-l-8M(e);y(25(e.J.12)==w)z;e.J.12="";y(3D(e)||H||e.2S<w){y(!2m)w-=4n(e)+3K(e);y(w<0)w=0;e.J.3J=w;2T(e,"12",w)}};6 5q=0;4U(7(){6 i,w=(5q<1J.1I);5q=1J.1I;O(i 28 1A.1O){6 e=1A.1O[i];6 f=(25(e.J.12)==2B(e,e.D.1A));y(w&&f)e.J.12="";y(w==f)4m(e)}O(i 28 27.1O){6 e=27.1O[i];6 f=(25(e.J.12)==2B(e,e.D.27));y(!w&&f)e.J.12="";y(w!=f)4m(e)}O(i 28 2x.1O)5p(2x.1O[i])});y(26.8L!==1z){V.1n("12",N,2m?4l:4k)}V.1n("3I-12",N,1A);V.1n("3g-12",N,27);V.1n("1W",N,2x)};V.1n("3G-6P",N,7(e){y(e.D.8K!="8J"){e.8I=3c(e,e.D["3G-6P"])}});V.1n("2X-5o","22-2X",8.3H);V.1n("2X-5o","3G-2X",6O);6 1v=11 2U;1v.15(/6v/,"6u");1v.15(/12/,"2b");1v.15(/6w/,"5c");1v.15(/1f/,"2y");1v.15(/8H/,"6N");1v.15(/1W/,"56");1k(1v.2V(23(2g)));2g();8G(1o)});1F.24("17-8F",7(){y(29<5.5)z;6 A="6J.5n.8E";6 F="6K:"+A+"(1l=\'%1\',8D=\'6H\')";6 5j=11 1N((26.8C||"-8B.8A")+"$","i");6 3h=[];7 5f(e){6 f=e.6M[A];y(f){f.1l=e.1l;f.6L=1o}1d{e.J.5m=F.13(/%1/,e.1l);3h.1b(e)}e.1l=4i};7 6y(e){e.1l=e.4D;e.6M[A].6L=1z};V.3i(/6I\\s*:\\s*([\\d.]+)/,7(m,o){z"6G:1;5m:6K:6J.5n.8z(6I="+((4c(m[o+1])*3w)||1)+")"});6 B=/5e(-5i)?\\s*:\\s*([^\\(};]*)43\\(([^\\)]+)\\)([^;}]*)/;V.3i(B,7(m,o){6 u=42(m[o+3]);z 5j.Z(u)?"5m:"+F.13(/6H/,"8y").13(/%1/,u)+";6G:1;5e"+(m[o+1]||"")+":"+(m[o+2]||"")+"1M"+(m[o+4]||""):m[o]});y(1s){1s.1n("5d,5l",7(e){y(e.2W=="8x"&&e.2L!="5i")z;5k(e);1j(e,"8w",7(){y(!4j&&60.8v=="1l"&&e.1l.6F(4i)==-1)5k(e)})});6 6D=/^3W:.*;6E/i;6 6C=1Z("17-6E.8u",2k);7 5k(e){y(5j.Z(e.1l)){6 i=11 8t(e.12,e.2b);i.8s=7(){e.12=i.12;e.2b=i.2b;i=1U};i.1l=e.1l;e.4D=e.1l;5f(e)}1d y(6D.Z(e.1l)){e.1l=6C+"?"+e.1l.1q(5)}};6 I=/^5i/i;6 6B=1Z("17-2M.4C",2k);1s.1n("2M",7(e){y(I.Z(e.2L)){6 o=16.3X("<2M 2L=68/x-67>");o.1r.12=e.D.12;o.1r.2b=e.D.2b;o.3W=6B;6 u=1Z(e.3W,3F(5h.2u));e.4R.6A(o,e);14.5g("2M");4H(o,"",u);z o}})}6 4j=1z;1j(26,"6z",7(){4j=1o;O(6 i=0;i<3h.K;i++)6y(3h[i])});1j(26,"8r",7(){O(6 i=0;i<3h.K;i++)5f(3h[i]);4j=1z})});1F.24("17-2z",7(){V.1n("1y","2z",4a,"3C");V.1n("5e(-8q)?","[^};]*2z",4b);6 4Z=(2m)?"1X":"2F";6 4h=7(){y(1X.D.5b!="2z"){y(1X.D.5a=="1M"){1X.J.8p="8o-8n";1X.J.5a="43("+4i+")"}1X.J.5b="2z"}4h=2s};6 2h=6x("5d");7 1v(f){z 2A.2V(23(f))};6 2A=11 2U;2A.15(/6w/,"5c");2A.15(/1f/,"2y");2A.15(/6v/,"6u");2A.15(/12/,"2b");2A.15(/1W/,"56");2A.15(/X/,"Y");7 3f(e){z(e)?3D(e)||3f(e.59):1z};7 4f(e,p,3e){32("16.1Y."+e.2a+".J.4f(\'"+p+"\',\'"+3e+"\')",0)};7 4b(e){y(20(4b,e,e.D.5b=="2z"&&!e.61(1X))){4h();58(e);8m(e);4V(e)}};7 4V(e){2h.1l=e.D.5a.1q(5,-2);6 p=(e.6c)?e:e.59;p.6t(2h);57(e);8l(e);p.8k(2h)};7 58(e){e.1r.3E=e.D.3E;y(!3f(e)){6 3e="(25(J.3A)+16."+4Z+".6s)||0";4f(e,"3E",3e)}};1k(1v(58));7 57(e){6 p=3f(e)?"3E":"3A";e.J[p]=55(e,e.1r.3E)-e.54().1f-e.8j+2};1k(1v(57));7 55(e,p){34(p){1m"1f":1m"2y":z 0;1m"1W":1m"56":z 1J.1I-2h.2S;1m"8i":z(1J.1I-2h.2S)/2;8h:y(3d.Z(p)){z 25((1J.1I-2h.2S)*4c(p)/3w)}2h.1r.1f=p;z 2h.3A}};1k(1v(55));7 4a(e){y(20(4a,e,3D(e))){2T(e,"1y","3C");2T(e,"1f",e.D.1f);2T(e,"2y",e.D.2y);4h();y(1K)1K.2x(e);49(e)}};7 49(e,r){8g(e,r);4Y(e,r,1o);y(!e.J.4d&&e.D.4X=="1P"&&e.D.1W!="1P"){6 l=1J.1I-1H(e,e.D.1W)-1H(e,e.J.52)-e.1I;y(e.D.8f=="1P")l=25(l/2);y(3f(e.3B))e.J.4e+=l;1d e.J.50=l}53(e);8e(e)};7 53(e){y(e.D.12!="1P"){6 r=e.54();6 w=e.2S-1J.1I+r.1f-2;y(w>=0){w=4g.3g(3c(e,e.D.12)-w,0);2T(e,"12",w)}}};1k(1v(53));7 4Y(e,r){y(!r&&3d.Z(e.D.12)){e.J.2g=e.D.12}y(e.J.2g){e.J.12=1H(e,e.J.2g)}y(r){y(!e.J.4d)z}1d{e.J.50=0;e.J.52=e.D.1f;e.J.4d=e.D.1W!="1P"&&e.D.1f=="1P"}e.J.1f="";e.J.51=4W(e);e.J.4e=e.J.51;y(!r&&!3f(e.3B)){6 3e="J.51+J.50+16."+4Z+".6s";4f(e,"4e",3e)}};1k(1v(4Y));7 4W(e){6 s=e.3A,n=1;y(e.J.4d){s=1J.1I-e.2S-1H(e,e.D.1W)}y(e.D.4X!="1P"){s-=1H(e,e.D.4X)}1D(e=e.3B){y(e.D.1y!="8d")n=-1;s+=e.3A*n}z s};1k(1v(4W));7 1H(e,v){y(3d.Z(v))z 25(4c(v)/3w*1J.1I);z 3c(e,v)};1k(1v(1H));7 6r(){6 e=4b.1O;O(6 i 28 e)4V(e[i]);e=4a.1O;O(i 28 e){49(e[i],1o);49(e[i],1o)}48=0};6 48;4U(7(){y(!48)48=32(6r,0)})});1F.24("17-8c-1V",7(){14.24("8b-8a",7(){1V[">"]=7(r,f,t,n){6 e,i,j;O(i=0;i<f.K;i++){6 s=6q(f[i]);O(j=0;(e=s[j]);j++)y(4T(e,t,n))r.1b(e)}};1V["+"]=7(r,f,t,n){O(6 i=0;i<f.K;i++){6 e=47(f[i]);y(e&&4T(e,t,n))r.1b(e)}};1V["@"]=7(r,f,a){6 t=2R[a].Z;6 e,i;O(i=0;(e=f[i]);i++)y(t(e))r.1b(e)};1B["4N-89"]=7(e){z!4S(e)};1B["4Q"]=7(e,c){c=11 1N("^"+c,"i");1D(e&&!e.2H("4Q"))e=e.4R;z e&&c.Z(e.2H("4Q"))};1p.6p=/\\\\:/g;1p.3x="@";1p.3a={};1p.13=7(m,a,n,c,v){6 k=8.3x+m;y(!2R[k]){a=8.3Z(a,c||"",v||"");2R[k]=a;2R.1b(a)}z 2R[k].1c};1p.38=7(s){s=s.13(8.6p,"|");6 m;1D(m=s.19(8.19)){6 r=8.13(m[0],m[1],m[2],m[3],m[4]);s=s.13(8.19,r)}z s};1p.3Z=7(p,t,v){6 a={};a.1c=8.3x+2R.K;a.66=p;t=8.3a[t];t=t?t(8.2H(p),2w(v)):1z;a.Z=11 3b("e","z "+t);z a};1p.2H=7(n){34(n.5Z()){1m"1c":z"e.1c";1m"3U":z"e.1x";1m"O":z"e.6o";1m"2u":y(4P){z"23((e.3z.19(/2u=\\\\46?([^\\\\s\\\\46]*)\\\\46?/)||[])[1]||\'\')"}}z"e.2H(\'"+n.13(N,":")+"\')"};1p.3a[""]=7(a){z a};1p.3a["="]=7(a,v){z a+"=="+2c.15(v)};1p.3a["~="]=7(a,v){z"/(^| )"+4O(v)+"( |$)/.Z("+a+")"};1p.3a["|="]=7(a,v){z"/^"+4O(v)+"(-|$)/.Z("+a+")"};6 6n=45;45=7(s){z 6n(1p.38(s))}});6 1p=14.1i("1p");6 H=/a(#[\\w-]+)?(\\.[\\w-]+)?:(65|62)/i;6 6l=/\\s*\\{\\s*/,6m=/\\s*\\}\\s*/,C=/\\s*\\,\\s*/;6 F=/(.*)(:4N-(88|87))/;3y.1C.1e({38:7(){8.1T();6 o=V.2t.K;6 2Q=8.18.2O(6m),r;6 2f,c,i,j;O(i=0;i<2Q.K;i++){r=2Q[i].2O(6l);2f=r[0].2O(C);c=r[1];O(j=0;j<2f.K;j++){2f[j]=c?8.6k(2f[j],c):""}2Q[i]=2f.2p("\\n")}8.18=2Q.2p("\\n");8.2t=V.2t.1q(o)},1u:7(){6 r,i;O(i=0;(r=8.2t[i]);i++)r.1u()},6k:7(s,c){y(V.6j.Z(s)){6 m;y(m=s.19(1L.39)){z 11 1L(m[1],m[2],c)}1d y(m=s.19(2d.39)){y(!2l||!H.Z(m)||2d.44.Z(m)){z 11 2d(s,m[1],m[2],m[3],c)}}1d z 11 1G(s,c)}z s+" {"+c+"}"}});V.1e({2t:[],1B:14.1i("1B"),36:{},2e:14.1i("2e"),1G:1G,2d:2d,1L:1L,2J:2J,2q:7(){6 p=8.1B+"|6i|6h|"+8.36;p=p.13(/(21|37)\\|/g,"");8.6j=11 1N("[>+~\\[]|([:.])[\\\\w-()]+\\\\1|:("+p+")");6 c="[^\\\\s(]+\\\\s*[+~]|@\\\\d+|:(";1G.44=11 1N(c+p+")","g");2d.44=11 1N(c+8.1B+")","g");2d.39=11 1N("(.*):("+8.36+")(.*)");1L.39=/(.*):(6i|6h).*/;8.1T()},1u:7(){8.2P.1u();8.1T()},2w:7(s,p){z 2v?(3T(s.2u,p)||s.18):8.1T(s)},1j:7(e,t,h){1j(e,t,h)}});7 1G(s,c){8.1c=V.2t.K;8.1x=1G.3x+8.1c;s=(s).19(F)||s||"*";8.40=s[1]||s;8.4M=1G.6g(8.40)+"."+8.1x+(s[2]||"");8.18=c;8.39=11 1N("\\\\s"+8.1x+"(\\\\s|$)","g");V.2t.1b(8);8.1S()};1t.1e({1h:1G,1g:7(){z 8.4M+" {"+8.18+"}"},1S:2s,15:7(e){e.1x+=" "+8.1x},3v:7(e){e.1x=e.1x.13(8.39,"$1")},1u:7(){6 m=V.2e[" *."+8.1x]=14(8.40);O(i=0;i<m.K;i++)8.15(m[i])}});1G.3x="5Y";1G.6f=/>/g;1G.6g=7(s){s=1p.38(s);z s.13(8.44,"").13(8.6f," ")};7 2d(s,a,d,t,c){8.6e=a||"*";8.6d=V.36[d];8.4L=t;8.1T(s,c)};1G.1e({1h:2d,1u:7(){6 m=14(8.6e);O(6 i=0;i<m.K;i++){6 t=(8.4L)?14(8.4L,m[i]):[m[i]];y(t.K)8.6d.2q(m[i],t,8)}}});6 A=/^4I/;6 U=/^43\\s*\\(\\s*([^)]*)\\)$/;6 M={86:"85",84:"83",82:"81",80:"7Z"};6 6b=1Z("17-22.4C",2k)+"?";2r+=".2K{4K:1M}";7 1L(s,p,c){8.1y=p;6 2N=c.19(1L.6a),m,e;y(2N){2N=2N[1];m=2N.2O(/\\s+/);O(6 i=0;(e=m[i]);i++){m[i]=A.Z(e)?{4I:e.1q(5,-1)}:(e.7Y(0)=="\'")?42(e):41(e)}2N=m}8.22=2N;8.1T(s,41(c))};1G.1e({1h:1L,1g:7(){z"."+8.1x+"{4K:7X}"},1S:7(){8.19=14(8.40);O(6 i=0;i<8.19.K;i++){6 r=8.19[i].J;y(!r[8.1y])r[8.1y]={18:""};r[8.1y].18+=";"+8.18;y(8.22!=1U)r[8.1y].22=8.22}},1u:7(){y(8.22==1U)z;O(6 i=0;i<8.19.K;i++){8.3Z(8.19[i])}},3Z:7(t){6 g=t.J[8.1y];y(g){6 c=[].4J(g.22||"");O(6 j=0;j<c.K;j++){y(3Y c[j]=="2M"){c[j]=t.2H(c[j].4I)}}c=c.2p("");6 u=c.19(U);6 h=1L[u?"69":"4E"].13(/%1/,8.1x);6 4G=g.18.13(/\'/g,\'"\');6 4F=M[8.1y+7W(t.6c)];y(u){6 p=16.3X(h);t.7V(4F,p);p.3W=6b;4H(p,4G,2c.3v(u[1]))}1d{h=h.13(/%2/,4G).13(/%3/,c);t.7U(4F,h)}t.J[8.1y]=1U}}});1L.6a=/22\\s*:\\s*([^;]*)(;|$)/;1L.69="<2M 3U=\'2K %1\' 2K 12=3w% 2b=0 2L=68/x-67>";1L.4E="<17:! 3U=\'2K %1\' 2K 1r=\'%2\'>%3</17:!>";7 2J(n,a){8.66=n;8.2q=a;8.2I={};V.36[n]=8};1t.1e({1h:2J,20:7(i){6 c=i[2];i.1c=c.1c+i[0].2a;y(!8.2I[i.1c]){6 t=i[1],j;O(j=0;j<t.K;j++)c.15(t[j]);8.2I[i.1c]=i}},35:7(i){y(8.2I[i.1c]){6 c=i[2];6 t=i[1],j;O(j=0;j<t.K;j++)c.3v(t[j]);3u 8.2I[i.1c]}}});V.1B.1g=7(){6 t=[],p;O(p 28 8){y(8[p].K>1)p+="\\\\([^)]*\\\\)";t.1b(p)}z t.2p("|")};V.1B["21"]=7(e){z e.D["17-21"]=="21"};V.1B["37"]=7(e){z e.D["17-21"]=="37"};6 64=(29<5.5)?"7T":"7S";6 63=(29<5.5)?"7R":"7Q";V.36.1g=V.1B.1g;6 3s=11 2J("65",7(e){6 i=1a;V.1j(e,64,7(){3s.20(i)});V.1j(e,63,7(){3s.35(i)})});6 3t=11 2J("7P",7(e){6 i=1a;V.1j(e,"7O",7(){3t.35(i);3t.20(i)});V.1j(e,"7N",7(){3t.35(i)});y(e==16.7M){3t.20(i)}});6 3V=11 2J("62",7(e){6 i=1a;V.1j(e,"7L",7(){3V.20(i)})});1j(16,"7K",7(){6 i=3V.2I,j;O(j 28 i)3V.35(i[j]);i=3s.2I;O(j 28 i)y(!i[j][0].61(60.7J))3s.35(i[j])});2o(1p);1p.1e({2H:7(n){34(n.5Z()){1m"3U":z"e.1x.13(/\\\\b\\\\s*5Y\\\\d+/g,\'\')";1m"1l":z"(e.4D||e.1l)"}z 8.1T(n)}});2n.15(/::/,":");3r.15(/\\\\([\\7I-7H-F]{1,4})/,7(m,o){m=m[o+1];z"\\\\u"+"7G".1q(m.K)+m})});2G=1o;y(2m)1k(3T("17-7F.5X",2k));V.1S();y(2l&&1s)1s.1S();y(33)1F.1S();1d{2F.7E(1Z("17-3q.4C",2k));1j(16,"7D",7(){y(16.5W=="33")32(1F.1S,0)})}}2j(e){31("4B [0]: "+e.5V)}5U{}};',62,634,'||||||var|function|this||||||||||||||||||||||||||if|return||||currentStyle||||||runtimeStyle|length||||for|||||||ie7CSS||||test||new|width|replace|cssQuery|add|document|ie7|cssText|match|arguments|push|id|else|specialize|left|toString|constructor|valueOf|addEventHandler|eval|src|case|addRecalc|true|AttributeSelector|slice|style|ie7HTML|Common|recalc|_0|that|className|position|false|minWidth|pseudoClasses|prototype|while|fr|IE7|Rule|getPixelWidth|clientWidth|viewport|ie7Layout|PseudoElement|none|RegExp|elements|auto|recalcs|styleSheets|init|inherit|null|selectors|right|body|all|makePath|register|link|content|String|addModule|parseInt|window|maxWidth|in|appVersion|uniqueID|height|Quote|DynamicRule|cache|se|fixWidth|_1|klass|catch|path|isHTML|quirksMode|encoder|ICommon|join|apply|HEADER|DUMMY|rules|href|httpRequest|getText|fixRight|top|fixed|_2|getFixedWidth|try|thisElement|ancestor|documentElement|loaded|getAttribute|instances|DynamicPseudoClass|ie7_anon|type|object|co|split|screen|ru|attributeSelectors|offsetWidth|setOverrideStyle|ParseMaster|exec|tagName|box|print|media|_3|alert|setTimeout|complete|switch|unregister|dynamicPseudoClasses|visited|parse|MATCH|tests|Function|getPixelValue|PERCENT|ex|_4|max|_5|addFix|hasLayout|marginTop|firstElementChild|disabled|value|size|font|load|safeString|_6|_7|delete|remove|100|PREFIX|StyleSheet|outerHTML|offsetLeft|offsetParent|absolute|isFixed|backgroundPositionX|getPath|border|boxSizing|min|fixedWidth|getPaddingWidth|fixes|Parser|self|styleSheet|st|modules|_8|x01|loadFile|class|_9|data|createElement|typeof|create|selector|decode|getString|url|COMPLEX|parseSelector|x22|nextElementSibling|_10|_11|_12|_13|parseFloat|autoLeft|pixelLeft|setExpression|Math|_14|BLANK_GIF|_15|_16|applyWidth|resizeWidth|getBorderWidth|getDefinedStyle|collapseMarginTop|_17|_18|_19|refresh|el|ca|getElementsByTagName|version|escapeChar|ancestorOf|_20|Error|htc|pngSrc|ANON|po|cs|addTimer|attr|concat|display|target|selectorText|first|regEscape|isMSIE|lang|parentNode|previousElementSibling|compareTagName|addResize|_21|getScreenLeft|marginLeft|positionLeft|_22|shiftLeft|screenLeft|_23|clipWidth|getBoundingClientRect|getOffsetLeft|bottom|setOffsetLeft|backgroundLeft|parentElement|backgroundImage|backgroundAttachment|Top|img|background|_24|clearCache|location|image|_25|_26|input|filter|Microsoft|sizing|resizeRight|_27|layoutWidth|_28|lastElementChild|clicked|submit|_29|Fix|_30|decoder|_31|parser|_32|gi|_33|styles|createStyleSheet|isXML|caching|_34|compareNamespace|getDocument|continue|links|error|callee|ignoreCase|_35|_36|ie7_debug|finally|description|readyState|js|ie7_class|toLowerCase|event|contains|active|_37|_38|hover|name|scriptlet|text|OBJECT|CONTENT|_39|canHaveChildren|dynamicPseudoClass|attach|CHILD|simple|after|before|UNKNOWN|createRule|B1|B2|_40|htmlFor|NS_IE|childElements|_41|scrollLeft|appendChild|Height|Width|Left|createTempElement|_42|onbeforeprint|replaceChild|_43|_44|B64|base64|indexOf|zoom|scale|opacity|DXImageTransform|progid|enabled|filters|Bottom|borderBox|spacing|margin|padding|applyHeight|0cm|verticalAlign|en|nextSibling|_45|title|_46|BUTTON|button|reset|onclick|clearInterval|PIXEL|removeEventHandler|pop|_47|_48|lastIndexOf|_49|_50|_51|_52|imports|trash|ie7_recalc|getInlineStyles|innerHTML|nodeType|ST|select|Array|_53|mimeType|Boolean|lastChild|firstChild|ES|_54|_55|_56|_57|_58|DE|status|scripts|search|onreadystatechange|addBehavior|quirks|0000|fA|da|srcElement|onmouseup|onmousedown|activeElement|onblur|onfocus|focus|onmouseleave|onmouseout|onmouseenter|onmouseover|insertAdjacentHTML|insertAdjacentElement|Number|inline|charAt|beforeEnd|after1|afterEnd|after0|afterBegin|before1|beforeBegin|before0|letter|line|child|level2|css|css2|static|clipHeight|marginRight|positionTop|default|center|clientLeft|removeChild|setOffsetTop|backgroundTop|repeat|no|backgroundRepeat|attachment|onafterprint|onload|Image|php|propertyName|onpropertychange|INPUT|crop|Alpha|png|trans|IE7_PNG_SUFFIX|sizingMethod|AlphaImageLoader|graphics|fixHeight|Right|cellSpacing|collapse|borderCollapse|IE7_BOX_MODEL|getMarginWidth|Margin|Padding|paddingRight|paddingLeft|last|0px|styleFloat|collapseMarginBottom|layout|removeNode|HTML|alt|onsubmit|form|click|textarea|label|abbr|pow|67em|h6|83em|h5|1em|h4|17em|h3|5em|h2|2em|h1|html4|setInterval|9999|rect|clip|block|px|onunload|detachEvent|attachEvent|onresize|x27|import|namespace|ma|bprint|bscreen|ball|write|item|innerText|getTextContent|scopeName|toUpperCase|ownerDocument|Document|XML|URL|xml|unknown|previousSibling|number|successfully|ie5|instanceOf|Object|common|caller|gif|blank|file|loading|responseText|200|send|GET|open|XMLHTTP|ActiveXObject|Msxml2|ScriptEngineMajorVersion|ms_|ie7_off|CSS1Compat|compatMode|MSIE|navigator|alpha'.split('|'),0,{}))
diff --git a/web/inc/IE7/ie7-xml-extras.js b/web/inc/IE7/ie7-xml-extras.js deleted file mode 100644 index 97846f6..0000000 --- a/web/inc/IE7/ie7-xml-extras.js +++ /dev/null @@ -1,6 +0,0 @@ -/*
- IE7, version 0.9 (alpha) (2005-08-19)
- Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
- License: http://creativecommons.org/licenses/LGPL/2.1/
-*/
-function XMLHttpRequest(){var l=(ScriptEngineMajorVersion()>=5)?"Msxml2":"Microsoft";return new ActiveXObject(l+".XMLHTTP")};function DOMParser(){};DOMParser.prototype={toString:function(){return"[object DOMParser]"},parseFromString:function(s,c){var x=new ActiveXObject("Microsoft.XMLDOM");x.loadXML(s);return x},parseFromStream:new Function,baseURI:""};function XMLSerializer(){};XMLSerializer.prototype={toString:function(){return"[object XMLSerializer]"},serializeToString:function(r){return r.xml||r.outerHTML},serializeToStream:new Function};
diff --git a/web/inc/IE7/ie7.gif b/web/inc/IE7/ie7.gif Binary files differdeleted file mode 100644 index 64a2c2d..0000000 --- a/web/inc/IE7/ie7.gif +++ /dev/null diff --git a/web/inc/IE7/test-trans.png b/web/inc/IE7/test-trans.png Binary files differdeleted file mode 100644 index e187e2c..0000000 --- a/web/inc/IE7/test-trans.png +++ /dev/null diff --git a/web/inc/IE7/test.html b/web/inc/IE7/test.html deleted file mode 100644 index ab78f46..0000000 --- a/web/inc/IE7/test.html +++ /dev/null @@ -1,100 +0,0 @@ -<html xmlns:html="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head>
-<title>IE7 Test Page</title>
-<meta name="author" content="Dean Edwards"/>
-<!-- compliance patch for microsoft browsers -->
-<!--[if lt IE 7]>
-<script src="ie7-standard-p.js" type="text/javascript"></script>
-<script src="ie7-css3-selectors.js" type="text/javascript"></script>
-<script src="ie7-css-strict.js" type="text/javascript"></script>
-<![endif]-->
-<style type="text/css">
- body {background-color: #ccc;}
- img {border: none;}
- h1 {font-family: monospace;}
- h2 {background-color: black; color: white; font-style: normal;}
- h3 {margin: 0.1em 0;}
-</style>
-</head>
- -<body>
-<div class="document">
-<div class="header">
-<h1>IE7 { css2: auto; }</h1>
-<hr />
-</div>
-
-<div class="content">
-
-<h2>Black & White Test</h2>
-
-<h3>Legend</h3>
-<style type="text/css">
- div.legend {height: 20px; font-weight: bold; text-indent: 4px;}
- #fail {background-color: black; color: white;}
- #pass {background-color: white; color: black;}
-</style>
-<div class="legend" id="pass">PASS</div>
-<div class="legend" id="fail">FAIL</div>
-
-<hr />
-
-<h3>ie7-html4.js</h3>
-<style type="text/css">
- #ie7-html4 {background-color: black; height: 20px;}
- #ie7-html4 abbr {display: block; background-color: white; height: 20px;}
-</style>
-<div id="ie7-html4"><abbr> </abbr></div>
-
-<h3>ie7-layout.js</h3>
-<style type="text/css">
- #ie7-layout {background-color: black; height: 20px; overflow: hidden;}
- #ie7-layout div.box {position: relative; top: -40px; background-color: white;
- height: 40px; border-top: 20px black solid;}
-</style>
-<div id="ie7-layout"><div class="box"></div></div>
-
-<h3>ie7-graphics.js</h3>
-<style type="text/css">
- #ie7-graphics {background-color: white; height: 20px;}
- #ie7-graphics div.box {height: 20px; background: url(test-trans.png);}
-</style>
-<div id="ie7-graphics"><div class="box"></div></div>
-
-<h3>ie7-fixed.js</h3>
-<style type="text/css">
- #ie7-fixed {background-color: white; height: 20px;}
- #ie7-fixed div.box {position: fixed; top: -20px; background-color: black; height: 20px;}
-</style>
-<div id="ie7-fixed"><div class="box"></div></div>
-
-<h3>ie7-css2-selectors.js</h3>
-<style type="text/css">
- #ie7-css2-selectors {background-color: black; height: 20px;}
- #ie7-css2-selectors > span {display: block; background-color: white; height: 20px;}
-</style>
-<div id="ie7-css2-selectors"><span> </span></div>
-
-<h3>ie7-css3-selectors.js</h3>
-<style type="text/css">
- #ie7-css3-selectors {background-color: black; height: 20px;}
- #ie7-css3-selectors:empty {background-color: white;}
-</style>
-<div id="ie7-css3-selectors"></div>
-
-<h3>ie7-css-strict.js</h3>
-<style type="text/css">
- #ie7-css-strict {background-color: black; height: 20px;}
- #ie7-css-strict > span.strict {display: block; background-color: white; height: 20px;}
- #ie7-css-strict > span {display: block; background-color: black}
-</style>
-<div id="ie7-css-strict"><span class="strict"></span></div>
-</div>
-
-<div class="footer">
-<hr />
-<a href="http://dean.edwards.name/IE7/"><img src="ie7.gif" width="80" height="15" alt="IE7 Enhanced"/></a>
-</div>
-</div>
-</body> -</html> diff --git a/web/inc/button.png b/web/inc/button.png Binary files differdeleted file mode 100644 index 94bf839..0000000 --- a/web/inc/button.png +++ /dev/null diff --git a/web/inc/button.xar b/web/inc/button.xar Binary files differdeleted file mode 100644 index a55a5be..0000000 --- a/web/inc/button.xar +++ /dev/null diff --git a/web/inc/customtags.inc b/web/inc/customtags.inc deleted file mode 100644 index 5f3172c..0000000 --- a/web/inc/customtags.inc +++ /dev/null @@ -1,118 +0,0 @@ -<define-tag where>\ -<perl> -my $path=$WML_SRC_DIRNAME."/".$WML_SRC_BASENAME; -$path =~ s|.+?web/||s; -print "$path.en.html"; -</perl>\ -</define-tag> - -# -# an rrdworld entry -# -#<rrdworld type="extension|application" -# icon="rumble.png" > <!-- Size 100x66 --> -# -# <name> RRRRumble </name> -# <author> Peter Example </author> -#<description> Makes rrdtool rumble when new data is added </description> -# <homepage> http://somesite.blabla.plac </homepage> -# <year> 2005 </year><month> 4 </month> -# <license> GPL </license> -# -# <!-- Optional --> -# -# <livesite> http://somesite.blabla.plac </livesite> -# <email> max@example.com </email> -# -#</rrdworld> - -#<gallery image="graph.png" > -# -# <title> Virus Graph </title> -# <author> Max Beispiel </author> -#<description> The five most common critters of the week. </description> -# <year> 2005 </year><month> 4 </month> -# -# <!-- Optional --> -# -# <livesite> http://somesite.blabla.plac </livesite> -# <email> max@example.com </email> -# -#</gallery> - - - -<define-tag name endtag=required ><set-var-x name=rwv_name><h3>%body</h3></set-var-x></define-tag> -<define-tag title endtag=required ><set-var-x name=rwv_title><h2>%body</h2></set-var-x></define-tag> -<define-tag author endtag=required ><set-var-x name=rwv_author>%body</set-var-x></define-tag> -<define-tag description endtag=required ><set-var-x name=rwv_description>%body</set-var-x></define-tag> -<define-tag homepage endtag=required ><set-var-x name=rwv_homepage> ... <a href="<subst-in-string %body " " "" />">[home]</a></set-var-x></define-tag> -<define-tag year endtag=required ><set-var-x name=rwv_year> %body </set-var-x></define-tag> -<define-tag month endtag=required ><set-var-x name=rwv_month> /%body </set-var-x></define-tag> -<define-tag license endtag=required ><set-var-x name=rwv_license>License: %body</set-var-x></define-tag> -<define-tag livesite endtag=required ><set-var-x name=rwv_livesite> <a href="<subst-in-string "%body" " " "" />">[demo]</a></set-var-x></define-tag> -<define-tag email endtag=required ><set-var-x name=rwv_email><<subst-in-string <subst-in-string "%body" " " "" /> @ "@<span class="legacy">XYZ-</span>" />></set-var-x></define-tag> - -<define-tag rrdworld endtag=required> -<preserve icon type rwv_name rwv_author rwv_description rwv_homepage rwv_year rwv_month rwv_license rwv_livesite rwv_email/> -<set-var %attributes /> -%body -<subst-in-var rwv_year " " ""/> -<subst-in-var rwv_month " " ""/> -<div class="rrdworld"> -<if <get-var icon/> <img align="right" src="<subst-in-string <get-var icon/> " " "" />"/> /> -<get-var rwv_name/> -<div class="who"><get-var rwv_author/> <get-var rwv_email/> | Date: <get-var rwv_year/><get-var rwv_month/> | <get-var rwv_license/></div> -<div class="desc"> -<get-var rwv_description/> -<get-var rwv_homepage/><get-var rwv_livesite/> -</div> -</div> -<restore icon type rwv_name rwv_author rwv_description rwv_homepage rwv_year rwv_month rwv_license rwv_livesite rwv_email/> -</define-tag> - -<define-tag gallery endtag=required> -<preserve image rwv_title rwv_author rwv_description rwv_year rwv_month rwv_livesite rwv_email/> -<set-var %attributes /> -%body -<subst-in-var rwv_year " " ""/> -<subst-in-var rwv_month " " ""/> -<div class="gallery"> -<get-var rwv_title/> -<div class="image"><img src="<subst-in-string <get-var image/> " " "" />"/></div> -<div class="caption"><get-var rwv_description/> -- <get-var rwv_author/> <get-var rwv_email/>, <get-var rwv_year/><get-var rwv_month/> <get-var rwv_livesite/></div> -</div> -<restore image rwv_title rwv_author rwv_description rwv_year rwv_month rwv_livesite rwv_email/> -</define-tag> - - -<define-tag lastchange> -<perl> -use POSIX qw(strftime); -use POSIX qw(locale_h); - setlocale(LC_TIME,"de"); - my $x_de = strftime "%e. %B %Y", localtime("$(WML_SRC_TIME)"); - setlocale(LC_TIME,"en_US"); - my $x_en = strftime "%B %e, %Y", localtime("$(WML_SRC_TIME)"); - $x_de=~ s/\s/ /g; - $x_en=~ s/\s/ /g; -</perl> -<en> -<perl> - print $x_en; -</perl> -</en> -<de> -<perl> - print $x_de; -</perl> -</de> -</define-tag> - -<define-tag picture endtag=required> -<div class="pic"><img src="%body" align=left/></div> -</define-tag> - - - -# vi: ft=wml diff --git a/web/inc/event.js b/web/inc/event.js deleted file mode 100644 index cc99e46..0000000 --- a/web/inc/event.js +++ /dev/null @@ -1,149 +0,0 @@ -// event.js: cross-browser Listener-style event handling -// version 0.9, 18-Apr-2001 -// written by Andrew Clover <and@doxdesk.com>, use freely - -event_list= new Array(); - -event_level= 0; -if (document.implementation) - if (document.implementation.hasFeature('Events', '2.0')) - event_level= 2; - -function event_addListener(esource, etype, elistener) { - var i; - var alreadyTriggering= false; - for (i= 0; i<event_list.length; i++) { - if (event_list[i][0]==esource && event_list[i][1]==etype) { - if (event_list[i][2]==elistener) return; - alreadyTriggering= true; - } } - event_list[event_list.length]= new Array(esource, etype, elistener); - if (!alreadyTriggering) { - if (event_level==2) { - if (esource==window && !(esource.addEventListener)) - esource= document; // Opera 7.2 - esource.addEventListener(etype, event_trigger_DOM2, false); - } else { - eval(event_trigger_DOM0(etype)); - esource['on'+etype]= event_trigger; - if (esource.captureEvents) - esource.captureEvents('Event.'+etype.toUpperCase()); - } } -} - -function event_removeListener(esource, etype, elistener) { - var i; var e; - var j= 0; - var removedListener= false; - var keepTrigger= false; - for (i= 0; i<event_list.length; i++) { - if (event_list[i][0]==esource && event_list[i][1]==etype) { - if (event_list[i][2]==elistener) { - removedListener= true; - continue; - } - else keepTrigger= true; - } - if (i!=j) event_list[j]= event_list[i]; - j++; - } - event_list.length= j; - if (removedListener && !keepTrigger) { - if (event_level==2) - esource.removeEventListener(etype, elistener, true); - else - esource['on'+etype]= window.clientInformation ? null : window.undefined; - } -} - -function event_trigger_DOM2(e) { - if (event_dispatch(e.target, e.type)==false) - e.preventDefault(); -} - -function event_trigger_DOM0(t) { - return 'function event_trigger() {return event_dispatch(this, \''+t+'\');}'; -} - -function event_dispatch(esource, etype) { - var i; var r; - var elisteners= new Array(); - var result= window.undefined; - for (i= 0; i<event_list.length; i++) - if (event_list[i][0]==esource && event_list[i][1]==etype) - elisteners[elisteners.length]= event_list[i][2]; - for (i= 0; i<elisteners.length; i++) { - r= elisteners[i](esource, etype); - if (r+''!='undefined') result= r; - } - return result; -} - -// convenience prevent-default-action listener -function event_prevent(esource, etype) { return false; } - -// page finished loading detector for binding -var event_loaded= false; -function event_load(esource, etype) { - event_loaded= true; - event_removeListener(window, 'load', event_load); -} -event_addListener(window, 'load', event_load); - -// binding helper -var event_BINDDELAY= 750; -var event_binds= new Array(); - -function event_addBinding(btag, blistener) { - event_binds[event_binds.length]= new Array(btag, 0, blistener); - if (event_intervalling) - event_bind(); - else { - event_intervalling= true; - window.setTimeout(event_interval, 0); - } -} - -var event_intervalling= false; -function event_interval() { - event_bind(); - if (!event_loaded) - window.setTimeout(event_interval, event_BINDDELAY); -} - -function event_bind() { - var i, j, els, blistener; - for (i= event_binds.length; i-->0;) { - els= event_getElementsByTag(event_binds[i][0]); - blistener= event_binds[i][2]; - for (j= event_binds[i][1]; j<els.length; j++) - blistener(els[j]); - event_binds[i][1]= event_getElementsByTag(event_binds[i][0]).length; - } -} - -// get elements by tag name with backup for pre-DOM browsers -var event_NIL= new Array(); -function event_getElementsByTag(tag) { - if (document.getElementsByTagName) { - var arr= document.getElementsByTagName(tag); - // IE5.0/Win doesn't support '*' for all tags - if (tag!='*' || arr.length>0) return arr; - } - if (document.all) { - if (tag=='*') return event_array(document.all); - else return event_array(document.all.tags(tag)); - } - tag= tag.toLowerCase(); - if (tag=='a') return event_array(document.links); - if (tag=='img') return event_array(document.images); - if (tag=='form') return event_array(document.forms); - if (document.layers && tag=='div') return event_array(document.layers); - return event_NIL; -} -function event_array(coll) { - var arr= new Array(coll.length); - for (var i= arr.length; i-->0;) - arr[i]= coll[i]; - return arr; -}
\ No newline at end of file diff --git a/web/inc/favicon.ico b/web/inc/favicon.ico Binary files differdeleted file mode 100644 index e3b575a..0000000 --- a/web/inc/favicon.ico +++ /dev/null diff --git a/web/inc/fixed.js b/web/inc/fixed.js deleted file mode 100644 index 5382876..0000000 --- a/web/inc/fixed.js +++ /dev/null @@ -1,354 +0,0 @@ -// fixed.js: fix fixed positioning and fixed backgrounds in IE/Win -// version 1.8, 08-Aug-2003 -// written by Andrew Clover <and@doxdesk.com>, use freely - -/*@cc_on -@if (@_win32 && @_jscript_version>4) - -var fixed_positions= new Array(); -var fixed_backgrounds= new Array(); -var fixed_viewport; - -// Initialisation. Called when the <body> tag arrives. Set up viewport so the -// rest of the script knows we're going, and add a measurer div, used to detect -// font size changes and measure image sizes for backgrounds later - -function fixed_init() { - fixed_viewport= (document.compatMode=='CSS1Compat') ? - document.documentElement : document.body; - var el= document.createElement('div'); - el.setAttribute('id', 'fixed-measure'); - el.style.position= 'absolute'; - el.style.top= '0'; el.style.left= '0'; - el.style.overflow= 'hidden'; el.style.visibility= 'hidden'; - el.style.fontSize= 'xx-large'; el.style.height= '5em'; - el.style.setExpression('width', 'fixed_measureFont()'); - document.body.insertBefore(el, document.body.firstChild); -} - -// Binding. Called every time an element is added to the document, check it -// for fixed features, if found add to our lists and set initial props - -function fixed_bind(el) { - var needLayout= false; - var tag= el.tagName.toLowerCase(); - var st= el.style; - var cst= el.currentStyle; - var anc; - - // find fixed-position elements - if (cst.position=='fixed') { - needLayout= true; - fixed_positions[fixed_positions.length]= el; - // store original positioning as we'll overwrite it - st.position= 'absolute'; - st.fixedPLeft= cst.left; - st.fixedPTop= cst.top; - st.fixedPRight= cst.right; - st.fixedPBottom= cst.bottom; - st.fixedPWidth= fixed_parseLength(cst.width); - st.fixedPHeight= fixed_parseLength(cst.height); - // find element that will act as containing box, for convenience later - st.fixedCB= null; - for (anc= el; (anc= anc.parentElement).parentElement;) { - if (anc.currentStyle.position!='static') { - st.fixedCB= anc; - break; - } } - // detect nested fixed positioning (only ancestor need move) - st.fixedNest= false; - for (anc= el; anc= anc.parentElement;) { - if (anc.style.fixedNest!=null) - st.fixedNest= true; - break; - } - } - - // find fixed-background elements (not body/html which IE already gets right) - if (cst.backgroundAttachment=='fixed' && tag!='body' && tag!='html') { - needLayout= true; - fixed_backgrounds[fixed_backgrounds.length]= el; - // get background offset, converting from keyword if necessary - st.fixedBLeft= fixed_parseLength(cst.backgroundPositionX); - st.fixedBTop= fixed_parseLength(cst.backgroundPositionY); - // if it's a non-zero %age, need to know size of image for layout - if (st.fixedBLeft[1]=='%' || st.fixedBTop[1]=='%') { - st.fixedBWidth= 0; st.fixedBHeight= 0; - fixed_measureBack(el); - } - } - if (needLayout) fixed_layout(); -} - -// Layout. On every window or font size change, recalculate positioning - -// Request re-layout at next free moment -var fixed_delaying= false; -function fixed_delayout() { - if (fixed_delaying) return; - fixed_delaying= true; - window.setTimeout(fixed_layout, 0); -} - -var fixed_ARBITRARY= 200; - -function fixed_layout() { - fixed_delaying= false; - if (!fixed_viewport) return; - var i, el, st, j, pr, tmp, A= 'auto'; - var cb, cbLeft, cbTop, cbRight, cbBottom, oLeft, oTop, oRight, oBottom; - var vpWidth=fixed_viewport.clientWidth, vpHeight=fixed_viewport.clientHeight; - - // calculate initial position for fixed-position elements [black magic] - for (i= fixed_positions.length; i-->0;) { - el= fixed_positions[i]; st= el.style; - // find positioning of containing block - cb= st.fixedCB; if (!cb) cb= fixed_viewport; - cbLeft= fixed_pageLeft(cb); cbTop= fixed_pageTop(cb); - if (cb!=fixed_viewport) { cbLeft+= cb.clientLeft; cbTop+= cb.clientTop; } - cbRight= fixed_viewport.clientWidth-cbLeft-cb.clientWidth; - cbBottom= fixed_viewport.clientHeight-cbTop-cb.clientHeight; - // if size is in %, must recalculate relative to viewport - if (st.fixedPWidth[1]=='%') - st.width= Math.round(vpWidth*st.fixedPWidth[0]/100)+'px'; - if (st.fixedPHeight[1]=='%') - st.height= Math.round(vpHeight*st.fixedPHeight[0]/100)+'px'; - // find out offset values at max size, to account for margins - st.left= A; st.right= '0'; st.top= A; st.bottom= '0'; - oRight= el.offsetLeft+el.offsetWidth; oBottom= el.offsetTop+el.offsetHeight; - st.left= '0'; st.right= A; st.top= '0'; st.bottom= A; - oLeft= el.offsetLeft; oTop= el.offsetTop; - // use this to convert all edges to pixels - st.left= A; st.right= st.fixedPRight; - st.top= A; st.bottom= st.fixedPBottom; - oRight-= el.offsetLeft+el.offsetWidth; - oBottom-= el.offsetTop+el.offsetHeight; - st.left= st.fixedPLeft; st.top= st.fixedPTop; - oLeft= el.offsetLeft-oLeft; oTop= el.offsetTop-oTop; - // edge positioning fix - if (st.fixedPWidth[1]==A && st.fixedPLeft!=A && st.fixedPRight!=A) { - tmp= el.offsetLeft; st.left= A; st.width= fixed_ARBITRARY+'px'; - tmp= fixed_ARBITRARY+el.offsetLeft-tmp+cbLeft+cbRight; - st.left= st.fixedPLeft; st.width= ((tmp<1)?1:tmp)+'px'; - } - if (st.fixedPHeight[1]==A && st.fixedPTop!=A && st.fixedPBottom!=A) { - tmp= el.offsetTop; st.top= A; st.height= fixed_ARBITRARY+'px'; - tmp= fixed_ARBITRARY+el.offsetTop-tmp+cbTop+cbBottom; - st.top= st.fixedPTop; st.height= ((tmp<1)?1:tmp)+'px'; - } - // move all non-auto edges relative to the viewport - st.fixedCLeft= (st.fixedPLeft=='auto') ? oLeft : oLeft-cbLeft; - st.fixedCTop= (st.fixedPTop=='auto') ? oTop : oTop-cbTop; - st.fixedCRight= (st.fixedPRight=='auto') ? oRight : oRight-cbRight; - st.fixedCBottom= (st.fixedPBottom=='auto') ? oBottom : oBottom-cbBottom; - // remove left-positioning of right-positioned elements - if (st.fixedPLeft=='auto' && st.fixedPRight!='auto') st.fixedCLeft= 'auto'; - if (st.fixedPTop=='auto' && st.fixedPBottom!='auto') st.fixedCTop= 'auto'; - } - - - // calculate initial positioning of fixed backgrounds - for (i= fixed_backgrounds.length; i-->0;) { - el= fixed_backgrounds[i]; st= el.style; - tmp= st.fixedBImage; - if (tmp) { - if (tmp.readyState!='uninitialized') { - st.fixedBWidth= tmp.offsetWidth; - st.fixedBHeight= tmp.offsetHeight; - st.fixedBImage= window.undefined; - } - } - st.fixedBX= fixed_length(el, st.fixedBLeft, vpWidth-st.fixedBWidth); - st.fixedBY= fixed_length(el, st.fixedBTop, vpHeight-st.fixedBHeight); - } - - // now call scroll() to set the positions from the values just calculated - fixed_scroll(); -} - -// Scrolling. Offset fixed elements relative to viewport scrollness - -var fixed_lastX, fixed_lastY; -var fixed_PATCHDELAY= 300; -var fixed_patching= false; - -// callback function after a scroll, because incorrect scroll position is -// often reported first go! -function fixed_patch() { - fixed_patching= false; - var scrollX= fixed_viewport.scrollLeft, scrollY= fixed_viewport.scrollTop; - if (scrollX!=fixed_lastX && scrollY!=fixed_lastY) fixed_scroll(); -} - -function fixed_scroll() { - if (!fixed_viewport) return; - var i, el, st, viewportX, viewportY; - var scrollX= fixed_viewport.scrollLeft, scrollY= fixed_viewport.scrollTop; - fixed_lastX= scrollX; fixed_lastY= scrollY; - - // move non-nested fixed-position elements - for (i= fixed_positions.length; i-->0;) { - st= fixed_positions[i].style; - viewportX= (st.fixedNest) ? 0 : scrollX; - viewportY= (st.fixedNest) ? 0 : scrollY; - if (st.fixedCLeft!='auto') st.left= (st.fixedCLeft+viewportX)+'px'; - if (st.fixedCTop!='auto') st.top= (st.fixedCTop+viewportY)+'px'; - viewportX= (st.fixedCB==null || st.fixedCB==fixed_viewport) ? 0 : viewportX; - viewportY= (st.fixedCB==null || st.fixedCB==fixed_viewport) ? 0 : viewportY; - st.right= (st.fixedCRight-viewportX+1)+'px'; st.right= (st.fixedCRight-viewportX)+'px'; - st.bottom= (st.fixedCBottom-viewportY+1)+'px'; st.bottom= (st.fixedCBottom-viewportY)+'px'; - } - - // align fixed backgrounds to viewport - for (i= fixed_backgrounds.length; i-->0;) { - el= fixed_backgrounds[i]; st= el.style; - viewportX= scrollX; - viewportY= scrollY; - while (el.offsetParent) { - viewportX-= el.offsetLeft+el.clientLeft; - viewportY-= el.offsetTop +el.clientTop; - el= el.offsetParent; - } - st.backgroundPositionX= (st.fixedBX+viewportX)+'px'; - st.backgroundPositionY= (st.fixedBY+viewportY)+'px'; - } - - // call back again in a tic - if (!fixed_patching) { - fixed_patching= true; - window.setTimeout(fixed_patch, fixed_PATCHDELAY); - } -} - -// Measurement. Load bg-image into an invisible element on the page, when -// loaded write the width/height to an element's style for layout use; detect -// when font size changes - -function fixed_measureBack(el) { - var measure= document.getElementById('fixed-measure'); - var img= document.createElement('img'); - img.setAttribute('src', fixed_parseURL(el.currentStyle.backgroundImage)); - measure.appendChild(img); - el.style.fixedBImage= img; - if (img.readyState=='uninitialized') - img.attachEvent('onreadystatechange', fixed_measureBackImage_ready); -} - -function fixed_measureBackImage_ready() { - var img= event.srcElement; - if (img && img.readyState!='uninitialized') { - img.detachEvent('onreadystatechange', fixed_measureBackImage_ready); - fixed_layout(); - } -} - -var fixed_fontsize= 0; -function fixed_measureFont() { - var fs= document.getElementById('fixed-measure').offsetHeight; - if (fixed_fontsize!=fs && fixed_fontsize!=0) - fixed_delayout(); - fixed_fontsize= fs; - return '5em'; -} - -// Utility. General-purpose functions - -// parse url() to get value inside - -function fixed_parseURL(v) { - v= v.substring(4, v.length-1); - if (v.charAt(0)=='"' && v.charAt(v.length-1)=='"' || - v.charAt(0)=="'" && v.charAt(v.length-1)=="'") - return v.substring(1, v.length-1); - else return v; -} - -// parse length or auto or background-position keyword into number and unit - -var fixed_numberChars= '+-0123456789.'; -var fixed_ZERO= new Array(0, 'px'); -var fixed_50PC= new Array(50, '%'); -var fixed_100PC= new Array(100, '%'); -var fixed_AUTO= new Array(0, 'auto'); - -function fixed_parseLength(v) { - var num, i; - if (v=='left' || v=='top') return fixed_ZERO; - if (v=='right' || v=='bottom') return fixed_100PC; - if (v=='center') return fixed_50PC; - if (v=='auto') return fixed_AUTO; - i= 0; - while (i<v.length && fixed_numberChars.indexOf(v.charAt(i))!=-1) - i++; - num= parseFloat(v.substring(0, i)); - if (num==0) return fixed_ZERO; - else return new Array(num, v.substring(i)); -} - -// convert parsed (number, unit) into a number of pixels - -function fixed_length(el, l, full) { - var tmp, x; - if (l[1]=='px') return l[0]; - if (l[1]=='%') return Math.round(full*l[0]/100); - // other units - measure by setting position; this is rather inefficient - // but then these units are used for background-position so seldom... - tmp= el.currentStyle.left; - el.style.left= '0'; - x= el.offsetLeft; - el.style.left= l[0]+l[1]; - x= el.offsetLeft-x; - el.style.left= tmp; - return x; -} - -// convert stupid IE offsetLeft/Top to page-relative values - -function fixed_pageLeft(el) { - var v= 0; - while (el.offsetParent) { - v+= el.offsetLeft; - el= el.offsetParent; - } - return v; -} -function fixed_pageTop(el) { - var v= 0; - while (el.offsetParent) { - v+= el.offsetTop; - el= el.offsetParent; - } - return v; -} - -// Scanning. Check document every so often until it has finished loading. Do -// nothing until <body> arrives, then call main init. Pass any new elements -// found on each scan to be bound - -var fixed_SCANDELAY= 500; - -function fixed_scan() { - if (!document.body) return; - if (!fixed_viewport) fixed_init(); - var el; - for (var i= 0; i<document.all.length; i++) { - el= document.all[i]; - if (!el.fixed_bound) { - el.fixed_bound= true; - fixed_bind(el); - } } -} - -var fixed_scanner; -function fixed_stop() { - window.clearInterval(fixed_scanner); - fixed_scan(); -} - -fixed_scan(); -fixed_scanner= window.setInterval(fixed_scan, fixed_SCANDELAY); -window.attachEvent('onload', fixed_stop); -window.attachEvent('onresize', fixed_delayout); -window.attachEvent('onscroll', fixed_scroll); - -@end @*/ diff --git a/web/inc/html.inc b/web/inc/html.inc deleted file mode 100644 index d27aea6..0000000 --- a/web/inc/html.inc +++ /dev/null @@ -1,29 +0,0 @@ -<define-tag h1 whitespace=delete endtag=required> -<preserve subtitle /> -<set-var %attributes /> -{#H1#:<h1*>%body</h1*>:#H1#} -{#H1_FLAT#:<: $x = <<kjhasdflkjhasdf; -%body -kjhasdflkjhasdf -$x =~ s/\\n/ /g; print $x; :>:#H1_FLAT#} -<if <get-var title_is_set /> "" - {#Title#:{#H1_FLAT#}:#Title#} -/> -<restore subtitle /> -</define-tag> - -<define-tag title whitespace=delete endtag=required> -<set-var title_is_set=1/> -{#!Title#:<: $_ = <<kjhasdflkjhasdf; -%body -kjhasdflkjhasdf -s/\\n/ /g; print :>:#Title#} -</define-tag> - -<define-tag h2 whitespace=delete endtag=required> -<h2*>%body</h2*> -</define-tag> - -<define-tag h3 whitespace=delete endtag=required> -<h3*>%body</h3*> -</define-tag> diff --git a/web/inc/langset.inc b/web/inc/langset.inc deleted file mode 100644 index bd566d6..0000000 --- a/web/inc/langset.inc +++ /dev/null @@ -1,34 +0,0 @@ -# -# -# all definitions in the include rely on the existence of $LANG -# -# -############################################################################### -# define base languages of the document -############################################################################### -#use wml::std::lang -<set-var lntmp=<downcase "$(LANGS)" /> /> -<while <match <get-var lntmp /> "[a-z][a-z]" />> - <set-var lan=<match <get-var lntmp /> "[a-z][a-z]" action=extract /> /> - <set-var lntmp=<match <get-var lntmp /> "[a-z][a-z]" action=delete /> /> - <lang:new id=<get-var lan /> short /> -</while> - -############################################################################### -## creates .var file for automatic language selection -############################################################################### -[LANG_VAR: -URI: $(WML_SRC_BASENAME) -<set-var lntmp=<downcase "$(LANGS)" /> /> -<while <match <get-var lntmp /> "[a-z][a-z]" /> > - <set-var lan=<match <get-var lntmp /> "[a-z][a-z]" action=extract /> /> - <set-var lntmp=<match <get-var lntmp /> "[a-z][a-z]" action=delete /> /> -<protect></protect> -URI: $(WML_SRC_BASENAME).<get-var lan />.html -Content-type: text/html -Content-language: <get-var lan /> -</while> -<protect></protect> -URI: $(WML_SRC_BASENAME).en.html -Content-type: text/html -:LANG_VAR] diff --git a/web/inc/minmax.js b/web/inc/minmax.js deleted file mode 100644 index 7ebf1f5..0000000 --- a/web/inc/minmax.js +++ /dev/null @@ -1,144 +0,0 @@ -// minmax.js: make IE5+/Win support CSS min/max-width/height -// version 1.0, 08-Aug-2003 -// written by Andrew Clover <and@doxdesk.com>, use freely - -/*@cc_on -@if (@_win32 && @_jscript_version>4) - -var minmax_elements; - -minmax_props= new Array( - new Array('min-width', 'minWidth'), - new Array('max-width', 'maxWidth'), - new Array('min-height','minHeight'), - new Array('max-height','maxHeight') -); - -// Binding. Called on all new elements. If <body>, initialise; check all -// elements for minmax properties - -function minmax_bind(el) { - var i, em, ms; - var st= el.style, cs= el.currentStyle; - - if (minmax_elements==window.undefined) { - // initialise when body element has turned up, but only on IE - if (!document.body || !document.body.currentStyle) return; - minmax_elements= new Array(); - window.attachEvent('onresize', minmax_delayout); - // make font size listener - em= document.createElement('div'); - em.setAttribute('id', 'minmax_em'); - em.style.position= 'absolute'; em.style.visibility= 'hidden'; - em.style.fontSize= 'xx-large'; em.style.height= '5em'; - em.style.top='-5em'; em.style.left= '0'; - if (em.style.setExpression) { - em.style.setExpression('width', 'minmax_checkFont()'); - document.body.insertBefore(em, document.body.firstChild); - } - } - - // transform hyphenated properties the browser has not caught to camelCase - for (i= minmax_props.length; i-->0;) - if (cs[minmax_props[i][0]]) - st[minmax_props[i][1]]= cs[minmax_props[i][0]]; - // add element with properties to list, store optimal size values - for (i= minmax_props.length; i-->0;) { - ms= cs[minmax_props[i][1]]; - if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') { - st.minmaxWidth= cs.width; st.minmaxHeight= cs.height; - minmax_elements[minmax_elements.length]= el; - // will need a layout later - minmax_delayout(); - break; - } } -} - -// check for font size changes - -var minmax_fontsize= 0; -function minmax_checkFont() { - var fs= document.getElementById('minmax_em').offsetHeight; - if (minmax_fontsize!=fs && minmax_fontsize!=0) - minmax_delayout(); - minmax_fontsize= fs; - return '5em'; -} - -// Layout. Called after window and font size-change. Go through elements we -// picked out earlier and set their size to the minimum, maximum and optimum, -// choosing whichever is appropriate - -// Request re-layout at next available moment -var minmax_delaying= false; -function minmax_delayout() { - if (minmax_delaying) return; - minmax_delaying= true; - window.setTimeout(minmax_layout, 0); -} - -function minmax_stopdelaying() { - minmax_delaying= false; -} - -function minmax_layout() { - window.setTimeout(minmax_stopdelaying, 100); - var i, el, st, cs, optimal, inrange; - for (i= minmax_elements.length; i-->0;) { - el= minmax_elements[i]; st= el.style; cs= el.currentStyle; - - // horizontal size bounding - st.width= st.minmaxWidth; optimal= el.offsetWidth; - inrange= true; - if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') { - st.width= cs.minWidth; - inrange= (el.offsetWidth<optimal); - } - if (inrange && cs.maxWidth && cs.maxWidth!='none' && cs.maxWidth!='auto' && cs.maxWidth!='') { - st.width= cs.maxWidth; - inrange= (el.offsetWidth>optimal); - } - if (inrange) st.width= st.minmaxWidth; - - // vertical size bounding - st.height= st.minmaxHeight; optimal= el.offsetHeight; - inrange= true; - if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') { - st.height= cs.minHeight; - inrange= (el.offsetHeight<optimal); - } - if (inrange && cs.maxHeight && cs.maxHeight!='none' && cs.maxHeight!='auto' && cs.maxHeight!='') { - st.height= cs.maxHeight; - inrange= (el.offsetHeight>optimal); - } - if (inrange) st.height= st.minmaxHeight; - } -} - -// Scanning. Check document every so often until it has finished loading. Do -// nothing until <body> arrives, then call main init. Pass any new elements -// found on each scan to be bound - -var minmax_SCANDELAY= 500; - -function minmax_scan() { - var el; - for (var i= 0; i<document.all.length; i++) { - el= document.all[i]; - if (!el.minmax_bound) { - el.minmax_bound= true; - minmax_bind(el); - } } -} - -var minmax_scanner; -function minmax_stop() { - window.clearInterval(minmax_scanner); - minmax_scan(); -} - -minmax_scan(); -minmax_scanner= window.setInterval(minmax_scan, minmax_SCANDELAY); -window.attachEvent('onload', minmax_stop); - -@end @*/ diff --git a/web/inc/navbar-def.inc b/web/inc/navbar-def.inc deleted file mode 100644 index 17a3ff8..0000000 --- a/web/inc/navbar-def.inc +++ /dev/null @@ -1,76 +0,0 @@ -# -# <ul> -# <li> -# <div><a href="../../index.de.html">Willkommen</a></div> -# </li> -# <li> -# <div><a href="../../events/index.de.html">Veranstaltungen</a></div> -# </li> -# <li> -# <div><a href="../../collegium/history.de.html">Das Collegium</a></div> -# </li> -# <li> -# <div class="selected_head"><a href="../../who/employee/index.de.html">Who is who</a></div> -# <ul> -# <li> -# <div><a href="../../who/employee/index.de.html">Mitarbeiter</a></div> -# </li> -# <li> -# <div class="selected">Fellows</div> -# <ul> -# <li> -# <div><a href="../../who/fellows/dalferth.de.html">Dalferth</a></div> -# </li> -# <li> -# <div><a href="../../who/fellows/fehr.de.html">Fehr</a></div> -# </li> -# </ul> -# </li> -# </ul> -# </li> -# </ul> -<define-tag nav:bar endtag=required> - <set-var __nav:level=%0 /> - <navbar:define name="%1" urlbase="$(ROOT)/%2"> - <navbar:header> - <ul*> - </navbar:header> - <navbar:footer> - </ul*> - </navbar:footer> - <navbar:prolog> - <li*><div*></navbar:prolog> - <navbar:epilog></div*></li*> - </navbar:epilog> - <navbar:prolog type="S"><li*><div* class="selected"></navbar:prolog> - <navbar:epilog type="S"></div></li*> - </navbar:epilog> - <navbar:filter> - <protect pass=2> - my ($mcode, $CFG, $select) = @_; - # have the top selected too - $mcode =~ s|<div>(.+?)</a><ul>|<div class="selected_head">$1</a></div><ul>|g; - $mcode =~ s|<div class="selected">([^<]+?)<ul>|<div class="selected">$1</div><ul>|g; - $mcode =~ s|</a><ul>|</a></div><ul>|g; - $mcode =~ s|</ul>\s*</div>\s*</li>|</ul></li>|g; - return $mcode; - </protect> - </navbar:filter> - %body - </navbar:define> -</define-tag> - -<define-tag nav:but> - <if <match "%2" "http://|html$|\?" /> - <navbar:button id="%0" - url="%2" - txt="%1" - menu="%3" - /> - <navbar:button id="%0" - url="%2.<lang:star: * />.html" - txt="%1 " - menu="%3" - /> - /> -</define-tag> diff --git a/web/inc/position.js b/web/inc/position.js deleted file mode 100644 index 7e95b67..0000000 --- a/web/inc/position.js +++ /dev/null @@ -1,118 +0,0 @@ -// position.js: make edge-positioning work on IE/Win -// version 0.5, 15-Jul-2003 -// written by Andrew Clover <and@doxdesk.com>, use freely - -/*@cc_on -@if (@_win32 && @_jscript_version>4) - -var position_h= new Array(); -var position_v= new Array(); -var position_viewport; -var position_width= 0; -var position_height= 0; -var position_fontsize= 0; -var position_ARBITRARY= 200; - -// Binding. Called on each new element; if the it's <body>, initialise script. -// Check all new elements to see if they need our help, make lists of them - -function position_bind(el) { - if (!position_viewport) { - if (!document.body) return; - // initialisation - position_viewport= (document.compatMode=='CSS1Compat') ? - document.documentElement : document.body; - window.attachEvent('onresize', position_delayout); - var em= document.createElement('div'); - em.setAttribute('id', 'position_em'); - em.style.position= 'absolute'; em.style.visibility= 'hidden'; - em.style.fontSize= 'xx-large'; em.style.height= '5em'; - em.style.top='-5em'; em.style.left= '0'; - em.style.setExpression('width', 'position_checkFont()'); - document.body.appendChild(em); - } - - // check for absolute edge-positioned elements (ignore ones from fixed.js!) - var st= el.style; var cs= el.currentStyle; - if (cs.position=='absolute' && !st.fixedPWidth) { - if (cs.left!='auto' && cs.right!='auto') { - position_h[position_h.length]= el; - st.position_width= position_ARBITRARY; - st.width= st.position_width+'px'; - position_delayout(); - } - if (cs.top!='auto' && cs.bottom!='auto') { - position_v[position_v.length]= el; - st.position_height= position_ARBITRARY; - st.height= st.position_height+'px'; - position_delayout(); - } } -} - -function position_checkFont() { position_delayout(); return '1em'; } - -// Layout. For each edge-positioned axis, measure difference between min-edge -// and max-edge positioning, set size to the difference - -// Request re-layout at next available moment -var position_delaying= false; -function position_delayout() { - if (position_delaying) return; - position_delaying= true; - window.setTimeout(position_layout, 0); -} - -function position_layout() { - position_delaying= false; - var i, el, st, pos, tmp; - var fs= document.all['position_em'].offsetWidth; - var newfs= (position_fontsize!=fs && position_fontsize!=0); - position_fontsize= fs; - - // horizontal axis - if (position_viewport.clientWidth!=position_width || newfs) { - position_width= position_viewport.clientWidth; - for (i= position_h.length; i-->0;) { - el= position_h[i]; st= el.style; cs= el.currentStyle; - pos= el.offsetLeft; tmp= cs.left; st.left= 'auto'; - st.position_width+= el.offsetLeft-pos; st.left= tmp; - if (st.position_width<1) st.position_width= 1; - st.width= st.position_width+'px'; - } } - // vertical axis - if (position_viewport.clientHeight!=position_height || newfs) { - position_height= position_viewport.clientHeight; - for (i= position_v.length; i-->0;) { - el= position_v[i]; st= el.style; cs= el.currentStyle; - pos= el.offsetTop; tmp= cs.top; st.top= 'auto'; - st.position_height+= el.offsetTop-pos; st.top= tmp; - if (st.position_height<1) st.position_height= 1; - st.height= st.position_height+'px'; - } } -} - -// Scanning. Check document every so often until it has finished loading. Do -// nothing until <body> arrives, then call main init. Pass any new elements -// found on each scan to be bound - -var position_SCANDELAY= 500; - -var position_nscanned= 0; -function position_scan() { - var nall= document.all.length; - for (var i= position_nscanned; i<nall; i++) - position_bind(document.all[i]); - position_nscanned= nall; -} - -var position_scanner; -function position_stop() { - window.clearInterval(position_scanner); - position_scan(); -} - -position_scan(); -position_scanner= window.setInterval(position_scan, position_SCANDELAY); -window.attachEvent('onload', position_stop); - -@end @*/ diff --git a/web/inc/silver-logo.png b/web/inc/silver-logo.png Binary files differdeleted file mode 100644 index 8759bac..0000000 --- a/web/inc/silver-logo.png +++ /dev/null diff --git a/web/inc/template.inc b/web/inc/template.inc deleted file mode 100644 index 842a68a..0000000 --- a/web/inc/template.inc +++ /dev/null @@ -1,177 +0,0 @@ -#this seems to confuse just too many things out there ... -#guess following the standard is not there yet -#<?xml version="1.0" encoding="iso-8859-15"?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -# this must be the very first line to make doc-type switching work on IE -#use wml::std::logo -#use wml::std::tags -#use wml::des::space -#use wml::des::imgdot -#use wml::std::grid -#use wml::fmt::url -#include <inc/langset.inc> -#include <inc/html.inc> -#include <inc/customtags.inc> -#use wml::des::navbar -#include <inc/navbar-def.inc> -#include <$(ROOT)/navbar.inc> -<html lang="<lang:star: * />" xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" /> -<link* REL="icon" HREF="$(ROOT)/inc/favicon.ico" TYPE="image/ico" /> -..Title!>>MRTG - Page without a Title<<.. -<title*>MRTG - {#Title#}</title*> -<protect> -<!--[if lt IE 7]><script src="$(ROOT)/inc/IE7/ie7-standard-p.js" type="text/javascript"></script><![endif]--> -</protect> -<style type="text/css"> -<!--/* <![CDATA[ */ -/* ie5 for mac thinks this comment does not end here because of the backslash \*/ -@import url("$(ROOT)/design.css"); -/* ]]> */--> -</style> -{#ExtraHead#} -</head> -<body> -<div id="page_header"> -</div> - -<table id="main_container" cellspacing="0" cellpadding="0" border="0"> -<tr> -<!-- Navbar code start --> -<td valign="top" id="navbar_container"> -<div id="menu"> -<navbar:render name=main menumode=inner nohints txtonly select=$(PAGE)/> -</div> -<br/> -<br/> -<p><b>Gold Sponsors</b></p> -# From: Mark Hinkle <mrhinkle@zenoss.com> -# Date: Mon, 14 May 2007 14:43:09 -0400 -#<p><a href="http://www.zenoss.com/mrtg?utm_source=mrtg&utm_medium=logolink&utm_campaign=inbound"><img border="0" title="Zenoss Open Source IT Monitoring" alt="Zenoss Open Source IT Monitoring" src="$(ROOT)/logos/zenoss.png"/></a></p> -# maarten.vanlaere@serverscheck.com -# Date: Mon, 29 Jun 2009 00:40:35 +0200 -<p><a href="http://www.serverscheck.com/sensors?utm_source=mrtg&utm_medium=banner&utm_term=mrtg&utm_campaign=mrtg"><img border="0" title="Serverscheck" alt="Serverscheck" src="$(ROOT)/logos/mrtg_sensorgateway.png"/></a></p> - <p><a href="http://it.oetiker.ch/monitoring/sponsoring.var"><img border="0" alt="MRTG Gold Sponsor" src="$(ROOT)/inc/mrtg-gold.png"/></a></p> -<p><a href="$(ROOT)/sponsor.<lang:star: */>.html">Silver Sponsors ...</a></p> -<br/> -<br/> -<div> -<a href="http://tobi.oetiker.ch/wish/"><img border="0" alt="Make Tobi Happy" src="$(ROOT)/inc/happy-tobi.png"/></a> -</div> -<br/> -<br/> -<br/> -<div> -<iframe width="206" height="25" name="bandwidth" frameborder="0" src="$(ROOT)/hoster.html"></iframe> -</div> -<br/> -<br/> -<br/> -<div id="googlead_search"> -<!-- SiteSearch Google --> -<form method="get" action="http://www.google.com/custom" target="_top"> -<table border="0" bgcolor="#ffffff"> -<tr><td nowrap="nowrap" valign="top" align="left" height="32"> -<a href="http://www.google.com/"> -<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a> -<br/> -<input type="hidden" name="domains" value="oss.oetiker.ch"></input> -<input type="text" name="q" size="22" maxlength="255" value=""></input> -</td></tr> -<tr> -<td nowrap="nowrap"> -<table> -<tr> -<td> -<input type="radio" name="sitesearch" value="oss.oetiker.ch" checked="checked"></input> -<font size="-1" color="#000000">oss.oetiker.ch</font> -</td> -<td> -<input type="radio" name="sitesearch" value=""></input> -<font size="-1" color="#000000">Web</font> -</td> -</tr> -</table> -<input type="submit" name="sa" value="Search"></input> -<input type="hidden" name="client" value="pub-8135238818549668"></input> -<input type="hidden" name="forid" value="1"></input> -<input type="hidden" name="channel" value="1985457903"></input> -<input type="hidden" name="ie" value="ISO-8859-1"></input> -<input type="hidden" name="oe" value="ISO-8859-1"></input> -<input type="hidden" name="cof" value="GALT:#FE754D;GL:1;DIV:#345D98;VLC:345D98;AH:center;BGC:FFFFFF;LBGC:E4E4E4;ALC:345D98;LC:345D98;T:000000;GFNT:345D98;GIMP:345D98;LH:35;LW:100;L:http://oss.oetiker.ch/mrtg/images/mrtg_logo.gif;S:http://oss.oetiker.ch/mrtg;LP:1;FORID:1;"></input> -<input type="hidden" name="hl" value="en"></input> -</td></tr></table> -</form> -</div> -<!-- SiteSearch Google --> -</td> -<!-- Navbar code end --> - -<!-- Content code start --> -<td id="content_container"> -{#H1#} -{#Body#} -<p id="pageauthor"> -Last Update: <perl> -<protect pass=2> -use POSIX qw(strftime LC_TIME setlocale); -foreach my $l (qw($(LANGS))){ - my $lang = lc($l) eq 'de' ? 'de_CH' : $l; - $lang =~ s/^en.*/sv/i; - setlocale(LC_TIME,$lang); - my $year = strftime "%Y", localtime; - my $date = strftime "%x", localtime("$(WML_SRC_TIME)"); - q{$(AUTHOR)} =~ m{(.+\S+)\s*(<.+>|http://.+)} || die q{No Match for $(AUTHOR)}."\n"; - my $text=$1; my $url=$2; $url =~ s/<(\S+)(?:\@|_at_)(\S+)>/mailto:$1\@$2/; - my $LANG = uc("LANG_$l"); - print <<LINE -[$LANG:$date | <A HREF="$url">$text</A> | <A HREF="http://it.oetiker.ch/monitoring/">OETIKER+PARTNER AG</a>:$LANG] -LINE -} -</protect> -</perl> -</p> -</td> -</tr> -</table> - -<!-- content code end --> -<div class="orange_ruller"> </div> - -<!-- footer code start --> -<div id="page_footer"> -<table class="footer_splitter" cellspacing="0" cellpadding="0" border="0"> -<tr><td id="footer_logo"> -<img src="$(ROOT)/images/foot_logo.gif" alt="MRTG" /> -</td><td> -<small> -Web design by <a href="http://www.templatemonster.com" title=" Template Monster - Website Templates | Flash Templates | Web Templates Design">Template Monster</a> -</small> -</td></tr> -</table> -</div> - -<!-- footer code end --> -<hr class="legacy"/> -<p class="legacy" style="border-width: 1px; border-color: red; padding: 5px;"> -<en><b>NOTE:</b> The content of this website is accessible with any browser. The - graphical -design though relies completely on CSS2 styles. If you see this text, this means -that your browser does not support CSS2. Consider upgrading to a standard conformant -browser like Mozilla <a href="http://www.getfirefox.com">Firefox</a> or -<a href="http://www.opera.com">Opera</a> but also Apple's <a href="http://www.apple.com/safari/">Safari</a> -or KDE's <a href="http://www.konqueror.org">Konqueror</a> for example. It may also be that you -are looking at a mirror page which did not copy <a href="$(ROOT)/design.css">the CSS</a> for this page. Or if some pictures -are missing, then the mirror may not have picked up the contents of either the <a href="$(ROOT)/images/">images</a> or the <a href="$(ROOT)/inc/">inc</a> directory.</en> -#<de><b>HINWEIS:</b> Diese Website funktioniert mit jedem Browser. Die graphische Präsentation jedoch -#basiert komplett auf CSS2. Beispiele für CSS2 konforme Browser sind zum Beispiel <a href="http://www.getfirefox.com">Firefox</a> -#<a href="http://www.opera.com">Opera</a> oder auch <a href="http://www.apple.com/safari/">Safari</a> von Apple und -#<a href="http://www.konqueror.org">Konqueror</a> aus dem KDE Projekt. -#</de> -</p> -</body> -</html> - -# All the rest goes into Body -..Body>> diff --git a/web/inc/trac.css b/web/inc/trac.css deleted file mode 100644 index bddcfb7..0000000 --- a/web/inc/trac.css +++ /dev/null @@ -1,43 +0,0 @@ -@import url(/mrtg/design.css); - -body, th, td { - font-family: sans-serif; -} - -#navbar_container a { - border-style: none; -} - -#navbar_container a:hover { - background-color: inherit; -} - -div#header { - display:none; -} - -div#banner { - position:absolute; - top: 105px; - left: 0px; - width: 100%; - max-width: 80em; - padding-right: 70px; -} - -#content_container h1 { - margin-top: 10px; - margin-right: 0px; -} - -#pagepath { - font-size: 10px; -} - -#pagepath .pathentry { - float: left; -} - -#pagepath *:link, #pagepath *:visited { - margin: 0 0.2em; -} diff --git a/web/index.wml b/web/index.wml deleted file mode 100644 index 39573b1..0000000 --- a/web/index.wml +++ /dev/null @@ -1,74 +0,0 @@ -<PAGE AUTHOR = "Tobi Oetiker <tobi@oetiker.ch>" - PAGE = "welcome"> - -{#ExtraHead#: -<meta property="og:title" content="MRTG - The Multi Router Traffic Grapher"/> -<meta property="og:type" content="product"/> -<meta property="og:image" content="http://oss.oetiker.ch/mrtg/fb-logo.png"/> -<meta property="og:url" content="http://www.mrtg.org/"/> -<meta property="og:site_name" content="MRTG"/> -<meta property="fb:admins" content="706717092"/> -<meta property="og:description" content="MRTG allows you to monitor traffic on a wide variety of network devices"/> -:##} - -<H1>Tobi Oetiker's MRTG - The Multi Router Traffic Grapher</H1> - - -<H2>What it does</H2> - -#<div style="overflow:auto"> -#<div style="float:right"> -#<a href="http://www.usenix.org/lisa08/promote"> <img src="http://www.usenix.org/events/lisa08/art/lisa08_button.jpg" border="0" width="125" height="125" alt="LISA '08"/> </a> -#</div> - -<p>You have a router, you want to know what it does all day long? Then MRTG -is for you. It will monitor SNMP network devices and draw <a -href="http://www.switch.ch/network/operation/statistics/geant2.html">pretty pictures</a> -showing how much traffic has passed through each interface.</p> - -<p>Routers are only the beginning. MRTG is being used to graph all sorts of -network devices as well as everything else from weather data to vending -machines.</p> - -<p>MRTG is written in perl and works on Unix/Linux as well as Windows and -even Netware systems. MRTG is free software licensed under the Gnu GPL.</p> -</div> - -<fb:like href="http://www.mrtg.org/" show_faces="false" width="300"></fb:like> - -<p> -<img src="192.33.92.249_fa4_1-day.png" -alt="Sample Graph" /></p> - -<h2>News</h2> - -<div style="overflow:auto"> -<div style="float:left;margin-right: 10px"><a href="http://www.steveshipway.org/book/"><img src="mrtgbook.jpg" border="0" alt="MRTG Book"/></a></div> -<div>Steve Shipway has written a book on MRTG. If you have been looking for -something more than the documentation included with MRTG, this might be just -what you have been waiting for. Steve is publishing the book via Lulu, so -you can get an actual printed and bound copy. Check out <a -href="http://www.steveshipway.org/book/">Steve's Website</a> for more -information.</div> -</div> - -<H2 clear="left">Download</H2> - -<P>MRTG is free software. Just <A HREF="download.en.html">download</A> it -and -follow the install instructions for <a HREF="doc/mrtg-unix-guide.en.html">Unix/Linux</a> -or <a HREF="doc/mrtg-nt-guide.en.html">Windows</a> or <a -HREF="doc/mrtg-nw-guide.en.html">NetWare</a> to get get started.</P> - -<p>If you run into trouble, check out <a href="support/">support</a> -options.</p> - - - -<H2>Sponsorship and Appreciation</H2> - -<P>You like MRTG? You want to encourage me to spend my time, working on -it? You want me to implement a custom feature? Check out the <A -HREF="sponsor.en.html">sponsorship</a> page.</P> - -<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> diff --git a/web/license.wml b/web/license.wml deleted file mode 100644 index 188a56e..0000000 --- a/web/license.wml +++ /dev/null @@ -1,20 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "license"> - -<H1>License</H1> - -<H2>GNU General Public License</H2> - -<P>MRTG is available under the terms of the <A -HREF="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</A>. -This means you can do most things you want with this software as long as you -do not claim you created the software and don't sell it (or modified version -of it) under a license other than the GNU GPL.</P> - -<H2>Give Credit</H2> - -<P>One of the things I get out of MRTG is 'Being Known in the Industry'. -This only works if you give credit. This means that you -mention MRTG on webpages and other publications containing graphs -created with MRTG. If possible, a link should be included in the -publication, pointing to the MRTG homepage.</p> diff --git a/web/logos/kanetix.png b/web/logos/kanetix.png Binary files differdeleted file mode 100644 index 9c16aa8..0000000 --- a/web/logos/kanetix.png +++ /dev/null diff --git a/web/logos/logo_plixer_blue101x51.gif b/web/logos/logo_plixer_blue101x51.gif Binary files differdeleted file mode 100644 index 88de46b..0000000 --- a/web/logos/logo_plixer_blue101x51.gif +++ /dev/null diff --git a/web/logos/mrtg_sensorgateway.png b/web/logos/mrtg_sensorgateway.png Binary files differdeleted file mode 100644 index 8bdf18f..0000000 --- a/web/logos/mrtg_sensorgateway.png +++ /dev/null diff --git a/web/logos/nagios.png b/web/logos/nagios.png Binary files differdeleted file mode 100644 index 7a9929c..0000000 --- a/web/logos/nagios.png +++ /dev/null diff --git a/web/logos/opennmscolorgroup.png b/web/logos/opennmscolorgroup.png Binary files differdeleted file mode 100644 index 7abf57b..0000000 --- a/web/logos/opennmscolorgroup.png +++ /dev/null diff --git a/web/logos/poweradmin_server_monitor.png b/web/logos/poweradmin_server_monitor.png Binary files differdeleted file mode 100644 index 2880ba4..0000000 --- a/web/logos/poweradmin_server_monitor.png +++ /dev/null diff --git a/web/logos/psw.jpg b/web/logos/psw.jpg Binary files differdeleted file mode 100644 index 91d4d1a..0000000 --- a/web/logos/psw.jpg +++ /dev/null diff --git a/web/logos/serverscheck.png b/web/logos/serverscheck.png Binary files differdeleted file mode 100644 index 3426025..0000000 --- a/web/logos/serverscheck.png +++ /dev/null diff --git a/web/logos/terreactive.png b/web/logos/terreactive.png Binary files differdeleted file mode 100644 index 9d5e6c8..0000000 --- a/web/logos/terreactive.png +++ /dev/null diff --git a/web/logos/zenoss.png b/web/logos/zenoss.png Binary files differdeleted file mode 100644 index c66039f..0000000 --- a/web/logos/zenoss.png +++ /dev/null diff --git a/web/mirror.html b/web/mirror.html deleted file mode 100644 index f6b0c32..0000000 --- a/web/mirror.html +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -export PATH=/usr/bin:/bin -echo Content-Type: text/html -echo -cat <<HEAD -<html> -<head> -<title>website mirror instructions</title> -</head> -<h1>MRTG Mirror Source</h1> -<p>Run the following commands once a day.</p> -<pre> -#!/bin/sh -cd /YOUR/MIRROR/TREE -wget --no-host-directories --timestamping --recursive --level=1 http://oss.oetiker.ch/mrtg/mirror.html -</pre> - -<p>Create a file called <b>hoster.html</b> like that:</p> -<pre> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> -<style type="text/css"> -body { - margin: 0px; - padding: 0px; - background-color: #909090; - font-family: sans-serif; - font-size: 10px; -} - -#hoster a { - color: black; - text-decoration: none; -} -</style> -</head> -<body> -<div id="hoster"> -mirror by <a target="_top" href="http://YOUR.SITE">Company</a> -</div> -</body> -</html> -</pre> - -HEAD - -( for xt in html png jpg gif ico css js gz txt zip patch pgp md5 pdf CHANGES; do - find . \( -name "*$xt" -not -name "stat*" -not -name "hoster*" \) -exec printf '<a href="{}">.</a>\n' \; | grep -v /.svn |egrep -v 'pub/.*html' - done ) | sort -u - -echo "</body></html>" diff --git a/web/mrtg-l.gif b/web/mrtg-l.gif Binary files differdeleted file mode 100644 index 733ac06..0000000 --- a/web/mrtg-l.gif +++ /dev/null diff --git a/web/mrtg-l.png b/web/mrtg-l.png Binary files differdeleted file mode 100644 index fc0b967..0000000 --- a/web/mrtg-l.png +++ /dev/null diff --git a/web/mrtg-m.gif b/web/mrtg-m.gif Binary files differdeleted file mode 100644 index bc78d5c..0000000 --- a/web/mrtg-m.gif +++ /dev/null diff --git a/web/mrtg-m.png b/web/mrtg-m.png Binary files differdeleted file mode 100644 index 743e495..0000000 --- a/web/mrtg-m.png +++ /dev/null diff --git a/web/mrtg-r.gif b/web/mrtg-r.gif Binary files differdeleted file mode 100644 index 2022c7b..0000000 --- a/web/mrtg-r.gif +++ /dev/null diff --git a/web/mrtg-r.png b/web/mrtg-r.png Binary files differdeleted file mode 100644 index 5fbbd45..0000000 --- a/web/mrtg-r.png +++ /dev/null diff --git a/web/mrtgbook.jpg b/web/mrtgbook.jpg Binary files differdeleted file mode 100644 index 891bf58..0000000 --- a/web/mrtgbook.jpg +++ /dev/null diff --git a/web/nabble-mrtg.wml b/web/nabble-mrtg.wml deleted file mode 100644 index 8484253..0000000 --- a/web/nabble-mrtg.wml +++ /dev/null @@ -1,8 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "nable"> -<title>MRTG Mailinglists</title> -{#H1#: -<a id="nabblelink" href="http://mrtg-mailinglists.795376.n2.nabble.com/">MRTG Mailinglists</a> -<script src="http://mrtg-mailinglists.795376.n2.nabble.com/embed/f795376"></script> -:#H1#} - diff --git a/web/navbar.inc b/web/navbar.inc deleted file mode 100644 index 4d0b039..0000000 --- a/web/navbar.inc +++ /dev/null @@ -1,19 +0,0 @@ -<nav:bar 0 main ""> - <nav:but welcome "Welcome" index /> - <nav:but down "Download" download /> - <nav:but license "License" license /> - <nav:but demo "Demo" http://www.six.sk/mrtg/aggregated.html /> - <nav:but doc "Documentation" doc/index doc /> - <nav:but 3party "3rd Party Docs" 3party /> - <nav:but doc_mrtg-forum "Support" support/index forum /> - <nav:but trac "Bug Reports, Wiki" http://oss.oetiker.ch/mrtg-trac/ /> - <nav:but sponsor "Project Sponsors" sponsor /> - <nav:but cast "Cast" cast/index /> -</nav:bar> - -<nav:bar 1 doc "doc/"> -#include "doc/navbar.inc" -</nav:bar> -<nav:bar 1 forum "./"> - <nav:but nable "MRTG Web Forum" nabble-mrtg /> -</nav:bar> diff --git a/web/site-sync b/web/site-sync deleted file mode 100755 index b3c90c4..0000000 --- a/web/site-sync +++ /dev/null @@ -1 +0,0 @@ -rsync --exclude="bin/lib/**" --copy-unsafe-links --verbose --times --delete --exclude pub --exclude='*~' --exclude=".svn" --exclude=".condor" -r . oposs@freddie:public_html/mrtg diff --git a/web/snmpv1-is-too-slow.png b/web/snmpv1-is-too-slow.png Binary files differdeleted file mode 100644 index b3d98df..0000000 --- a/web/snmpv1-is-too-slow.png +++ /dev/null diff --git a/web/sponsor.wml b/web/sponsor.wml deleted file mode 100644 index de4dfbd..0000000 --- a/web/sponsor.wml +++ /dev/null @@ -1,68 +0,0 @@ -<PAGE AUTHOR = "Tobias Oetiker <tobi@oetiker.ch>" - PAGE = "sponsor"> - - -<h1>Sponsorship</h1> - -<p>These days I finance my work on MRTG by developing <a -href="http://it.oetiker.ch/monitoring/support.var">customer specific add-on -features and support contracts</a>. Since this work is focused towards the -customers requirements this does not leave much room for general improvement. -If you profit from MRTG and want to support the project as a whole, you -could <a href="http://it.oetiker.ch/monitoring/sponsoring.var">become a -sponsor</a>!</p> - -<h2>2012 Gold Sponsors</h2> - -<p>you?</p> - -<h2>2012 Silver Sponsors</h2> -# Tarus Balog <tarus@opennms.org> rt#14393 -<a href="http://www.opennms.org"><img border="0" title="openNMS" alt="openNMS" src="$(ROOT)/logos/opennmscolorgroup.png"/></a> -# Ethan Galstad <egalstad@nagios.com> Tue, 28 Sep 2010 23:18:27 +0200 -<a href="http://www.nagios.com"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/nagios.png"/></a> -# christian@heutger.net -<a href="http://www.psw.net"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/psw.jpg"/></a> - -<h2>2011 Gold Sponsors</h2> - -<p> -#maarten.vanlaere@serverscheck.com -<a href="http://www.serverscheck.com/sensors/sensorgateway_availability.asp"><img border="0" title="ServersCheck" alt="ServersCheck" src="$(ROOT)/logos/mrtg_sensorgateway.png"/></a> -#Erik A. Dahl <edahl@zenoss.org> -#<a href="http://www.zenoss.com/?mrtg"><img border="0" title="Zenoss Open Source IT Monitoring" alt="Zenoss Open Source IT Monitoring" src="$(ROOT)/logos/zenoss.png"/></a> -</p> - -<h2>2011 Silver Sponsors</h2> - -<p> -# Ethan Galstad <egalstad@nagios.com> Tue, 28 Sep 2010 23:18:27 +0200 -<a href="http://www.nagios.com"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/nagios.png"/></a> -# Dan Munteanu <dmunte@kanetix.com> -<a href="http://www.kanetix.ca/"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/kanetix.png"/></a> -# Michael Patterson <mike@plixer.com> Mon, 29 Oct 2007 15:13:31 -0400 -<a href="http://www.plixer.com"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/logo_plixer_blue101x51.gif"/></a> -# christian@heutger.net -<a href="http://www.psw.net"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/psw.jpg"/></a> -# Doug Nebeker <doug@poweradmin.com> -<a href="http://www.poweradmin.com/servermonitor/?ref=mrtg"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/poweradmin_server_monitor.png"/></a> -<a href="http://it.oetiker.ch/monitoring/sponsoring.var"><img border="0" alt="Silver Sponsor" src="$(ROOT)/inc/silver-logo.png"/></a> -</p> - -#<h2>2010 Silver Sponsors</h2> - -#<p> -# Michael Patterson <mike@plixer.com> Mon, 29 Oct 2007 15:13:31 -0400 -#<a href="http://www.plixer.com"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/logo_plixer_blue101x51.gif"/></a> -# Ethan Galstad <egalstad@nagios.com> Tue, 28 Sep 2010 23:18:27 +0200 -#<a href="http://www.nagios.com"><img border="0" alt="Silver Sponsor" src="$(ROOT)/logos/nagios.png"/></a> -#</p> - - -<h2>Other means for making Tobi happy</h2> - -<p>If you like MRTG and want to show me your appreciation personally, have a look -at my <a HREF="http://tobi.oetiker.ch/wish">media wishlist</a>. -Please put your <b>eMail</b> address into the the message area, so that I -can thank you for your present. I do keep a list of people who sent me -stuff. You can look at it <a href="http://tobi.oetiker.ch/webtools/appreciators.txt">here</a>.</p> diff --git a/web/support/build.sh b/web/support/build.sh deleted file mode 100755 index 67459d0..0000000 --- a/web/support/build.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -sect=doc -src=/home/oetiker/checkouts/mrtg/src/ -. ../bin/pod2wml.sh - -pod2descr() { - pod=$1.pod - descr=`egrep "$1 *- " $pod|head -1|sed 's/.*- //'` - menu=`egrep "$1 *- " $pod|head -1|sed 's/ -.*//'` -} - - -# build probe list -rm -f navbar.inc -rm -f index.inc - -for pod in mrtg-forum.pod; do - base=`echo $pod |sed 's,.pod,,'` - echo $base - cat $src/doc/$pod > $base.pod - pod2descr $base - pod2wml $base -done - -mv mrtg-forum.wml index.wml diff --git a/web/support/index.inc b/web/support/index.inc deleted file mode 100644 index ab36c86..0000000 --- a/web/support/index.inc +++ /dev/null @@ -1,2 +0,0 @@ -<dt><a href="mrtg-forum.en.html">mrtg-forum</a></dt><dd>Interactive Help for MRTG users -</dd> diff --git a/web/support/index.wml b/web/support/index.wml deleted file mode 100644 index 3210498..0000000 --- a/web/support/index.wml +++ /dev/null @@ -1,154 +0,0 @@ -<page page="doc_mrtg-forum" -author="Tobias Oetiker <tobi@oetiker.ch>"/> -<?xml version="1.0" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title></title> -<meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<link rev="made" href="mailto:root@localhost" /> -</head> - -<body> - - - -<ul id="index"> - <li><a href="#NAME">NAME</a></li> - <li><a href="#SYNOPSIS">SYNOPSIS</a></li> - <li><a href="#MAILING-LIST">MAILING-LIST</a> - <ul> - <li><a href="#THE-RULES">THE RULES</a></li> - <li><a href="#SUBSCRIBING">SUBSCRIBING</a></li> - </ul> - </li> - <li><a href="#NEWSGROUP">NEWSGROUP</a></li> - <li><a href="#IRC-Channel">IRC Channel</a></li> - <li><a href="#MRTG-Japan">MRTG Japan</a></li> - <li><a href="#AUTHOR">AUTHOR</a></li> -</ul> - -<h1 id="NAME">NAME</h1> - -<p>mrtg-forum - Interactive Help for MRTG users</p> - -<h1 id="SYNOPSIS">SYNOPSIS</h1> - -<p>There is a lot of written documentation for mrtg, but nevertheless you may have a problem where you can't find the solution. In this case some Human Help may be necessary. With MRTG there are several ways to get Humans to help you.</p> - -<h1 id="MAILING-LIST">MAILING-LIST</h1> - -<p>There are three mailing lists for MRTG available.</p> - -<dl> - -<dt id="mrtg">mrtg</dt> -<dd> - -<p>for discussion among mrtg users.</p> - -</dd> -<dt id="mrtg-announce">mrtg-announce</dt> -<dd> - -<p>for announcements regarding new versions of mrtg related software.</p> - -</dd> -<dt id="mrtg-developers">mrtg-developers</dt> -<dd> - -<p>for discussion among people who write software in connection with mrtg or who hack mrtg itself.</p> - -</dd> -</dl> - -<h2 id="THE-RULES">THE RULES</h2> - -<p>Please note that the memebers of the mrtg mailinglist value politeness highly. This means behave in a way you would like others to behave towards you.</p> - -<ul> - -<li><p>No shouting. (NO CAPS)</p> - -</li> -<li><p>No rude language</p> - -</li> -<li><p>No demands. everybody is on the list out of their own free will. If you do not get an answer to your question, chances are high that you did not give sufficent details about the nature of your problem or that the answer to your problem is in the documentation.</p> - -</li> -<li><p>If you do not follow the rules you will be unsubscribed from the list with no further questions asked.</p> - -</li> -<li><p>Decisions about your unsubscription from the list will be taken by</p> - -<protect><pre><code> Alex van den Bogaerdt <alex at ergens.op.het.net> - Paul C. Williamson <pwilliamson at MANDTBANK.COM></code></pre></protect> - -<p>If you feel that you have been treated unfairly, you may send mail to me and explain the situation.</p> - -<protect><pre><code> Tobi Oetiker <tobi@oetiker.ch></code></pre></protect> - -</li> -</ul> - -<h2 id="SUBSCRIBING">SUBSCRIBING</h2> - -<p>These lists are managed by a mailing-list management program (listar). It allows you to subscribe to these lists by sending a message with the subject: <b>subscribe</b> to the following address:</p> - -<protect><pre><code> listname-request@lists.oetiker.ch</code></pre></protect> - -<p>You will then get a message asking you to confirm your subscription.</p> - -<p>For posting to the lists use the following address</p> - -<protect><pre><code> listname@lists.oetiker.ch</code></pre></protect> - -<p>Note that only people who are subscribed to the list can post.</p> - -<p>Further information about the usage of the mailing lists is available by sending a message with the subject line <b>help</b> to either one of the request addresses.</p> - -<p>There is also a webinterface to the lists on</p> - -<protect><pre><code> http://lists.oetiker.ch</code></pre></protect> - -<p>List archives are on</p> - -<protect><pre><code> http://www.mail-archive.com/index.php?hunt=mrtg</code></pre></protect> - -<p>and</p> - -<protect><pre><code> http://gmane.org/find.php?list=mrtg</code></pre></protect> - -<h1 id="NEWSGROUP">NEWSGROUP</h1> - -<p>For discussion of MRTG or related topics on the Usenet, please send your posts to:</p> - -<protect><pre><code> news:comp.dcom.net-management</code></pre></protect> - -<p>Many MRTG users are in this forum and will help you. You can also find an archive of past activity from this Newsgroup on:</p> - -<protect><pre><code> http://groups.google.com/group/comp.dcom.net-management</code></pre></protect> - -<h1 id="IRC-Channel">IRC Channel</h1> - -<p>For discussion of MRTG and related topics on IRC, the `#mrtg' channel on EFNet has been created.</p> - -<p>More information can be found at</p> - -<protect><pre><code> http://mrtg.easymac.org</code></pre></protect> - -<h1 id="MRTG-Japan">MRTG Japan</h1> - -<p>There is a special Mailinglist for MRTG Users in Japan. It carries translations of the traffic from MRTG-ANNOUNCE as well as updates on the Japanese Translation of the MRTG documentation. Go to http://www.mrtg.jp/ for further Information.</p> - -<h1 id="AUTHOR">AUTHOR</h1> - -<p>Tobias Oetiker <tobi@oetiker.ch> and many contributors</p> - - -</body> - -</html> - - diff --git a/web/support/navbar.inc b/web/support/navbar.inc deleted file mode 100644 index cb13af8..0000000 --- a/web/support/navbar.inc +++ /dev/null @@ -1 +0,0 @@ -<nav:but doc_mrtg-forum "mrtg-forum" mrtg-forum/> diff --git a/web/trac.wml b/web/trac.wml deleted file mode 100644 index 89a1b27..0000000 --- a/web/trac.wml +++ /dev/null @@ -1,4 +0,0 @@ -<PAGE AUTHOR = "Tobi Oetiker <tobi@oetiker.ch>" - PAGE = "trac"> - -__TRAC__ |
