Joachim Breitner's Homepage
graphing your gaim chat history
I’m a fan of statistics, so I created a small perl script that reads your gaim message history and, for the top 10 contacts, creates graphs: One for the total bytes chatted, one for the bytes chatted on each day, and two with weighted averages, over one week and one month timespan. You need the perl modules in libgd-graph-perl and libxml-xpath-perl, and my script. Run it and it will output the four png’s in the current directory.
I don’t have examples, as the output is far too private to put up here, and I’m too lazy to create interesting test data. There is a lot you can discover in these graphs: When you got to know someone (or when he started IMing), when you were not good terms with someone etc.
Comments
find ~/.gaim/logs -mindepth 2 -type f -printf %p_%s\\n
(or parts of it, with all private data replaced by dummy data)
I got this error when trying your script :
Illegal division by zero at /usr/share/perl5/GD/Graph/axestype.pm line 2014.
I just installed the libgd-graph-perl and libxml-xpath-perl on a debian sid.
Sorry that I can’t do much debugging from here with that one.
--
while (<INPUT>) {
m#^.*/([^/]+)/([^/]+)/(\d\d\d\d-\d\d-\d\d).*\.txt_(\d+)$# or do {print "Could not parse line $_"; next};
my ($me, $who, $date, $size) = ($1, $2, $3, $4);
next if ($who eq ".system");
$sums{$who} += $size;
$days{$date}{$who} += $size;
}
m#([^/]+)/(\d\d\d\d-\d\d-\d\d)\.\d\d\d\d\d\d(?:\+\d\d\d\d\w+)?.(?:txt|html)_(\d+)$#
or do {print "Could not parse line $_"; next};
my ($who,$date,$size) = ($1,$2,$3);
ERROR: Date::Manip unable to determine TimeZone.
at /usr/share/perl5/Date/Manip.pm line 3636
Date::Manip::Date_TimeZone called at /usr/share/perl5/Date/Manip.pm line 677
Date::Manip::Date_Init() called at /usr/share/perl5/Date/Manip.pm line 1447
Date::Manip::ParseDate('today') called at gaimgraph.pl line 106
Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.
I'm using gaim 1.5.