From: Antoine Jacquet Date: Sat, 5 Feb 2005 23:00:00 +0000 (+0100) Subject: version 0.70 X-Git-Tag: v0.70 X-Git-Url: http://royale.zerezo.com/git/?a=commitdiff_plain;h=72d7b5ef1a002846613b81ac4a77df963e483b74;p=irssistats version 0.70 * Makefile was improved to easily build packages * Windows binaries are now available * patch to make parsing more robust and dutch translation updated (thank you Wouter Horré) * added an option to display pictures for the users * added the irssistats logo with an option to hide it * expand the "~" character in configuration file to the home directory * added 3 themes : biseau, damier and niflheim * gcc optimization to speed up irssistats --- diff --git a/CHANGELOG b/CHANGELOG index 7720b67..6a5c7ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,15 @@ Change log file for irssistats +version 0.70 (2005-06-01) + * Makefile was improved to easily build packages + * Windows binaries are now available + * patch to make parsing more robust and dutch translation updated (thank you Wouter Horré) + * added an option to display pictures for the users + * added the irssistats logo with an option to hide it + * expand the "~" character in configuration file to the home directory + * added 3 themes : biseau, damier and niflheim + * gcc optimization to speed up irssistats + version 0.62 (2004-05-03) * estonian support (thank you Martin Vool) diff --git a/Makefile b/Makefile index 954a34d..e9e6f92 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +VER = 0.70 PRE = /usr/local BIN = $(PRE)/bin DAT = $(PRE)/share/irssistats/data @@ -5,10 +6,12 @@ DOC = $(PRE)/share/doc/irssistats MAN = $(PRE)/share/man/man1 irssistats:irssistats.c - gcc -o irssistats irssistats.c + gcc -O2 -o irssistats irssistats.c clean: - rm -f irssistats + rm -f irssistats irssistats.exe + rm -f build-stamp configure-stamp debian/irssistats.substvars debian/files + rm -rf debian/irssistats rpm/BUILD rpm/SPECS rpm/SOURCES rpm/SRPMS rpm/RPMS install:irssistats mkdir -p $(BIN) $(DAT) $(DOC) $(MAN) @@ -21,3 +24,20 @@ uninstall: rm -f $(BIN)/irssistats rm -rf $(DAT) $(DOC) rm -f $(MAN)/irssistats.1 + +tar: clean + cd .. && tar zcvf irssistats-$(VER).tar.gz irssistats-$(VER) + +rpm: tar + mkdir -p rpm/BUILD rpm/SPECS rpm/SOURCES rpm/SRPMS rpm/RPMS + rpm -ta ../irssistats-$(VER).tar.gz --define "_topdir `pwd`/rpm" + cp rpm/*/*.rpm rpm/*/*/*.rpm .. + +deb: clean + dpkg-buildpackage -us -uc -rfakeroot + +win: irssistats.c + i586-mingw32msvc-gcc -O2 -o irssistats.exe irssistats.c + cd .. && zip -r irssistats-$(VER).zip irssistats-$(VER)/{irssistats.exe,README,CHANGELOG,COPYING,irssistats.sgml,sample.configfile,sample.nickfile,data} + +dist: tar rpm deb win \ No newline at end of file diff --git a/README b/README index eda71da..ec98bd5 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -irssistats 0.62 +irssistats 0.70 site: http://royale.zerezo.com/irssistats/ mail: royale@zerezo.com @@ -26,8 +26,14 @@ The nickfile must not contain any comments. The 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. +photofile: +Since version 0.70 of irssistats, you can use a photofile to display pictures for users. +Each line of the photofile contains the final nick and an URL for the image. +Examples : + royale http://royale.zerezo.com/chat/faces/happy40.png (a full address) + sektor ../chat/faces/happy40.png (a relative address) + links: -http://torus.lnet.lut.fi/ircstats/ +http://tnsp.org/fisg.php http://pisg.sourceforge.net/ -http://users.pandora.be/becquart/cisg/ http://netti.nic.fi/~mauvinen/mircstats/ diff --git a/data/biseau.css b/data/biseau.css new file mode 100644 index 0000000..e0f8333 --- /dev/null +++ b/data/biseau.css @@ -0,0 +1,137 @@ +/* "biseau" theme from Pronostiks.com */ + +body { + background: #ddddee; + text-align: center; +} + +#irssistats * { + font-family: tahoma; + font-size: 9pt; +} + +#irssistats { + width: 89%; + margin: auto; +} + +#irssistats h1, #irssistats h2 { + font-weight: bold; + padding-left: 5px; + margin: 0; +} + +#irssistats h1 { + color: #6b78a4; + font-size: 18pt; +} + +#irssistats h2 { + color: #ffffff; + font-size: 10pt; + height: 18px; + background: #6b78a4 url('biseau_corner1.gif'); + background-repeat: no-repeat; + background-position: top right; + padding-right: 8px; +} + +#irssistats_legend td { + text-align: left; +} + +#irssistats_legend, #irssistats_lastdays, #irssistats_tophours, #irssistats_topusers, #irssistats_topuserstime, #irssistats_randtopics, #irssistats_randurls, #irssistats_topwords, #irssistats_bignumbers { + background: #ffffff; + margin: 10px; + text-align: center; + border-bottom: 2px #6b78a4 solid; +} + +#irssistats table { + width: 100%; + border-left: 6px #6b78a4 double; + border-right: 2px #6b78a4 solid; + margin: 0; + padding: 15px; +} + +#irssistats_topusers td, #irssistats_topuserstime td, #irssistats_randtopics td, #irssistats_randurls td, #irssistats_topwords td, #irssistats_bignumbers td { + border: 1px #6b78a4 solid; + text-align: center; +} + +#irssistats th { + height: 18px; + background: #ddddee url('biseau_corner4.gif'); + background-repeat: no-repeat; + background-position: top right; + padding-right: 8px; + border: 0; +} + +#irssistats_legend p, #irssistats_lastdays p, #irssistats_tophours p, #irssistats_topusers p, #irssistats_topuserstime p, #irssistats_randtopics p, #irssistats_randurls p, #irssistats_topwords p, #irssistats_bignumbers p { + border-left: 6px #6b78a4 double; + border-right: 2px #6b78a4 solid; + margin: 0; + padding: 15px; +} + +#irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { + float: left; + height: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { + width: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.h1, #irssistats div.v1 { + background: #6b78a4; +} + +#irssistats div.h2, #irssistats div.v2 { + background: #8899cc; +} + +#irssistats div.h3, #irssistats div.v3 { + background: #aabbdd; +} + +#irssistats div.h4, #irssistats div.v4 { + background: #ddddee; +} + +#irssistats div.hm, #irssistats div.vm { + background: #888888 url('biseau_corner4.gif'); + background-repeat: no-repeat; + background-position: top right; +} + +#irssistats A { + color: #5a658a; + text-decoration: none; +} + +#irssistats A:hover { + text-decoration: underline; +} + +#irssistats img { + border: 0; +} + +#irssistats small { + font-size: 7pt; +} + +#irssistats .tdphoto { + text-align: center; +} \ No newline at end of file diff --git a/data/biseau_corner1.gif b/data/biseau_corner1.gif new file mode 100644 index 0000000..8daef2b Binary files /dev/null and b/data/biseau_corner1.gif differ diff --git a/data/biseau_corner2.gif b/data/biseau_corner2.gif new file mode 100644 index 0000000..e17fb10 Binary files /dev/null and b/data/biseau_corner2.gif differ diff --git a/data/biseau_corner3.gif b/data/biseau_corner3.gif new file mode 100644 index 0000000..315feca Binary files /dev/null and b/data/biseau_corner3.gif differ diff --git a/data/biseau_corner4.gif b/data/biseau_corner4.gif new file mode 100644 index 0000000..620e53f Binary files /dev/null and b/data/biseau_corner4.gif differ diff --git a/data/blue.css b/data/blue.css index 8d5ff28..89bb80d 100644 --- a/data/blue.css +++ b/data/blue.css @@ -5,9 +5,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; - margin: 0; + margin: 0; } #irssistats A { @@ -19,32 +19,32 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; color: #8888FF; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; color: #AAAAFF; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #CCCCFF; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #EEEEFF; } @@ -53,7 +53,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -62,74 +62,86 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_white.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/damier.css b/data/damier.css new file mode 100644 index 0000000..393678d --- /dev/null +++ b/data/damier.css @@ -0,0 +1,138 @@ +/* "damier" theme from Pronostiks.com */ + +body { + background: url('damier_background.gif'); + text-align: center; +} + +#irssistats * { + font-family: verdana; + font-size: 9pt; +} + +#irssistats { + width: 860px; + margin: auto; +} + +#irssistats h1 { + font-size: 20pt; +} + +#irssistats h2 { + font-weight: bold; + background: url('damier_title.png'); + background-repeat: no-repeat; + border-bottom: 1px black solid; + padding-left: 5px; + margin: 0; +} + +#irssistats_legend td { + text-align: left; +} + +#irssistats_legend, #irssistats_lastdays, #irssistats_tophours, #irssistats_topusers, #irssistats_topuserstime, #irssistats_randtopics, #irssistats_randurls, #irssistats_topwords, #irssistats_bignumbers { + background: #ffffff; + border: 1px black solid; + -moz-border-radius-topright: 20px; + -moz-border-radius-bottomleft: 20px; + -moz-border-radius-bottomright: 20px; + margin-bottom: 20px; +} + +#irssistats A { + color: #a35800; + text-decoration: none; +} + +#irssistats A:hover { + text-decoration: underline; +} + +.box_content { + padding: 10px; + text-align: center; +} + +#irssistats table { + width: 800px; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; +} + +#irssistats_topusers td, #irssistats_topuserstime td, #irssistats_randtopics td, #irssistats_randurls td, #irssistats_topwords td, #irssistats_bignumbers td { + border: 1px #aaaaaa solid; + text-align: center; + -moz-border-radius: 4px; +} + +#irssistats th { + border: 1px black solid; + background: url('damier_title.png'); + background-repeat: no-repeat; +} + +#irssistats img { + border: 0; +} + +#irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { + float: left; + height: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { + width: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.h1, #irssistats div.v1 { + background: #fbc282; +} + +#irssistats div.h2, #irssistats div.v2 { + background: #fbcf9b; +} + +#irssistats div.h3, #irssistats div.v3 { + background: #fddbb3; +} + +#irssistats div.h4, #irssistats div.v4 { + background: #fde7ce; +} + +#irssistats div.hm, #irssistats div.vm { + background: #dddddd; +} + +#irssistats small { + font-size: 5.5pt; +} + +#irssistats .logo { + padding: 10px; + background: #ffffff url('irssistats_white.png'); + background-repeat: no-repeat; + background-position: center; + width: 364px; + height: 44px; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + border: 3px black double; + -moz-border-radius: 20px; +} + +#irssistats .tdphoto { + text-align: center; +} \ No newline at end of file diff --git a/data/damier_background.gif b/data/damier_background.gif new file mode 100644 index 0000000..85b6696 Binary files /dev/null and b/data/damier_background.gif differ diff --git a/data/damier_title.png b/data/damier_title.png new file mode 100644 index 0000000..851b159 Binary files /dev/null and b/data/damier_title.png differ diff --git a/data/dark.css b/data/dark.css index 0bf47ba..86676fd 100644 --- a/data/dark.css +++ b/data/dark.css @@ -5,9 +5,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; - margin: 0; + margin: 0; } #irssistats A { @@ -19,35 +19,35 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { color: #AAAAFF; - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; } #irssistats h2 { color: #FFAAAA; - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #552222; - border: 1px #774444 solid; + border: 1px #774444 solid; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #225522; - border: 1px #447744 solid; + border: 1px #447744 solid; } #irssistats td.oneline { @@ -55,7 +55,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -64,74 +64,86 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_black.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/default.css b/data/default.css index b36f313..0cfc58e 100644 --- a/data/default.css +++ b/data/default.css @@ -5,39 +5,39 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; - margin: 0; + margin: 0; } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #FFEEEE; - border: 1px #FFCCCC solid; + border: 1px #FFCCCC solid; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #EEEEEE; - border: 1px #CCCCCC solid; + border: 1px #CCCCCC solid; } #irssistats td.oneline { @@ -45,7 +45,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -54,74 +54,86 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_white.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/grayscale.css b/data/grayscale.css index e739063..f4dee01 100644 --- a/data/grayscale.css +++ b/data/grayscale.css @@ -17,9 +17,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; - margin: 0; + margin: 0; } #irssistats A { @@ -32,33 +32,33 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; color: #000000; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; color: #555555; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; color: #ffffff; background: #555555; } #irssistats td { - font-size: 8pt; + font-size: 8pt; background: #ffffff; border: 1px #cccccc dotted; } @@ -68,7 +68,7 @@ body { } #irssistats small { - font-size: 6pt; + font-size: 6pt; } #irssistats table { @@ -77,44 +77,52 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1, #irssistats div.v1 { - background: #000000; + background: #000000; } #irssistats div.h2, #irssistats div.v2 { - background: #777777; + background: #777777; } #irssistats div.h3, #irssistats div.v3 { - background: #aaaaaa; + background: #aaaaaa; } #irssistats div.h4, #irssistats div.v4 { - background: #dddddd; + background: #dddddd; } #irssistats div.hm, #irssistats div.vm { - background: #888888; + background: #888888; } + +#irssistats div.logo { + display: none; +} + +#irssistats .tdphoto { + text-align: center; +} \ No newline at end of file diff --git a/data/namour.css b/data/namour.css index db74b22..1d109fe 100644 --- a/data/namour.css +++ b/data/namour.css @@ -5,9 +5,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #DDAAFF; - margin: 0; + margin: 0; } #irssistats A { @@ -19,32 +19,32 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; color: #FFC8C8; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; color: #FFC8C8; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #550088; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #7711AA; } @@ -53,7 +53,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -62,74 +62,82 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + display: none; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/niflheim.css b/data/niflheim.css new file mode 100644 index 0000000..17e7ea4 --- /dev/null +++ b/data/niflheim.css @@ -0,0 +1,149 @@ +/* Black background */ + +body { + background: #000000; +} + +#irssistats * { + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #FFFFFF; + margin: 0; +} + +#irssistats A { + color: #FFFFFF; +} + +#irssistats A:hover { + color: #FFFFFF; +} + +#irssistats img { + border: 0; +} + +#irssistats h1 { + color: #FFFFFF; + font-size: 20pt; + margin-bottom: 10px; +} + +#irssistats h2 { + color: #FFFFFF; + font-size: 15pt; + margin-bottom: 5px; +} + +#irssitats p { + font-size: 10pt; +} + +#irssistats th { + font-size: 9pt; + background: #552222; + border: 1px #774444 solid; +} + +#irssistats td { + font-size: 9pt; + background: #333333; + border: 1px #424242 solid; +} + +#irssistats td.oneline { + width: 100px; +} + +#irssistats small { + font-size: 7pt; +} + +#irssistats table { + margin-left: auto; + margin-right: auto; +} + +#irssistats div { + padding: 10px; + margin: 10px; + text-align: center; +} + +#irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { + float: left; + height: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { + width: 15px; + margin: 0; + padding: 0; + border: 0; + font-size: 0; +} + +#irssistats div.h1 { + background: #0000ff; + background: url('h1.png'); +} + +#irssistats div.h2 { + background: #00ff00; + background: url('h2.png'); +} + +#irssistats div.h3 { + background: #ffff00; + background: url('h3.png'); +} + +#irssistats div.h4 { + background: #ff0000; + background: url('h4.png'); +} + +#irssistats div.hm { + background: #ff00ff; + background: url('hm.png'); +} + +#irssistats div.v1 { + background: #0000ff; + background: url('v1.png'); +} + +#irssistats div.v2 { + background: #00ff00; + background: url('v2.png'); +} + +#irssistats div.v3 { + background: #ffff00; + background: url('v3.png'); +} + +#irssistats div.v4 { + background: #ff0000; + background: url('v4.png'); +} + +#irssistats div.vm { + background: #ff00ff; + background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_white.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; +} \ No newline at end of file diff --git a/data/pisg.css b/data/pisg.css index e4fb009..063409d 100644 --- a/data/pisg.css +++ b/data/pisg.css @@ -15,7 +15,7 @@ body { font-family: Verdana, Arial, sans-serif; font-size: 13px; color: black; - margin: 0; + margin: 0; } #irssistats a { @@ -36,7 +36,7 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { @@ -56,7 +56,7 @@ body { } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { @@ -106,68 +106,76 @@ body { } #irssistats div { - margin-bottom: 20px; - text-align: center; + margin-bottom: 20px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; - margin: auto; + margin: auto; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('pisg_blue-h.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('pisg_green-h.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('pisg_yellow-h.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('pisg_red-h.png'); } #irssistats div.hm { - background: #dd00dd; + background: #dd00dd; } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('pisg_blue-v.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('pisg_green-v.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('pisg_yellow-v.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('pisg_red-v.png'); +} + +#irssistats div.logo { + display: none; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/zeduel.css b/data/zeduel.css index 6706b61..1890139 100644 --- a/data/zeduel.css +++ b/data/zeduel.css @@ -5,9 +5,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; - margin: 0; + margin: 0; } #irssistats A { @@ -19,32 +19,32 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; color: #C05A00; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; color: #FF7700; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #FF7700; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #FFEEEE; } @@ -53,7 +53,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -62,74 +62,86 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_white.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/data/zerezo.css b/data/zerezo.css index a34612b..c809c43 100644 --- a/data/zerezo.css +++ b/data/zerezo.css @@ -5,9 +5,9 @@ body { } #irssistats * { - font-family: Verdana, Arial, Helvetica, sans-serif; + font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; - margin: 0; + margin: 0; } #irssistats A { @@ -19,35 +19,35 @@ body { } #irssistats img { - border: 0; + border: 0; } #irssistats h1 { - font-size: 20pt; + font-size: 20pt; margin-bottom: 10px; color: #0CBA18; } #irssistats h2 { - font-size: 15pt; + font-size: 15pt; margin-bottom: 5px; color: #84DB8C; } #irssitats p { - font-size: 10pt; + font-size: 10pt; } #irssistats th { - font-size: 9pt; + font-size: 9pt; background: #0B810B; - border: 1px #006600 solid; + border: 1px #006600 solid; } #irssistats td { - font-size: 9pt; + font-size: 9pt; background: #085D10; - border: 1px #003300 solid; + border: 1px #003300 solid; } #irssistats td.oneline { @@ -55,7 +55,7 @@ body { } #irssistats small { - font-size: 7pt; + font-size: 7pt; } #irssistats table { @@ -64,74 +64,86 @@ body { } #irssistats div { - padding: 10px; - margin: 10px; - text-align: center; + padding: 10px; + margin: 10px; + text-align: center; } #irssistats div.h1, #irssistats div.h2, #irssistats div.h3, #irssistats div.h4, #irssistats div.hm { - float: left; - height: 15px; - margin: 0; - padding: 0; + float: left; + height: 15px; + margin: 0; + padding: 0; border: 0; font-size: 0; } #irssistats div.v1, #irssistats div.v2, #irssistats div.v3, #irssistats div.v4, #irssistats div.vm { - width: 15px; - margin: 0; - padding: 0; - border: 0; + width: 15px; + margin: 0; + padding: 0; + border: 0; font-size: 0; } #irssistats div.h1 { - background: #0000ff; + background: #0000ff; background: url('h1.png'); } #irssistats div.h2 { - background: #00ff00; + background: #00ff00; background: url('h2.png'); } #irssistats div.h3 { - background: #ffff00; + background: #ffff00; background: url('h3.png'); } #irssistats div.h4 { - background: #ff0000; + background: #ff0000; background: url('h4.png'); } #irssistats div.hm { - background: #ff00ff; + background: #ff00ff; background: url('hm.png'); } #irssistats div.v1 { - background: #0000ff; + background: #0000ff; background: url('v1.png'); } #irssistats div.v2 { - background: #00ff00; + background: #00ff00; background: url('v2.png'); } #irssistats div.v3 { - background: #ffff00; + background: #ffff00; background: url('v3.png'); } #irssistats div.v4 { - background: #ff0000; + background: #ff0000; background: url('v4.png'); } #irssistats div.vm { - background: #ff00ff; + background: #ff00ff; background: url('vm.png'); +} + +#irssistats div.logo { + background: url('irssistats_black.png'); + width: 364px; + height: 44px; + margin: auto; + padding: 0; +} + +#irssistats .tdphoto { + text-align: center; } \ No newline at end of file diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..6183d33 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,24 @@ +irssistats (0.70-1) unstable; urgency=low + + * New upstream version. + + -- Antoine Jacquet Sat, 5 Feb 2005 23:44:14 +0100 + +irssistats (0.62-1) unstable; urgency=low + + * New upstream version. + + -- Antoine Jacquet Wed, 3 May 2004 22:10:45 +0100 + +irssistats (0.61-1) unstable; urgency=low + + * New upstream version. + + -- Antoine Jacquet Wed, 5 Apr 2004 02:11:20 +0100 + +irssistats (0.6-1) unstable; urgency=low + + * Initial Release. + + -- Antoine Jacquet Wed, 24 Mar 2004 16:44:17 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..f0b9a7f --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: irssistats +Section: net +Priority: optional +Maintainer: Antoine Jacquet +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.1 + +Package: irssistats +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: irssi-text +Description: This tool generates HTML IRC stats based on irssi logs + irssistats is a tool that make HTML stats from irssi logfiles. + The statistics generated display many useful and funny informations about + the channel. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..83cb943 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +This package was debianized by Antoine Jacquet on +Wed, 24 Mar 2004 16:44:17 +0100. + +It was downloaded from: http://royale.zerezo.com/irssistats/ + +Upstream Author: Antoine Jacquet + +Copyright (C) 2002-2004 Antoine Jacquet + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e6bf5c3 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README sample.nickfile sample.configfile diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7b26878 --- /dev/null +++ b/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #/usr/bin/docbook-to-man debian/irssistats.sgml > irssistats.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/irssistats. + $(MAKE) install PRE=$(CURDIR)/debian/irssistats/usr + rm $(CURDIR)/debian/irssistats/usr/share/doc/irssistats/COPYING + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/irssistats.1 b/irssistats.1 index 62c138b..4416cbd 100644 --- a/irssistats.1 +++ b/irssistats.1 @@ -1,56 +1,3 @@ -.\" $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. @@ -83,7 +30,7 @@ The path to the configuration file can be given on the command line : \fBirssist .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). +Lines starting by ; # \-\- or // are ignored (comments). .PP This file is read sequencially, so it acts like a script. .PP @@ -93,7 +40,7 @@ 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". +IMPORTANT : the order of options to parse a channel must allways be "input" THEN "nickfile" THEN "photofile" THEN "output". .PP Available options are : .IP "debug" 10 @@ -140,10 +87,22 @@ 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. .IP "" 10 Default : 3600 +.IP "photo_size" 10 +Specifies the size in pixels of the thumbnails for users +.IP "" 10 +This option has an effect only if there is a photofile (see below) +.IP "" 10 +Set to 0 to disable (display pictures with their real size) +.IP "" 10 +Default : 60 .IP "w3c_link" 10 Set this to "no" if you don't want the W3C logo. .IP "" 10 Default : yes +.IP "logo" 10 +Set this to "no" if you don't want the irssistats logo. +.IP "" 10 +Default : yes .IP "header" 10 Use your custom header file (HTML code between included) .IP "footer" 10 @@ -156,6 +115,8 @@ Note that irssistats will really parse the file as soon as it reads this option. 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 "photofile" 10 +This allow you to display pictures for users. .IP "output" 10 This allow you to generate the HTML file. .IP "" 10 @@ -181,6 +142,21 @@ The nickfile must not contain any comments. 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 "PHOTOFILE" +.PP +Since version 0.70 of \fBirssistats\fR, you can use a photofile to display pictures for users. +.PP +Each line of the photofile contains the final nick and an URL for the image. +.PP +Examples : +.IP "royale http://royale.zerezo.com/chat/faces/happy40.png" 10 +(a full address) +.IP "sektor ../chat/faces/happy40.png" 10 +(a relative address) +.PP +The photofile must not contain any comments. +.PP +You can also take a look at the "sample.photofile" in this package (in "/usr/share/doc/irssistats/"). .SH "SEE ALSO" .PP \fBirssi\fR (1). @@ -192,4 +168,4 @@ Report bugs to royale@zerezo.com. .SH "AUTHOR" .PP Antoine Jacquet royale@zerezo.com -.\" created by instant / docbook-to-man, Mon 03 May 2004, 21:30 +.\" created by instant / docbook-to-man, Sun 06 Feb 2005, 06:38 diff --git a/irssistats.c b/irssistats.c index d7e974d..4e637a5 100644 --- a/irssistats.c +++ b/irssistats.c @@ -1,5 +1,5 @@ /* - * irssistats version 0.62 + * irssistats version 0.70 * * This tool generates IRC stats based on irssi logs. * Usage: irssistats [/path/to/file.conf] @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ + */ #include @@ -28,7 +28,12 @@ #include #include #include +#ifdef __WIN32__ +#define GLOBALCONF "irssistats.conf" +#else +#define GLOBALCONF "/etc/irssistats.conf" #include +#endif /* Config */ #define BASEUSERS 1000 @@ -43,7 +48,7 @@ #define MINWORDLENGTH 5 /* irssistats */ -#define VERSION "0.62" +#define VERSION "0.70" #define URL "http://royale.zerezo.com/irssistats/" /* Counters */ @@ -412,6 +417,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab }, { /* Dutch language */ /* contributed by Jeroen Ubbink */ + /* updated by Wouter Horré */ { "Dutch", "nl" }, { "CHARSET", "ISO-8859-1" }, { "HEADER", "Statistieken voor %s door %s" }, @@ -419,7 +425,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { "LASTDAYS", "Statistieken van de laatste dagen" }, { "TOPHOURS", "Statistieken per uur" }, { "TOPUSERS", "Meest actieve mensen" }, - { "OTHERS", "Er zijn nog %d niet in de top..." }, + { "OTHERS", "Er zijn nog %d mensen die de top niet haalden..." }, { "NBLINES", "regels" }, { "NICK", "nick" }, { "AVGLETTERS", "letters/lijn" }, @@ -438,7 +444,7 @@ char *keys[NBLANGUAGES][NBKEYS+1][2]= /* first key used for language name and ab { "BIGNUMBERS", "Enkele grote aantallen..." }, { "NUMBERS", "numbers" }, { "TIME", "%d regels (%d dagen) verwerkt in %d seconden" }, - { "FOOTER", "Statistieken gegenereert door" }, + { "FOOTER", "Statistieken gegenereerd door" }, { "C_SMILE", "is vaak vrolijk :)" }, { "C_FROWN", "is vaak droevig :(" }, { "C_EXCLAM", "schreeuwt veel !" }, @@ -556,9 +562,10 @@ char *L(char *key) int debug=1; /* 0 = none ; 1 = normal ; 2 = verbose */ char channel[MAXLINELENGTH]="set_channel_in_config_file"; char maintainer[MAXLINELENGTH]="set_maintainer_in_config_file"; -char theme[MAXLINELENGTH]="default,blue,dark,grayscale,namour,pisg,zeduel,zerezo"; +char theme[MAXLINELENGTH]="default,biseau,blue,dark,damier,grayscale,namour,niflheim,pisg,zeduel,zerezo"; int refresh_time=0; /* 0 = disabled */ int w3c_link=1; /* 0 = disabled */ +int logo=1; /* 0 = disabled */ char header[MAXLINELENGTH]="none"; char footer[MAXLINELENGTH]="none"; int totallines=0; @@ -566,6 +573,7 @@ time_t debut; int top_words=1; /* 0 = disabled */ int ranking=0; /* 0 = lines ; 1 = words ; 2 = letters */ int quarter=0; /* 1 = enabled */ +int photo_size=60; struct user { @@ -576,6 +584,7 @@ struct user int hours[4]; char quote[MAXQUOTELENGTH+1]; int counters[NBCOUNTERS]; + char *photo; int temp; } *users; int nbusers=0; @@ -729,6 +738,7 @@ int dichotomic(char *nick) strcpy(users[i].quote,users[i-1].quote); for (j=0;j=MAXLINELENGTH-1) { fprintf(stderr,"line %d is too long\n",totallines); exit(1); } + for (i=0;line[i]!=0 && i=MAXLINELENGTH-1) { + if(debug){ + fprintf(stderr,"line %d is too long, skipping\n",totallines+1); + } + continue; + } + if (i<8) { + if(debug) { + fprintf(stderr, "line %d is too short to be valid, skipping\n",totallines+1); + } + continue; + } line[i-1]='\0'; pos=0; totallines++; @@ -783,7 +805,13 @@ void parse_log(char *logfile) } else if (strncmp("-!-",&line[6],3)==0) /* 00:00 -!- Nick something... */ { - for (i=10;line[i]!=' ';i++); + for (i=10;line[i]!=' ' && i <= 10 + MAXNICKLENGTH;i++); + if(i > 10 + MAXNICKLENGTH) { + if(debug) { + fprintf(stderr,"nick on line %d is too long, skipping line\n",totallines); + } + continue; + } line[i]='\0'; nick=&line[10]; message=&line[i+1]; @@ -828,14 +856,26 @@ void parse_log(char *logfile) hour=atoi(line); if (line[7]=='*') /* 00:00 * Nick the message */ { - for (i=9;line[i]!=' ';i++); + for (i=9;line[i]!=' ' && i <= 9 + MAXNICKLENGTH;i++); + if(i > 9 + MAXNICKLENGTH) { + if(debug) { + fprintf(stderr,"nick on line %d is too long, skipping line\n",totallines); + } + continue; + } nick=&line[9]; message=&line[i+1]; } else if (line[7]=='>') /* 00:00 <>>>?Nick<<<> the personal message */ /* 00:00 <>>?Nick<<> the personal message */ { - for (i=10;line[i]!='<';i++); + for (i=10;line[i]!='<' && i <= 10 + MAXNICKLENGTH;i++); + if(i > 10 + MAXNICKLENGTH) { + if(debug) { + fprintf(stderr,"nick on line %d is too long, skipping line\n",totallines); + } + continue; + } nick=&line[10]; if (line[9]=='>') nick++; message=&line[i+5]; @@ -853,7 +893,13 @@ void parse_log(char *logfile) nickstart = 7; } - for (i=nickstart;line[i]!='>';i++); + for (i=nickstart;line[i]!='>' && i <= nickstart + MAXNICKLENGTH;i++); + if(i > nickstart + MAXNICKLENGTH) { + if(debug) { + fprintf(stderr,"nick on line %d is too long, skipping line\n",totallines); + } + continue; + } nick=&line[nickstart]; message=&line[i+2]; } @@ -913,6 +959,7 @@ void parse_log(char *logfile) if (debug) printf(" done\n"); } +#ifndef __WIN32__ void parse_nick(char *nickfile) { FILE *fic; @@ -958,6 +1005,24 @@ void parse_nick(char *nickfile) for (j=0;j<4;j++) users[i].hours[j]=-1; for (j=0;j\n%s%s%s%s%s\n",L("NICK"),L("NBLINES"),L("HOURS"),L("AVGLETTERS"),L("QUOTE")); + fprintf(fic,"\n\n",L("NICK"),L("NBLINES"),L("HOURS"),L("AVGLETTERS"),L("QUOTE")); break; default: /* "letters" and "words" ranking are not yet translated so we use the generic word "rank" ... */ - fprintf(fic,"
%s%s%s%s%s
\n\n",L("NICK"),"rank",L("HOURS"),L("AVGLETTERS"),L("QUOTE")); + fprintf(fic,"
%s%s%s%s%s
\n\n",L("NICK"),"rank",L("HOURS"),L("AVGLETTERS"),L("QUOTE")); break; } + if (photos) fprintf(fic,""); + fprintf(fic,""); for (i=1;i<=NBUSERS;i++) { user=-1; @@ -1084,7 +1154,15 @@ void gen_xhtml(char *xhtmlfile) for (j=0;j<4;j++) if (users[user].hours[j]!=0) fprintf(fic,"
",j+1,100*users[user].hours[j]/users[user].lines); fprintf(fic,"\n"); + fprintf(fic,"\""); + if (photos && users[user].photo!=NULL) + { + if (photo_size) + fprintf(fic,"",users[user].photo,users[user].photo,photo_size,photo_size); + else + fprintf(fic,"",users[user].photo,users[user].photo); + } + fprintf(fic,"\n"); users[user].lines=-1; users[user].words=-1; users[user].letters=-1; @@ -1180,10 +1258,15 @@ void gen_xhtml(char *xhtmlfile) fprintf(fic,"

\n\"Valid\n"); fprintf(fic,"\"Valid\n

\n"); } - fprintf(fic,"\n\n"); - if (strcmp("none",header)==0) + fprintf(fic,"\n\n"); + + /* logo*/ + if (logo) fprintf(fic,"
\n\n"); + + /* end */ + if (strcmp("none",footer)==0) { - fprintf(fic,"\n\n\n\n\n"); + fprintf(fic,"\n\n\n\n\n"); } else { @@ -1197,6 +1280,17 @@ void gen_xhtml(char *xhtmlfile) void parse_config(char *configfile) { + void expand(char *path) + { + char temp[MAXLINELENGTH]; + if (*path=='~') + { + snprintf(temp,MAXLINELENGTH-1,"%s%s",getenv("HOME"),path+1); + temp[MAXLINELENGTH-1]='\0'; + strcpy(path,temp); + } + } + FILE *fic; char line[MAXLINELENGTH]; char keyword[MAXLINELENGTH]; @@ -1214,11 +1308,12 @@ void parse_config(char *configfile) } else { - sprintf(line,"%s/.irssistats",getenv("HOME")); + snprintf(line,MAXLINELENGTH-1,"%s/.irssistats",getenv("HOME")); + line[MAXLINELENGTH-1]='\0'; if ((fic=fopen(line,"rt"))==NULL) - if ((fic=fopen("/etc/irssistats.conf","rt"))==NULL) + if ((fic=fopen(GLOBALCONF,"rt"))==NULL) { - fprintf(stderr,"can't find config file : \"%s\" nor \"/etc/irssistats.conf\"\n",line); + fprintf(stderr,"can't find config file : \"%s\" nor \"" GLOBALCONF "\"\n",line); fprintf(stderr,"please give the path to the config file in argument\n"); exit(1); } @@ -1284,6 +1379,13 @@ void parse_config(char *configfile) } else + if (strcmp("photo_size",keyword)==0) + { + photo_size=atoi(value); + if (debug==2) fprintf(stderr,"setting photo_size to \"%d\"\n",photo_size); + } + else + if (strcmp("w3c_link",keyword)==0) { if (debug==2) fprintf(stderr,"setting w3c_link to \"%s\"\n",value); @@ -1293,8 +1395,18 @@ void parse_config(char *configfile) } else + if (strcmp("logo",keyword)==0) + { + if (debug==2) fprintf(stderr,"setting logo to \"%s\"\n",value); + if (strcmp("no",value)==0) logo=0; + else if (strcmp("yes",value)==0) logo=1; + else { fprintf(stderr,"unknown value for \"logo\" option, must be \"yes\" or \"no\"\n"); exit(1); } + } + else + if (strcmp("header",keyword)==0) { + expand(value); if (debug==2) fprintf(stderr,"setting header to \"%s\"\n",value); strcpy(header,value); } @@ -1302,6 +1414,7 @@ void parse_config(char *configfile) if (strcmp("footer",keyword)==0) { + expand(value); if (debug==2) fprintf(stderr,"setting footer to \"%s\"\n",value); strcpy(footer,value); } @@ -1309,6 +1422,7 @@ void parse_config(char *configfile) if (strcmp("input",keyword)==0) { + expand(value); if (debug==2) fprintf(stderr,"parsing log file \"%s\"\n",value); parse_log(value); } @@ -1316,13 +1430,27 @@ void parse_config(char *configfile) if (strcmp("nickfile",keyword)==0) { + expand(value); if (debug==2) fprintf(stderr,"nick alias using file \"%s\"\n",value); +#ifdef __WIN32__ + fprintf(stderr,"no support for nickfile in WIN32 version\n"); +#else parse_nick(value); +#endif + } + else + + if (strcmp("photofile",keyword)==0) + { + expand(value); + if (debug==2) fprintf(stderr,"parsing photo file \"%s\"\n",value); + parse_photo(value); } else if (strcmp("output",keyword)==0) { + expand(value); if (debug==2) fprintf(stderr,"generating xhtml file \"%s\"\n",value); bestwords(words,0); gen_xhtml(value); @@ -1338,6 +1466,11 @@ void parse_config(char *configfile) for (i=0;iEach 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". + IMPORTANT : the order of options to parse a channel must allways be "input" THEN "nickfile" THEN "photofile" THEN "output". Available options are : @@ -156,6 +156,16 @@ + + photo_size + + Specifies the size in pixels of the thumbnails for users + This option has an effect only if there is a photofile (see below) + Set to 0 to disable (display pictures with their real size) + Default : 60 + + + w3c_link @@ -164,6 +174,14 @@ + + logo + + Set this to "no" if you don't want the irssistats logo. + Default : yes + + + header Use your custom header file (HTML code between <!DOCTYPE... and <body> included) @@ -191,6 +209,13 @@ + + photofile + + This allow you to display pictures for users. + + + output @@ -233,6 +258,26 @@ + + PHOTOFILE + Since version 0.70 of irssistats, you can use a photofile to display pictures for users. + Each line of the photofile contains the final nick and an URL for the image. + Examples : + + + royale http://royale.zerezo.com/chat/faces/happy40.png + (a full address) + + + sektor ../chat/faces/happy40.png + (a relative address) + + + The photofile must not contain any comments. + You can also take a look at the "sample.photofile" in this package (in "/usr/share/doc/irssistats/"). + + + SEE ALSO irssi (1). diff --git a/rpm/irssistats.spec b/rpm/irssistats.spec new file mode 100644 index 0000000..a5ab832 --- /dev/null +++ b/rpm/irssistats.spec @@ -0,0 +1,31 @@ +Name: irssistats +Summary: This tool generates HTML IRC stats based on irssi logs +Version: 0.70 +Release: 1 +Source: http://royale.zerezo.com/%{name}/%{name}-%{version}.tar.gz +Group: Applications/Multimedia +License: GPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +irssistats is a tool that make HTML stats from irssi logfiles. +The statistics generated display many useful and funny informations about +the channel. + +%prep +%setup -q + +%build +make + +%install +make install PRE=$RPM_BUILD_ROOT/usr + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,0755) +%doc COPYING README +%{_bindir}/irssistats +%{_mandir}/man1/irssistats.1.gz diff --git a/sample.configfile b/sample.configfile index 10786db..d738852 100644 --- a/sample.configfile +++ b/sample.configfile @@ -6,7 +6,7 @@ # 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". +# IMPORTANT : the order of options to parse a channel must allways be "input" THEN "nickfile" THEN "photofile" THEN "output". # Allows you to display debugging informations. # Values : normal / verbose / none @@ -28,7 +28,7 @@ language : fr # 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 -theme : default,blue,dark,grayscale,namour,pisg,zeduel,zerezo +theme : default,biseau,blue,dark,damier,grayscale,namour,niflheim,pisg,zeduel,zerezo # Allows you to disable top words list which is using a lot of memory # Default : yes @@ -48,10 +48,20 @@ quarter : yes # Default : 3600 refresh_time : 0 +# Specifies the size in pixels of the thumbnails for users +# This option has an effect only if there is a photofile (see below) +# Set to 0 to disable (display pictures with their real size) +# Default : 60 +photo_size : 0 + # Set this to "no" if you don't want the W3C logo. # Default : yes w3c_link : no +# Set this to "no" if you don't want the irssistats logo. +# Default : yes +logo : no + # Use your custom header file (HTML code between included) header : /path/to/header.html @@ -71,6 +81,9 @@ input : /path/to/#newchannel1.log # Note that irssistats will really merge the nicks as soon as it reads this option. nickfile : /path/to/nickfile1.txt +# This allow you to display pictures for users. +photofile: /path/to/photofile1.txt + # This allow you to generate the HTML file. # Note that irssistats will really generate the HTML file as soon as it reads this option. output : /path/to/channel1.html diff --git a/sample.photofile b/sample.photofile new file mode 100644 index 0000000..0d30a31 --- /dev/null +++ b/sample.photofile @@ -0,0 +1,4 @@ +royale http://royale.zerezo.com/chat/faces/happy40.png +sektor ../chat/faces/sektor.jpg +Clak wgfa2.png +Jo faces/FLCL.gif
%s%s%s%s%s
%d
\"",users[user].lines!=0?users[user].letters/users[user].lines:0,users[user].lines!=0?users[user].letters/users[user].lines:0); printhtml(fic,users[user].quote); - fprintf(fic,"\"
\"\"\"\"