Pisg:Options générales

From Base de connaissances eggdrops & TCL
Revision as of 18:41, 8 December 2007 by CrazyCat (talk | contribs) (Lang)

Jump to: navigation, search

Channel

Channel is used in two contexts, globally when using <set> and when defining new channels. It sets the name of the channel.

<channel="#channel">
   Logfile = "channel.log"
   Format = "mIRC"
   Maintainer = "John"
</channel>

Default:Unset

Format

Format is used to define the format of the logfile, pisg supports a various number of different logfiles, see the FORMATS file included with the pisg distribution. If your logfiles have the suffix .gz or .bz2, they will automatically be decompressed and read by pisg. See also Maintainer.

<channel="#channel">
   Logfile = "channel.log"
   Format = "eggdrop"
   Maintainer = "John"
</channel>
<set Format="mIRC">

Default: Unset

Network

Network is used to set the network which the channel resides on, this name is displayed on the stats page.

<channel="#channel">
   Logfile = "channel.log"
   Format = "eggdrop"
   Network = "Undernet"
</channel>
<set Network="Quakenet">

Default: SomeIRCNetwork

OutputFile

OutputFile is used to define the name of the generated statistics page.

<channel="#channel">
   Logfile = "channel.log"
   Format = "eggdrop"
   OutputFile = "mychan.html"
</channel>
<set OutputFile="mychan.html">

Default: index.html

OutputTag

OutputTag specifies a string that will replace occurrences of "%t" in OutputFile. This option is most useful when used as a command line switch (-t) to pisg in conjunction with NFiles (-nf). Example:
$ pisg -co pisg.conf
$ pisg -co pisg.conf -nf 8 -t -week
Leaving out the OutputTag settings from the above pisg.conf snippet, this writes both the full statistics (mychan.html) and statistics for the last week (mychan-week.html) using the same pisg config file. (Assuming that there are separate logfiles for each day.)

<channel="#channel">
   LogDir = "logs/"
   Format = "eggdrop"
   OutputFile = "mychan%t.html"
   OutputTag = "-week"
</channel>
<set OutputTag="-week">

Default: unset

Logfile

This defines the filename of the logfile to parse for the channel. If you want to parse a directory full of logfiles, you should use the LogDir option instead. Providing this option multiple times will parse multiple files in the order the statements appear. Wildcards (* ? []) will be expanded. See also LogDir and NFiles.

<channel="#channel">
   Logfile="/home/foo/eggdrop/logs/mylog.txt"
   Format = "eggdrop"
</channel>
<set Logfile="foo.log">

Default: unset

LogDir

When LogDir is defined to valid path to a directory, then pisg will run through that directory, parse all logfiles in it and create one HTML page from it. Useful with for example eggdrop logs. Providing this option multiple times will parse all the files in multiple directories in the order the statements appear. See also NFiles, LogPrefix, and LogSuffix.

<channel="#channel">
   LogDir="/home/foo/eggdrop/logs/"
   Format = "eggdrop"
</channel>
<set LogDir="dailylogs/">

Default: unset

NFiles

When NFiles is set to a positive integer, pisg will process only the last that much logfiles from Logfile and LogDir options. Useful to create statistics that cover the last week or month (assuming there are separate logfile per day/week/etc.).

<channel="#channel">
   LogDir="/home/foo/eggdrop/logs/"
   NFiles="8"
   Format="eggdrop"
</channel>
<set NFiles="8">

Default: 0 (process all files)

Maintainer

Maintainer is used to define the name of the maintainer of the statistics page, this can be either the person generating the stats or the bot/client doing the logging. The maintainer is displayed in the outputted stats page. This setting is also used by some log parsers where "You" is used instead of the nick in the log (e.g. "You have been kicked"). See also Format, NickTracking.

<channel="#channel">
   Logfile = "channel.log"
   Format = "mIRC"
   Maintainer = "Benny"
</channel>
<set Maintainer="Benny">

Default: MAINTAINER

ColorScheme

Name ColorScheme is used to define the color scheme used for the statistics page. Actually it's the CSS file being included. CSS files distributed with pisg are: darkgalaxy, darkred, default, justgrey, ocean, orange_grey, pisg, softgreen (omit the .css). The file will be included statically in the generated HTML page. If you give a file name or URL (i.e. a color scheme name with .css or a path), the file will be linked to instead. Using "none" will cause pisg to write only the body of the page; use this to include the statistics into a custom page. See also CssDir, AltColorScheme, HiCell/HiCell2.

<channel="#channel">
   Logfile = "channel.log"
   ColorScheme = "darkgalaxy"
   Maintainer = "John"
</channel>
<set ColorScheme="default">

Default: default

AltColorScheme

AltColorScheme defines an alternate CSS file to be used for the statistics page. Multiple files can be given (space separated.) Note that this is not supported by all browsers. See also ColorScheme and CssDir.

<channel="#channel">
   Logfile = "channel.log"
   ColorScheme = "darkgalaxy"
   AltColorScheme = "layout/ocean.css"
   Maintainer = "John"
</channel>
<set AltColorScheme="layout/darkgalaxy.css layout/justgrey.css">

Default: default

Lang

Name Lang defines the language to use for the stats. Currently, lang.txt includes: EN (English), BG (Bulgarian), CA (Catalan), CZ (Czech), DA (Danish), DE (German), EE (Estonian), ES (Spanish), FI (Finnish), FR (French), GR (Greek), HE (Hebrew), HU (Hungarian), IS (Icelandic), IT (Italian), NL (Dutch), NL_BE (Flemish), NO (Norwegian), PL (Polish), PT (Portuguese), PT_BR (Portuguese/Brazil), RO (Romanian), RU (Russian), SE (Swedish), SI (Slovenian), SK (Slovak), SQ (Albanian), TR (Turkish), YU (Serbian). Output in several languages can be generated at the same time, separate the languages by comma. The tag %l in the output file name will be replaced by the language name. See also LangFile.

<channel="#channel">
   Logfile = "channel.log"
   Format = "mIRC"
   Lang = "DE"
   OutputFile = "mychan-%l.html"
</channel>
<set Lang="FR,SE">

Default: EN (English)

PageHead

PageHead is used to include a file in the stats page, for example an introduction text, a link to an image or a banner. The file can hold anything, it will be included raw in the stats page - so HTML should be preferred. The file will be included in the top of the page. This option is the opposite of PageFoot.

<channel="#channel">
   Logfile = "channel.log"
   Format = "mIRC"
   OutputFile = "stats.html"
   PageHead = "myheader.txt"
</channel>
<set PageHead="someheader.txt">

Default: none

PageFoot

PageFoot is used to include a file in the stats page, for example an introduction text, a link to an image or a banner. The file can hold anything, it will be included raw in the stats page - so HTML should be preferred. The file will be included in the bottom of the page. This option is the opposite of PageHead.

<channel="#channel">
   Logfile = "channel.log"
   Format = "mIRC"
   outputfile = "stats.html"
   PageFoot = "myfooter.txt"
</channel>
<set PageFoot="somefooter.txt">
'''Default''': none
==LogPrefix==
When using the LogDir option and you only want to use a slew of the files in it, you can have pisg choose only files which are prefixed with a special string.
<source lang=xml><channel="#channel">
   LogDir="/home/foo/eggdrop/logs/"
   Format = "eggdrop"
   LogPrefix = "logjun"
</channel>
<set LogPrefix="logjanuary">

Default: unset

LogSuffix

LogSuffix is used to define the suffix of a logfile, it only works when LogDir is defined. The example in the synopsis is for the eggdrop bots default format. Regexp to sort logfiles by format month||day||year

<set LogSuffix="\.\d\d([A-Za-z]+)\d\d\d\d||\.(\d\d)[A-Za-z]+\d\d\d\d||\.\d\d[A-Za-z]+(\d\d\d\d)">

Default: Unset

Silent

This option is useful mainly from command line when invoking pisg with --silent 1. But it can also used in the configuration file. It will suppress all standard output from pisg. Error messages will still be sent.

<set Silent="1">

Default: 0 (disabled)

CacheDir

Setting this option makes pisg dump the results of log parsing into cache files. The next time pisg is run, it compares the timestamp of the log(s) with the timestamp stored in the cache file. When the log was not changed, the cached data is used. (This means that it does not work if you only have a single big logfile. Split the log at arbitrary points and use LogDir or Logfile="dir/*".)

Note that the cache files should be deleted when the pisg config file is changed since the cache data uses the old config settings. NickTracking does not work especially well with the cache when using different NFiles settings.

<set CacheDir="pisg_cache">
<set CacheDir="/path/to/pisg_cache">

Default: Unset