Thursday, January 27, 2011

Google Talk Chat History Export

I had been looking for a way to export my chat history from one Google account to another for a while.  It was driving me crazy.  Not having some way to preserve my chat history was the last thing that was keeping me from closing out my old Google account.

So then I stumbled upon this post by CandorZ.  He was more interested in archiving the chats, but he hinted me on to a strategy that I hadn't thought of before.  Basically, he proposes that you 1) assign a new label to all of your chats; 2) use offline sync to download all messages from the new label--offline sync will basically create an SQLite database of the chats on your computer; 3) extract the chats from the database.

CandorZ made available a script/executable that extracts each message from the database and saves its text as an HTML file.  I modified/enhanced his script to extract all fields necessary to construct a .eml file for each message.  The .eml files may be dragged and dropped into Windows Live Mail (and, I'm assuming, a number of other mail clients).  From there, you have a lot of options.  For instance, I dragged them over to the IMAP account for my new Gmail account.

Here is my modified script and the extraction utility.  Just follow CandorZ's instructions to use them.