+PRE = /usr/local
+BIN = $(PRE)/bin
+PIX = $(PRE)/share/irssistats/pix
+DOC = $(PRE)/doc/irssistats
+MAN = $(PRE)/man/man1
+
irssistats:irssistats.c
gcc -o irssistats irssistats.c
rm -f irssistats
install:irssistats
- (test -d /usr/local/bin && cp irssistats /usr/local/bin) || (test -d /usr/bin && cp irssistats /usr/bin)
+ mkdir -p $(BIN) $(PIX) $(DOC) $(MAN)
+ cp -f irssistats $(BIN)
+ cp -f pix/* $(PIX)
+ cp -f COPYING README sample.nickfile.txt $(DOC)
+ cp -f irssistats.1 $(MAN)
uninstall:
- rm -f /usr/local/bin/irssistats /usr/bin/irssistats
+ rm -f $(BIN)/irssistats
+ rm -rf $(PIX) $(DOC)
+ rm -f $(MAN)/irssistats.1
-irssistats 0.42
+irssistats 0.43
site: http://royale.zerezo.com/programmation/irssistats/
mail: royale@zerezo.com
install:
make
-cp pix/*.png /path/to/webdir/
+cp pix/* /path/to/webdir/
usage:
cat /path/to/file.log | ./irssistats \#channel maintainer language theme [nickfile] > /path/to/webdir/index.html
--- /dev/null
+.TH irssistats 1 23-Nov-2002 "version 0.43" irssistats
+
+.SH NAME
+irssistats - A tool to generate HTML IRC stats based on irssi logs.
+
+.SH SYNOPSIS
+cat /path/to/file.log | \fBirssistats\fP \fI\\#channel\fP \fImaintainer\fP \fIlanguage\fP \fItheme\fP \fI[nickfile]\fP > /path/to/webdir/index.html
+
+.SH DESCRIPTION
+\fBirssistats\fP is a tool that make HTML stats from \fIirssi\fP logfiles.
+.PP
+It works like a filter (it reads data in input and produces the HTML page on the output).
+.PP
+The statistics generated display many useful and funny informations about the channel.
+
+.SH USING IT
+First you need to copy the images needed for the HTML page :
+.PP
+.B cp /usr/share/irssistats/pix/* /path/to/webdir/
+.PP
+Now you can generate the statistics for your channel :
+.PP
+.B cat /path/to/file.log | irssistats \\\\#channel maintainer language theme [nickfile] > /path/to/webdir/index.html
+.PP
+The logfiles for \fIirssi\fP are usually located in "~/irclogs/network/channel.log"
+
+.SH COMMAND LINE OPTIONS
+All the options (except the nickfile) are mandatory and have to be set at the good place on the command line.
+.PP
+If you make any mistake on the command line, \fBirssistats\fP will remind you the usage.
+.PP
+Launching \fBirssistats\fP without any parameters is a good way to show the available options.
+.PP
+.TP 8
+.B \\\\#channel
+Specifies the name of the channel you are parsing. Don't forget to escape the '#' character in the channel name.
+.TP 8
+.B maintainer
+Nickname of the person generating the statistics (you !).
+.TP 8
+.B language
+Language you want to use to display the statistics (example : "en" for english).
+.TP 8
+.B theme
+Theme (colors) to use for the statistics (example : "default" for the default theme).
+.TP 8
+.B nickfile
+This is the only optional argument. Specifies an alias file for nicks. See Below.
+
+.SH NICKFILE
+Since version 0.4 of \fBirssistats\fP, 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 :
+.TP 8
+.B royale ^[Rr]oyale
+join nicks starting with "Royale" or "royale" to the final nick "royale"
+.TP 8
+.B royale ^antoine$
+also join the nick "antoine" to the final nick "royale"
+.TP 8
+.B djakette [Dd]ja
+join any nick that contains "Dja" or "dja" to final nick "djakette"
+.TP 8
+.B <NULL> ^bot\\\\|royale$
+remove "bot|royale" from statistics
+.PP
+The nickfile must not contain any comments.
+.PP
+The <NULL> 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.txt" in this package (in "/usr/share/doc/irssistats/").
+
+.SH SEE ALSO
+irssi(1)
+
+.SH INFORMATIONS
+You can find informations and updates of \fBirssistats\fP at \fIhttp://royale.zerezo.com/programmation/irssistats/\fP.
+.PP
+Report bugs to \fIroyale@zerezo.com\fP.
+
+.SH AUTHOR
+Antoine Jacquet <\fIroyale@zerezo.com\fP>
#define W3C_LINK
/* Config */
-#define MAXUSERS 5000
+#define MAXUSERS 10000
#define MAXNICKLENGTH 50
#define MAXLINELENGTH 2000
#define MAXQUOTELENGTH 100
#define MINWORDLENGTH 5
/* irssistats */
-#define VERSION "0.42"
+#define VERSION "0.43"
#define URL "http://royale.zerezo.com/programmation/irssistats/"
/* Counters */
}
/* Themes */
-#define NBTHEMES 5
+#define NBTHEMES 6
#define NBCOLORS 9
char *colors[NBTHEMES][NBCOLORS+1][2]= /* first key used for theme name/description and abbreviation */
{
{ "TITLE2", "#FF7700" },
{ "BGTABLE", "#FFEEEE" },
{ "BGTITLE", "#FF7700" }
+ },
+ { /* Blue theme */
+ { "Blue theme...", "blue" },
+ { "BGCOLOR", "#FFFFFF" },
+ { "TEXT", "#000000" },
+ { "LINK", "#4444FF" },
+ { "VLINK", "#8888FF" },
+ { "ALINK", "#CCCCFF" },
+ { "TITLE1", "#8888FF" },
+ { "TITLE2", "#AAAAFF" },
+ { "BGTABLE", "#EEEEFF" },
+ { "BGTITLE", "#CCCCFF" }
}
};
/*** LOG ***/
srand(debut=time(NULL));
- fprintf(stderr,"working:");
+ fprintf(stderr,"working on %s : ",channel);
while (!feof(stdin))
{
c=getchar();
line[pos++]=c;
- if (pos>=MAXLINELENGTH) { fprintf(stderr,"line too long\n"); exit(1); }
+ if (pos>=MAXLINELENGTH) { fprintf(stderr,"line %d is too long\n",totallines); exit(1); }
if (c=='\n')
{
line[pos-1]='\0';
pos=0;
}
}
- fprintf(stderr,"done\n");
+ fprintf(stderr," done\n");
bestwords(words,0);