From 35f50e358941c29e452d30aa89d0f49df67d2aff Mon Sep 17 00:00:00 2001 From: Antoine Jacquet Date: Mon, 5 Apr 2004 00:00:00 +0200 Subject: [PATCH] version 0.61 * russian support (thank you kamikaze) * manpage was rewritten in SGML, updated and restored --- CHANGELOG | 144 ++++++++++++------------- Makefile | 9 +- README | 2 +- irssistats.1 | 195 ++++++++++++++++++++++++++++++++++ irssistats.c | 50 ++++++++- irssistats.sgml | 271 ++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 593 insertions(+), 78 deletions(-) create mode 100644 irssistats.1 create mode 100644 irssistats.sgml diff --git a/CHANGELOG b/CHANGELOG index ecb08b7..2e16413 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ Change log file for irssistats +version 0.61 (2004-04-05) + * russian support (thank you kamikaze) + * manpage was rewritten in SGML, updated and restored + version 0.6 (2004-03-21) * no hard user limit anymore (dynamic table size) * alternate CSS themes @@ -7,74 +11,74 @@ version 0.6 (2004-03-21) * words/letters ranking * top words can be disabled to use less memory * old polish translation was restored - -version 0.51 (2003-12-14) - * bugfixes and polish language updated (thank you Jakub Jankowski) - * "CHARSET" is now a language parameter - * Internet Explorer specific bugfix in themes - -version 0.5 (2003-12-07) - * configuration file - * it is now possible to build multiple stats in one run - * customizable header and footer - * now produces XHTML with CSS templates as suggested by some users - * "grayscale" and "pisg" theme were added - * italian support (thank you Coviello Giuseppe) - * dutch support and BSD include patch (thank you Jeroen Ubbink) - * patch nickmode (thank you Philipp Haegi) - -version 0.44 (2003-05-25) - * finnish support (thank you Antti Huopana) - * minor updates - -version 0.43 (2002-11-24) - * manpage was added - * increased number of users - * "blue" theme was added - * improved Makefile - -version 0.42 (2002-11-16) - * W3C validated HTML - * better quote selection during nick alias - * auto refresh (suggested by Charles Blackburn) - -version 0.41 (2002-10-19) - * polish support (thank you Piotr Jarmuz) - * you can now ignore some users - * improved Makefile - * the # in channel name is not imposed anymore (to support "&channels") - * number of total days are now displayed - -version 0.4 (2002-10-14) - * nick alias support using regular expression - * some code fix - -version 0.32 (2002-09-30) - * german support (thank you Valentin Gelhorn) - -version 0.31 (2002-09-01) - * spanish support (thank you Alex) - * minor code changes - * bugfix : division by 0 (thank you Qball) - * better random topics / urls algorithm - -version 0.3 (2002-05-29) - * top users by time of day - * some big numbers - * some new themes - * increased number of users - * better HTML output - -version 0.2 (2002-05-16) - * languages support (currently english and french) - * themes support - * most used words - * now handles personal messages and "/me" - * parameters on command line - * some code change - * faster - * no more image when 0 lines - * maximum height for graph is now calculated - -version 0.1 (2002-05-01) + +version 0.51 (2003-12-14) + * bugfixes and polish language updated (thank you Jakub Jankowski) + * "CHARSET" is now a language parameter + * Internet Explorer specific bugfix in themes + +version 0.5 (2003-12-07) + * configuration file + * it is now possible to build multiple stats in one run + * customizable header and footer + * now produces XHTML with CSS templates as suggested by some users + * "grayscale" and "pisg" theme were added + * italian support (thank you Coviello Giuseppe) + * dutch support and BSD include patch (thank you Jeroen Ubbink) + * patch nickmode (thank you Philipp Haegi) + +version 0.44 (2003-05-25) + * finnish support (thank you Antti Huopana) + * minor updates + +version 0.43 (2002-11-24) + * manpage was added + * increased number of users + * "blue" theme was added + * improved Makefile + +version 0.42 (2002-11-16) + * W3C validated HTML + * better quote selection during nick alias + * auto refresh (suggested by Charles Blackburn) + +version 0.41 (2002-10-19) + * polish support (thank you Piotr Jarmuz) + * you can now ignore some users + * improved Makefile + * the # in channel name is not imposed anymore (to support "&channels") + * number of total days are now displayed + +version 0.4 (2002-10-14) + * nick alias support using regular expression + * some code fix + +version 0.32 (2002-09-30) + * german support (thank you Valentin Gelhorn) + +version 0.31 (2002-09-01) + * spanish support (thank you Alex) + * minor code changes + * bugfix : division by 0 (thank you Qball) + * better random topics / urls algorithm + +version 0.3 (2002-05-29) + * top users by time of day + * some big numbers + * some new themes + * increased number of users + * better HTML output + +version 0.2 (2002-05-16) + * languages support (currently english and french) + * themes support + * most used words + * now handles personal messages and "/me" + * parameters on command line + * some code change + * faster + * no more image when 0 lines + * maximum height for graph is now calculated + +version 0.1 (2002-05-01) * initial release \ No newline at end of file diff --git a/Makefile b/Makefile index aae279c..954a34d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ PRE = /usr/local BIN = $(PRE)/bin DAT = $(PRE)/share/irssistats/data -DOC = $(PRE)/doc/irssistats +DOC = $(PRE)/share/doc/irssistats +MAN = $(PRE)/share/man/man1 irssistats:irssistats.c gcc -o irssistats irssistats.c @@ -10,11 +11,13 @@ clean: rm -f irssistats install:irssistats - mkdir -p $(BIN) $(DAT) $(DOC) + mkdir -p $(BIN) $(DAT) $(DOC) $(MAN) cp -f irssistats $(BIN) cp -f data/* $(DAT) - cp -f COPYING README sample.nickfile sample.configfile $(DOC) + cp -f COPYING README sample.nickfile sample.configfile irssistats.sgml $(DOC) + cp -f irssistats.1 $(MAN) uninstall: rm -f $(BIN)/irssistats rm -rf $(DAT) $(DOC) + rm -f $(MAN)/irssistats.1 diff --git a/README b/README index 53a1565..d9c58ea 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -irssistats 0.6 +irssistats 0.61 site: http://royale.zerezo.com/irssistats/ mail: royale@zerezo.com diff --git a/irssistats.1 b/irssistats.1 new file mode 100644 index 0000000..16fd0a7 --- /dev/null +++ b/irssistats.1 @@ -0,0 +1,195 @@ +.\" $Header: /aolnet/dev/src/CVS/sgml/docbook-to-man/cmd/docbook-to-man.sh,v 1.1.1.1 1998/11/13 21:31:59 db3l Exp $ +.\" +.\" transcript compatibility for postscript use. +.\" +.\" synopsis: .P! +.\" +.de P! +.fl +\!!1 setgray +.fl +\\&.\" +.fl +\!!0 setgray +.fl \" force out current output buffer +\!!save /psv exch def currentpoint translate 0 0 moveto +\!!/showpage{}def +.fl \" prolog +.sy sed -e 's/^/!/' \\$1\" bring in postscript file +\!!psv restore +. +.de pF +.ie \\*(f1 .ds f1 \\n(.f +.el .ie \\*(f2 .ds f2 \\n(.f +.el .ie \\*(f3 .ds f3 \\n(.f +.el .ie \\*(f4 .ds f4 \\n(.f +.el .tm ? font overflow +.ft \\$1 +.. +.de fP +.ie !\\*(f4 \{\ +. ft \\*(f4 +. ds f4\" +' br \} +.el .ie !\\*(f3 \{\ +. ft \\*(f3 +. ds f3\" +' br \} +.el .ie !\\*(f2 \{\ +. ft \\*(f2 +. ds f2\" +' br \} +.el .ie !\\*(f1 \{\ +. ft \\*(f1 +. ds f1\" +' br \} +.el .tm ? font underflow +.. +.ds f1\" +.ds f2\" +.ds f3\" +.ds f4\" +'\" t +.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n +.TH "IRSSISTATS" "1" +.SH "NAME" +irssistats \(em A tool to generate HTML IRC stats based on irssi logs. +.SH "SYNOPSIS" +.PP +\fBirssistats\fR [\fB\fI/path/to/file.conf\fR\fP] +.SH "DESCRIPTION" +.PP +\fBirssistats\fR is a tool that make HTML stats from \fBirssi\fR logfiles. +.PP +The statistics generated display many useful and funny informations about the channel. +.SH "USING IT" +.PP +First you need to copy the files needed for the HTML page : +.PP +\fBcp /usr/share/irssistats/data/* /path/to/webdir/\fR +.PP +Then you must edit a configuration file : "/etc/irssistats.conf", "~/.irssistats", or another file given as a parameter. +.PP +Now you can generate the statistics for your channel : +.PP +\fBirssistats \fB\fI[/path/to/file.conf]\fR\fP\fR +.PP +The logfiles for \fBirssi\fR are usually located in "~/irclogs/network/channel.log" +.SH "CONFIGURATION FILE" +.PP +Please look at the sample configuration file in "/usr/share/docs/irssistats/sample.configfile" for an example. +.PP +The path to the configuration file can be given on the command line : \fBirssistats\fR \fI/path/to/irssistats.conf\fR +.PP +If no configuration file is given, irssistats looks for files ~/.irssistats.conf or then /etc/irssistats.conf +.PP +Lines starting by ; # -- or // are ignored (comments). +.PP +This file is read sequencially, so it acts like a script. +.PP +Each option keyword is case sensitive, and you must put separators around the ':' character. +.PP +Blank lines must not contain any spaces ! +.PP +Each option keeps its value until erased by another value. +.PP +IMPORTANT : the order of options to parse a channel must allways be "input" THEN "nickfile" THEN "output". +.PP +Available options are : +.IP "debug" 10 +Allows you to display debugging informations. +.IP "" 10 +Values : normal / verbose / none +.IP "" 10 +Default : normal +.IP "channel" 10 +Specifies the name of the channel you are parsing. +.IP "maintainer" 10 +Nickname of the person generating the statistics (you !). +.IP "language" 10 +Language you want to use to display the statistics +.IP "" 10 +Values : fr en de du es it fi ru +.IP "" 10 +Default : en +.IP "theme" 10 +Theme (colors) to use for the statistics, separated by comas +.IP "" 10 +In fact this is the name of the CSS file to include. +.IP "" 10 +This option has no effect if you use a custom header : you'll have to include the CSS yourself. +.IP "" 10 +The first theme is the primary stylesheet, and the others are alternate themes +.IP "top_words" 10 +Allows you to disable top words list which is using a lot of memory +.IP "" 10 +Default : yes +.IP "ranking" 10 +Specifies which ranking method to use +.IP "" 10 +Values : lines / words / letters +.IP "" 10 +Default : lines +.IP "quarter" 10 +Display quarters in top hours (smoother graphs) +.IP "" 10 +Default : no +.IP "refresh_time" 10 +Specifies the refresh time in seconds (0 to disable) +.IP "" 10 +This option has no effect if you use a custom header : you'll have to include the refresh code yourself. +.IP "" 10 +Default : 3600 +.IP "w3c_link" 10 +Set this to "no" if you don't want the W3C logo. +.IP "" 10 +Default : yes +.IP "header" 10 +Use your custom header file (HTML code between included) +.IP "footer" 10 +Use your custom footer file (HTML code between and included) +.IP "input" 10 +This allow you to parse a file. +.IP "" 10 +Note that irssistats will really parse the file as soon as it reads this option. +.IP "nickfile" 10 +This allow you to group nick using a nickfile. +.IP "" 10 +Note that irssistats will really merge the nicks as soon as it reads this option. +.IP "output" 10 +This allow you to generate the HTML file. +.IP "" 10 +Note that irssistats will really generate the HTML file as soon as it reads this option. +.SH "NICKFILE" +.PP +Since version 0.4 of \fBirssistats\fR, you can use a nickfile to specify nicks to join. +.PP +Each line of the nickfile contains the final nick and a regular expression. +.PP +Examples : +.IP "royale \(a^[Rr]oyale" 10 +join nicks starting with "Royale" or "royale" to the final nick "royale" +.IP "royale \(a^antoine$" 10 +also join the nick "antoine" to the final nick "royale" +.IP "djakette [Dd]ja" 10 +join any nick that contains "Dja" or "dja" to final nick "djakette" +.IP " \(a^bot\|royale$" 10 +remove "bot|royale" from statistics +.PP +The nickfile must not contain any comments. +.PP +The final nick will remove matching nicks from all statistics, except from "Some URLs" and "Some topics"... +.PP +You can also take a look at the "sample.nickfile" in this package (in "/usr/share/doc/irssistats/"). +.SH "SEE ALSO" +.PP +\fBirssi\fR (1). +.SH "INFORMATIONS" +.PP +You can find informations and updates of \fBirssistats\fR at \fIhttp://royale.zerezo.com/irssistats/ (link to URL http://royale.zerezo.com/irssistats/) \fR. +.PP +Report bugs to royale@zerezo.com. +.SH "AUTHOR" +.PP +Antoine Jacquet royale@zerezo.com +.\" created by instant / docbook-to-man, Mon 05 Apr 2004, 00:56 diff --git a/irssistats.c b/irssistats.c index 7bb52cf..662e150 100644 --- a/irssistats.c +++ b/irssistats.c @@ -1,5 +1,5 @@ /* - * irssistats version 0.6 + * irssistats version 0.61 * * This tool generates IRC stats based on irssi logs. * Usage: irssistats [/path/to/file.conf] @@ -43,7 +43,7 @@ #define MINWORDLENGTH 5 /* irssistats */ -#define VERSION "0.6" +#define VERSION "0.61" #define URL "http://royale.zerezo.com/irssistats/" /* Counters */ @@ -64,7 +64,7 @@ char *counters[NBCOUNTERS]={"C_SMILE","C_FROWN","C_EXCLAM","C_QUESTION","C_ME","C_TOPIC","C_MODE","C_KICK","C_KICKED","C_URL","C_JOIN","C_NICK","C_MONOLOGUE"}; /* Languages */ -#define NBLANGUAGES 9 +#define NBLANGUAGES 10 #define NBKEYS 39 char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and abbreviation */ { @@ -452,7 +452,49 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { "C_JOIN", "twijfelt tussen blijven of gaan" }, { "C_NICK", "verandert vaak van nick" }, { "C_MONOLOGUE", "spreekt veel monologen" } - } + }, + { /* Russian language */ + { "Russian", "ru" }, + { "CHARSET", "KOI8-R" }, + { "HEADER", "óÔÁÔÉÓÔÉËÁ ÄÌÑ %s ÏÔ %s" }, + { "LEGEND", "ïÂÏÚÎÁÞÅÎÉÑ" }, + { "LASTDAYS", "óÔÁÔÉÓÔÉËÁ ÐÏÓÌÅÄÎÉÈ ÄÎÅÊ" }, + { "TOPHOURS", "ðÏÞÁÓÏ×ÁÑ ÓÔÁÔÉÓÔÉËÁ" }, + { "TOPUSERS", "áËÔÉ×ÎÅÊÛÉÅ ÌÀÄÉ" }, + { "OTHERS", "ïÓÔÁÌÏÓØ %d ÎÅÐÏÄÓÞÉÔÁÎÙÈ..." }, + { "NBLINES", "ÓÔÒÏËÉ" }, + { "NICK", "ÎÉË" }, + { "AVGLETTERS", "ÂÕË×Ù/ÓÔÒÏËÉ" }, + { "HOURS", "ÞÁÓÙ" }, + { "QUOTE", "ÓÌÕÞÁÊÎÏÅ ÓÏÏÂÝÅÎÉÅ" }, + { "TOPUSERSTIME", "áËÔÉ×ÎÅÊÛÉÅ ÌÀÄÉ ÐÏ ×ÒÅÍÅÎÉ ÄÎÑ" }, + { "RANDTOPICS", "îÅÓËÏÌØËÏ ÔÏÐÉËÏ×" }, + { "CHANGEDBY", "ÉÚÍÅΣÎ" }, + { "NEWTOPIC", "ÎÏ×ÙÊ ÔÏÐÉË" }, + { "RANDURLS", "îÅÓËÏÌØËÏ URLÏ×" }, + { "POSTEDBY", "ÏÐÕÂÌÉËÏ×ÁÌ" }, + { "POSTEDURL", "URL" }, + { "TOPWORDS", "þÁÓÔÏ ÉÓÐÏÌØÚÕÅÍÙÅ ÓÌÏ×Á" }, + { "WORD", "ÓÌÏ×Ï" }, + { "OCCURRENCES", "ÐÒÏÉÛÅÓÔ×ÉÑ" }, + { "BIGNUMBERS", "îÅÓËÏÌØËÏ ÂÏÌØÛÉÈ ÞÉÓÅÌ..." }, + { "NUMBERS", "ÞÉÓÌÁ" }, + { "TIME", "%d ÓÔÒÏË (%d ÄÎÅÊ) ÏÂÒÁÂÏÔÁÎÏ ÚÁ %d ÓÅËÕÎÄ" }, + { "FOOTER", "óÔÁÔÉÓÔÉËÁ ÓÇÅÎÅÒÉÒÏ×ÁÎÁ" }, + { "C_SMILE", "ÞÁÓÔÏ ÓÞÁÓÌÉ× :)" }, + { "C_FROWN", "ÞÁÓÔÏ ÎÅÓÞÁÓÔÅÎ :(" }, + { "C_EXCLAM", "ÍÎÏÇÏ ×ÏÓËÌÉÃÁÅÔ !" }, + { "C_QUESTION", "ÚÁÄÁ£Ô ÍÎÏÇÏ ×ÏÐÒÏÓÏ× ?" }, + { "C_ME", "ÌÀÂÉÔ /me command" }, + { "C_TOPIC", "ÞÁÓÔÏ ÍÅÎÑÅÔ ÔÏÐÉË" }, + { "C_MODE", "ÞÁÓÔÏ ÍÅÎÑÅÔ ÒÅÖÉÍÙ" }, + { "C_KICK", "ÌÀÂÉÔ /kick" }, + { "C_KICKED", "ÞÁÓÔÏ ×ÙËÉÄÙ×ÁÀÔ" }, + { "C_URL", "ÐÕÂÌÉËÕÅÔ ÍÎÏÇÏ URLÏ×" }, + { "C_JOIN", "ÎÅ ÚÎÁÅÔ - ÏÓÔÁÔØÓÑ ÉÌÉ ÕÊÔÉ" }, + { "C_NICK", "ÞÁÓÔÏ ÍÅÎÑÅÔ Ó×ÏÊ ÎÉË" }, + { "C_MONOLOGUE", "éÓÐÏÌØÚÕÅÔ ÍÎÏÇÏ ÍÏÎÏÌÏÇÏ×" } + } }; int language=0; /* default to english */ diff --git a/irssistats.sgml b/irssistats.sgml new file mode 100644 index 0000000..586cec1 --- /dev/null +++ b/irssistats.sgml @@ -0,0 +1,271 @@ + + JACQUET"> + ANTOINE"> + + april 4, 2004"> + + 1"> + royale@zerezo.com"> + + IRSSISTATS"> + + + Debian"> + GNU"> + GPL"> +]> + + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2004 + &dhusername; + + &dhdate; +
+ + + &dhucpackage; + &dhsection; + + + + &dhpackage; + A tool to generate HTML IRC stats based on irssi logs. + + + + + &dhpackage; + + + + + + DESCRIPTION + irssistats is a tool that make HTML stats from irssi logfiles. + The statistics generated display many useful and funny informations about the channel. + + + + USING IT + First you need to copy the files needed for the HTML page : + cp /usr/share/irssistats/data/* /path/to/webdir/ + Then you must edit a configuration file : "/etc/irssistats.conf", "~/.irssistats", or another file given as a parameter. + Now you can generate the statistics for your channel : + irssistats + The logfiles for irssi are usually located in "~/irclogs/network/channel.log" + + + + + CONFIGURATION FILE + Please look at the sample configuration file in "/usr/share/docs/irssistats/sample.configfile" for an example. + The path to the configuration file can be given on the command line : irssistats /path/to/irssistats.conf + If no configuration file is given, irssistats looks for files ~/.irssistats.conf or then /etc/irssistats.conf + Lines starting by ; # -- or // are ignored (comments). + This file is read sequencially, so it acts like a script. + Each option keyword is case sensitive, and you must put separators around the ':' character. + Blank lines must not contain any spaces ! + Each option keeps its value until erased by another value. + IMPORTANT : the order of options to parse a channel must allways be "input" THEN "nickfile" THEN "output". + + Available options are : + + + + + debug + + Allows you to display debugging informations. + Values : normal / verbose / none + Default : normal + + + + + channel + Specifies the name of the channel you are parsing. + + + + maintainer + Nickname of the person generating the statistics (you !). + + + + language + + Language you want to use to display the statistics + Values : fr en de du es it fi ru + Default : en + + + + + theme + + Theme (colors) to use for the statistics, separated by comas + In fact this is the name of the CSS file to include. + This option has no effect if you use a custom header : you'll have to include the CSS yourself. + The first theme is the primary stylesheet, and the others are alternate themes + + + + + top_words + + Allows you to disable top words list which is using a lot of memory + Default : yes + + + + + ranking + + Specifies which ranking method to use + Values : lines / words / letters + Default : lines + + + + + quarter + + Display quarters in top hours (smoother graphs) + Default : no + + + + + refresh_time + + Specifies the refresh time in seconds (0 to disable) + This option has no effect if you use a custom header : you'll have to include the refresh code yourself. + Default : 3600 + + + + + w3c_link + + Set this to "no" if you don't want the W3C logo. + Default : yes + + + + + header + Use your custom header file (HTML code between <!DOCTYPE... and <body> included) + + + + footer + Use your custom footer file (HTML code between </body> and </html> included) + + + + + input + + This allow you to parse a file. + Note that irssistats will really parse the file as soon as it reads this option. + + + + + nickfile + + This allow you to group nick using a nickfile. + Note that irssistats will really merge the nicks as soon as it reads this option. + + + + + output + + This allow you to generate the HTML file. + Note that irssistats will really generate the HTML file as soon as it reads this option. + + + + + + + + + + NICKFILE + Since version 0.4 of irssistats, you can use a nickfile to specify nicks to join. + Each line of the nickfile contains the final nick and a regular expression. + Examples : + + + royale ˆ[Rr]oyale + join nicks starting with "Royale" or "royale" to the final nick "royale" + + + royale ˆantoine$ + also join the nick "antoine" to the final nick "royale" + + + djakette [Dd]ja + join any nick that contains "Dja" or "dja" to final nick "djakette" + + + <NULL> ˆbot\|royale$ + remove "bot|royale" from statistics + + + The nickfile must not contain any comments. + The <NULL> final nick will remove matching nicks from all statistics, except from "Some URLs" and "Some topics"... + You can also take a look at the "sample.nickfile" in this package (in "/usr/share/doc/irssistats/"). + + + + + SEE ALSO + irssi (1). + + + + INFORMATIONS + You can find informations and updates of irssistats at http://royale.zerezo.com/irssistats/. + Report bugs to &dhemail;. + + + + AUTHOR + Antoine Jacquet &dhemail; + + +
+ + + + -- 2.20.1