My girlfriend is doing her PhD in sociology, and her research involves interviews with participants and groups online -- MSN, IRC, whatever technology happens to work. She naturally saves logs of these interviews for later analysis.
Recently, I discovered that she was converting the log files to a more suitable format by hand. Since MSN Messenger, for instance, saves its logs in XML, I shuddered at the thought, and immediately offered my Perl skills. Indeed, I was reminded of this comic strip: Regular Expressions
Ten minutes and fifteen lines of code later, using XML::Twig, I had a script that could extract the text data from the log files in a suitable format. One finishing touch was piping the output to fmt(1) to format the paragraphs containing the message strings so that they were properly indented; I indented the first line with a \t in the Perl script already.
Five minutes later I had a five-line script for extracting in the same simple output format text data from irssi log files. Together, my fifteen minutes of effort saved her 12 hours of numb mouse usage and copy-pasting; a 48-fold difference in time spent. (Do you have similar experiences in saving time?)
She also didn't let me leave the bed for a few hours afterwards. Which was nice.
--
print "Just Another Perl Adept\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Success story: Converting logs
by jettero (Monsignor) on Oct 14, 2007 at 11:44 UTC | |
by Gavin (Bishop) on Oct 14, 2007 at 11:58 UTC | |
| |
Re: Success story: Converting logs
by perrin (Chancellor) on Oct 13, 2007 at 22:57 UTC | |
| |
Re: Success story: Converting logs
by perlfan (Vicar) on Oct 16, 2007 at 23:44 UTC | |
by clinton (Priest) on Oct 27, 2007 at 14:06 UTC | |
by JadeNB (Chaplain) on Dec 20, 2009 at 04:52 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |