Last thing you'll ever read…again
Posts tagged chatlogs
Chatlogs
Apr 27th
So I keep all my chatlogs, they date back till like mid 2004 I believe.
I even wrote a script that converted all my chatlogs to MIME format so I could import them into my gmail. So now all my chatlogs are accessible on gmail, well the ones that I’ve bothered converting anyway.
The problem I have now is that I’ve started using Adium on the mac. Adium is bloody amazing I must say. Oh and you know what? It saves it’s chatlogs in XML format. Not bloody plain-text or html but XML. How is this a problem? Well it’s not, but now I’m actually looking into converting a year or so of pidgin chatlogs into adium format.
The problem lies in the fact that I used a pidgin plugin to display conversations on a new line. So basically instead of:
John: Hello
You: Hi
They were displayed as:
John:
Hello
You:
Hi
Why did I do it like that? Well it’s because some people had extremely long nicknames that stretched across the entire screen so it made it extremely difficult to read.
I could have just changed their display names to their actual names but that’s a different story.
So I found this nifty little php script that converts Pidgin chatlogs to Adium chatlogs. The only problem is that it stops parsing once it reaches a new line.
So instead of reading
John:
Hello
as a message it just reads:
John:
So all my chatlogs are displayed as:
John:
You:
John:
You:
Rage!
I think to fix the problem I might have to write up a script that removes that new line.
My unix skills might be a bit rusty but this should do the trick right?
sed ‘s/(^\(.*)\):)\n$/\1/g’
Also need to change the “(.*)” into a proper regex for the time stamp I guess
Only other problem is that I don’t know how the script handles multi-line messages >.>
But that’s a different problem.
If all fails I might write up my own python script to do this but though it may seem simple enough, you have to play around with dates and timestamps which can get extremely messy >.>
Edit: Accidentally deleted all my adium chatlogs by mistake, was meant to delete the dodgy converted chatlogs >.> I fail
Memories
Apr 6th
So I came up with a great idea the other day. It’s rare that I come up with great ideas but I did. I have around 200mb of chatlogs, dating back to 2004. That’s 5 years worth of chatlogs. Half of it is purely txt whilst the other half is HTML.
So I was going through my gmail the other day and decided to go through my chats and a thought came to me. Google stores chatlogs as emails. Wouldn’t it be great if gmail can store all my other chatlogs as emails?
So I got to work. First thing I did was to see if it was already done already. Somebody it seems has already done it, except the script was written in VB, and it didn’t work…causing some kind of runtime error. I looked up ways to generate my own .msg files, import them into Outlook and then syncing outlook with gmail. msg files it seems is a messy piece of crap, mixing what appears to be binary with txt. So, I looked elsewhere. I discovered that Thunderbird stored emails in plain txt. Excellent. I just had to extract the formatting for the mail headers and write a script that parses all my chatlogs and outputs each individual converstion into neat little emails.
After an hour or so tinkering with a python script I was able to generate a thunderbird compatible email folder. But then came the problem of uploading it all. Gmail apparently restricts the amount of emails you can upload at any given time. 10 emails at a time is fine…50…it just dies. So now I have to find ANOTHER solution. Well, I found that google has developed a rather obscure app called “Google email uploader” it allows you to upload your emails from Outlook/Thunderbird to a Google App hosted email address.
Luckily, I have one so I can upload it to my domain email address. I’ll then have to sync it to my normal gmail account. Yes, it’s quite an endeavour just to store some chatlogs but hey, it’s fun!
I’ll also have to find a way to embed images into the emails, something that I have no idea where to start.
But yeah, I’ve been going over some extremely old chatlogs and it’s made me miss some of the things that I used to talk about.
Well, for those who are interested, I’ll post up a copy of the script later. There’s gonna be two versions, one for Messenger Plus! logs and the other for pidgin.