Automatically clean Purple (Pidgin, Finch) logs

September 4th, 2009 at 04:52pm dark

If you, like me, log all of your IM conversations; if you, like me, use Pidgin or another client based on libpurple; if you, like me, have friends that often change their status line, generating useless log lines as

foo changed status from Busy to Busy @ whatever

If you think, as well as me, that 150 MB of logs are way too much; well this is the script for you.

Purple Logs Cleaner aims at removing redundant entries from system logs in textual format. It looks for the .system folders of all your Pidgin/Finch accounts and automatically removes lines according to some customizable patterns. By now, it removes lines in the form “… changed status from … to …”, where the starting and the final status are the same (both in the English and in the Italian translated version “… ha cambiato stato da … a …”); you can hack the sed line at will, but please send me patches ๐Ÿ˜‰ . The script will not touch any other file and it won’t run (obviously) if Pidgin is active.

Back to the numbers: after sixteen minutes of cleaning (kinda slow, because I had to scan for both English and Italian patterns, as I had some problems with intltool in the past), my ~/.purple/logs directory size decreased from 159 MB to only 58 MB! But, more importantly, the .system subdirectories, whose content is the only one touched by the script, decreased from an aggregated size of 143 MB to approximately 40 MB, that is the removal of the 72% of the original content! Subsequent invocations are much faster, under ten minutes, because much of the cruft has already been removed.

Ok, this is enough ๐Ÿ™‚ You can download the script HERE !

Comments are welcome ๐Ÿ˜‰

Entry Filed under: English,IT,Software

Leave a Comment


Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed



September 2009
« Aug   Oct »


Most Recent Posts

What's played in the cave