2002-01-23 pisg documentation How to install and configure pisg What is pisg? pisg is an IRC statistics generator. It takes IRC logfiles and turns them into nice looking stats. In general, you would do something like this to get it running: Enable logging in an IRC bot, or in your IRC client. The log will be outputted into a file. You set up pisg, you define the channel name, and the path to the logfile you created. You run pisg, pisg runs the log through and create statistics, it then creates a HTML page which you can upload to a server. What are the requirements to run pisg? An IRC client or bot where pisg supports the output logfile. Any operating system which Perl runs at, this includes popular OS'es such as Linux, FreeBSD, Windows and Mac. You will have a hard time finding an OS where Perl isn't supported. Optional - a system to host the statistics page 24 hours a day, 7 days a week. Optional - a system to log the channel, 24 hours a day, 7 days a week. Setting up pisg for the first time Most configuration happens through the pisg.cfg file, the file format is made to be easy to read, and easy to extend for further use. It uses an XML-like format, with elements and attributes. Setting up a channel An element called channel is made for defining channels, a quick example of a channel is this: Format = "mIRC" Maintainer = "John" ]]> The above will define a channel called #channel, the logfile pisg will look for is called channel.log and the format of the logfile will be mIRC. The maintainer (which will be stated on the output page) is John. That is basically it! Now, there is a lot more options you can use for your channels, for this please refer to the reference documentation. Specifying user options User options are set with a simple XML-like syntax in the form: ]]> Remember, the nick is always required. For example to add aliases to a nick, then you could do this: ]]> The asterix (*) means that it will match all nicks starting with 'Joe^'. So it will add all Joe^'s to 'Joe' in the stats. Another thing you can do is to add a picture to a user: ]]> If you have a larger picture of the user as well, you can make the picture on the stats page link to it: ]]> You can also set a user's sex: ]]> Also you can add links to URLs and e-mails: ]]> or ]]> The last thing you can do is to ignore nicks (for example bots): ]]> You don't have to do all this in many lines, you could just as easily do: ]]> (Here the aliases is a space separated list of nicks, that also works! But * as a wildcard is smarter, but also slower). Setting global options Many times, it will be useful to set up global options, global options are set like this: ]]> Any global option will override anything defined with in channel elements (see ) For example, to change the background color of the stats page, you could do: ]]> You can set many options in a single set: ]]> The above will set the language on the statistics page to DE (Deutch, German) and set the timeoffset to +1. All options available are mentioned in the reference documentation. Ignoring links It's possible to ignore links in the "Most referenced URLs" section: ]]> Reference for configuration options Channel Channel define channel name Format = "mIRC" Faintainer = "John" ]]> Description Channel is used in two contexts, globally when using <set> and when defining new channels. It sets the name of the channel. Default Unset LogSuffix LogSuffix Regex to sort logfiles by format month|day|year ]]> Description 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 foramt. Default Unset Format Format the logfile format Format = "eggdrop" Maintainer = "John" ]]> Description 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. Default mIRC Network Network the IRC network of the channel Format = "eggdrop" Network = "Undernet" ]]> Description Network is used to set the network which the channel resides on, this name is displayed on the stats page. Default SomeIRCNetwork OutputFile OutputFile name of the generated HTML page Format = "eggdrop" OutputFile = "mychan.html" ]]> Description OutputFile is used to define the name of the generated statistics page. Default index.html Maintainer Maintainer name of the maintainer Format = "mIRC" Maintainer = "Benny" ]]> Description Maintainer is used to define the name of the maintaner 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. Default MAINTAINER Lang Lang define the language / translation to use Format = "mIRC" Lang = "DE" ]]> Description Lang is used to define the language translation to use, if the language support is there, the text on the stats page will be outputted in that language. All supported languages is mentioned in the lang.txt file with the pisg distribution. Some of the languages supported is: EN | DE | DK | FR | ES | PL | PT | NO | NL | SE | EE | IT | HU | SI | FI Default EN (English) PageHead PageHead define a file as page header Format = "mIRC" OutputFile = "stats.html" PageHead = "myheader.txt" ]]> Description 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. Default none PageFoot PageFoot define a file as page footer Format = "mIRC" outputfile = "stats.html" PageFoot = "myfooter.txt" ]]> Description 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. Default none ImagePath ImagePath path to user pictures Format = "mIRC" ImagePath = "userpics/" ]]> Description ImagePath defines an alternative path to where user pictures is located. The default is that user pictures is located in the same directory as the HTML page. Default current directory DefaultPic DefaultPic use a default user picture Format = "mIRC" DefaultPic = "not_available.jpg" ]]> Description DefaultPic defines a picture to be displayed for all users which have no other picture defined in the user element. This is good for showing "No picture available" or something. Default unset LogDir LogDir parse a directory full of logs Format = "eggdrop" ]]> Description When LogDir is defined to valid path to a directory, then pisg will run through that directory, parse all logfiles in it and create 1 HTML from it. Useful with for example eggdrop logs. Default unset LogPrefix LogPrefix only parse logs LogPrefixed with a userdefined string Format = "eggdrop" LogPrefix = "logjun" ]]> Description 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. Default unset TimeOffset TimeOffset use a different time zone than the local machine Format = "mIRC" Maintainer = "John" TimeOffset = "+5" ]]> Description By default, pisg uses the time of the local machine to display the time of the generated stats. Sometimes when you have a shell on an external box, and it's in another country, you want to use another time. This is accomplished by the TimeOffset command. Default +0 ShowActiveTimes ShowActiveTimes enable/disable "Most Active Times" Format = "xchat" ShowActiveTimes = "0" ]]> Description With this option you can disable the "Most Active Times" section on the stats page. It will simply disappear when specifying 0. Default 1 (enabled) ShowBigNumbers ShowBigNumbers enable/disable "Big Numbers" sections Format = "xchat" ShowBigNumbers = "0" ]]> Description With this option you can disable the "Big Numbers" and "Other Interesting numbers" sections on the stats page. They will simply disappear when specifying 0. Default 1 (enabled) ShowTopics ShowTopics enable/disable "Latest topics" sections Format = "xchat" ShowTopics = "0" ]]> Description With this option you can disable the "Latest topics" section on the stats page. It will simply disappear when specifying 0. Default 1 (enabled) ShowWpl ShowWpl enable/disable "words per line" Format = "xchat" ShowWpl = "0" ]]> Description With this option you can enable the "words per line" coloumn in the "Most Active Nicks" section. It will add a column describing the average words per line for a person. Default 0 (disabled) ShowCpl ShowCpl enable/disable "characters per line" Format = "xchat" ShowCpl = "0" ]]> Description With this option you can enable the "characters per line" coloumn in the "Most Active Nicks" section. It will add a column describing the average number of characters per line for a person. Default 0 (disabled) ShowWords ShowWords enable/disable "number of words" Format = "xchat" ShowWords = "0" ]]> Description The ShowWords option adds a column to the "Most Active Nicks" list which list the total number of words a user has typed. Default 0 (disabled) ShowLastSeen ShowLastSeen show when a user was last seen on a channel Format = "xchat" ShowLastSeen = "0" ]]> Description With this option enabled, a column will be added to the "Most Active Nicks" section to display when a user was last seen. Eg. "2 days ago". Default 0 (disabled) ShowTime ShowTime show when a nick was active Format = "xchat" ShowTime = "0" ]]> Description The default behaviour is to add a column to the "Most Active Nicks" section displaying a fancy timebar to show when a user was active. With this option it can be disabled. Default 1 (enabled) ShowLineTime ShowLineTime mIRCStats like behaviour of timebar Format = "bobot" ShowLineTime = "0" ]]> Description The default behaviour is to add a column to the "Most Active Nicks" section displaying a fancy linetimebar to show when a user was active. With this option it can be done the same way as mIRCStats does it; that is, by putting that timebar next to the number of lines, in the same column. Default 0 (disabled) ShowRandQuote ShowRandQuote enable or disable the random quotes Format = "bobot" ShowRandQuote = "0" ]]> Description The default behaviour is to add a column to the "Most Active Nicks" section displaying a users random quote. With this option it can be disabled. Default 1 (enabled) ShowLegend ShowLegend enable or disable the legend of the timebars Format = "bobot" ShowLegend = "0" ]]> Description By default, pisg shows a legend below the "Most Active Times" displaying what the different colors means. With this option it can be disabled. Default 1 (enabled) ShowKickLine ShowKickLine enable or disable the kickline Format = "bobot" ShowKickLine = "0" ]]> Description By default, pisg shows an example kickline in the "Most kicked"-stats. With this option it can be disabled. Default 1 (enabled) ShowActionLine ShowActionLine enable or disable the actionline Format = "bobot" ShowActionLine = "0" ]]> Description By default, pisg shows an example actionline in the "Most actions"-stats. With this option it can be disabled. Default 1 (enabled) ShowShoutLine ShowShoutLine enable or disable the shoutline Format = "bobot" ShowShoutLine = "0" ]]> Description By default, pisg shows an example shoutline in the "Most shouting people"-stats. With this option it can be disabled. Default 1 (enabled) ShowViolentLines ShowViolentLines enable or disable the violentlines Format = "bobot" ShowViolentLines = "0" ]]> Description By default, pisg shows example violentlines in the "Most aggresive" and "Most attacked"-stats. With this option it can be disabled. Default 1 (enabled) ShowMuw ShowMuw enable or disable "Most used words" Format = "xchat" ShowMuw = "0" ]]> Description By default, pisg adds an "Most used words" section to the stats page. With this option you can disable it from being shown. Default 1 (enabled) ShowMrn ShowMrn enable or disable "Most referenced nicks" Format = "xchat" ShowMrn = "0" ]]> Description By default, pisg adds an "Most referenced nicks" section to the stats page. With this option you can disable it from being shown. Default 1 (enabled) ShowMru ShowMru enable or disable "Most referenced URLs" Format = "xchat" ShowMru = "0" ]]> Description By default, pisg adds an "Most referenced URLs" section to the stats page. With this option you can disable it from being shown. Default 1 (enabled) ShowVoices ShowVoices enable or disable voice statistics Format = "xchat" ShowVoices = "0" ]]> Description By default, pisg doesn't have voice statistics like it has op statistics. Enabling this option will add a section to the "Most interesting numbers" displaying who got most voices. Default 0 (disabled) ShowMostNicks ShowMostNicks show who changed nick most often Format = "xchat" ShowMostNicks = "0" ]]> Description By enabling this option, pisg will add a section to the stats showing who had the most nicks, and what the nicks were. This option only works properly when NickTracking is enabled. Default 0 (disabled) IgnoreWords IgnoreWords ignore specified words Format = "xchat" IgnoreWords = "foo bar" ]]> Description Sometimes words in the "most used words" appears which you don't want to see, with this option you can ignore these words. It also applies to the "most referenced nicks" section. It's a space seperated list of words. Default unset FoulWords FoulWords specify words considered to be bad/FoulWords language Format = "xchat" FoulWords = "ass bitch" ]]> Description There is a section in the "Most interesting numbers" which tells who had a "dirty mouth" - here you can define which words are considered being bad/foul. It is a space seperated list of words. Default ass fuck bitch shit scheisse scheiße kacke arsch ficker ficken schlampe RegexpAliases RegexpAliases use regular expressions in user aliases ]]> Description Enabling this option will make all aliases in <user> lines be parsed as regular expressions. Default 0 (disabled) Silent Silent make pisg Silent, suppress messages ]]> Description This option is useful mainly from commandline 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. Default 0 (disabled) Charset Charset Charset to use for stats page Format = "xchat" Charset = "utf-8" ]]> Description The pisg stats page defines a charset in a meta tag, this can be used if your country is using a different one than the default. Default iso-8859-1 MinQuote MinQuote minimum numbers of letters for a random quote Format = "xchat" MinQuote = "10" ]]> Description The random quotes displayed in the "Most Active Nicks" section has a certain range specified. With this option you can change the minimum number of letters required for a random quote. Also see the maxquote option. Default 25 MaxQuote MaxQuote maximum numbers of letters for a random quote Format = "xchat" MaxQuote = "70" ]]> Description The random quotes displayed in the "Most Active Nicks" section has a certain range specified. With this option you can change the maximum number of letters required for a random quote. Also see the minquote option. Default 65 WordLength WordLength minimum number of characters in an interesting word Format = "xchat" WordLength = "10" ]]> Description The "Most Used Words" section on the stats page display the most used words. The default is that a word only appears if it is longer than 5 characters. With this option you can change that minimum. Default 5 ActiveNicks ActiveNicks nicks to show in "Most Active Nicks" Format = "mIRC" ActiveNicks = "50" ]]> Description With this option you can define how many nicks you want to appear in the "Most Active Nicks" section on the stats page. Default 25 ActiveNicks2 ActiveNicks2 nicks to show in "These didn't make it.." Format = "mIRC" ActiveNicks2 = "25" ]]> Description With this option you can define how many nicks you want to appear in the "These didn't make it" section on the stats page. Default 30 MostNicksHistory MostNicksHistory maximum number of nicks to show in "most nicks" Format = "mIRC" MostNicksHistory = "2" ]]> Description With this option you can define how many nicks you want to appear in the "Most used nicks" section. Default 5 TopicHistory TopicHistory maximum number of topics to show Format = "mIRC" TopicHistory = "2" ]]> Description With this option you can define how many topics you want to appear in the "Latest topics" section. Default 3 UrlHistory UrlHistory maximum number of urls to show Format = "mIRC" UrlHistory = "2" ]]> Description With this option you can define how many urls you want to appear in the "Most referenced URLs" section. Default 5 WordHistory WordHistory maximum number of words to show Format = "mIRC" WordHistory = "5" ]]> Description With this option you can define how many words you want to appear in the "Most used words" section. Default 10 NickHistory NickHistory maximum number of nicks to show Format = "mIRC" NickHistory = "3" ]]> Description With this option you can define how many nicks you want to appear in the "Most referenced nicks" section. Default 5 LangFile LangFile filename of language file ]]> Description With this option you have an alternative way to define the name and/or path to the language file. Usually you don't have to touch this option. Default lang.txt NickTracking NickTracking track nickchanges and create aliases ]]> Description Enabling this option will track nickchanges as well as it can. It will then automatically create aliases for these nicks. Default 0 (disabled) LogType LogType type of log (not the format of the log) ]]> Description The type of logs kept for your channel. Currently only "Logfile" is supported, so you don't need to change this option. Default Logfile