There might be various reasons why one would want to download all of their gtalk/gmail chats. Google does not provide any api to do so. So quite naturally, I googled my problem and found a workaround.
Log into your gmail account from Google Chrome. Create a filter that labels all the chats.
Click on the Create Filter link which can be found beside the Search Mail box. For the search criteria, use Chat With text in the Subject text area. For the action set, you may just choose to have all these filtered mails to be labeled as LOGS. Make sure to have the filter applied to all the previous mails as well.
Now that we have filtered out all the chats, we need to have them downloaded. Go to Settings->Offline and toggle on the option. Since we are only interested in chats, choose only the LOGS label for downloading. Wait for all the chats to get downloaded. It may take a while.
Google chrome has a local folder where all the gears files are stored. The location at which our file can be found is:
%AppData%\Local\Google\Chrome\User Data\Default\Plugin Data\Google Gears\mail.google.com\https_443
We are only interested in the main database file. You can identify it by the following name:
.com-GoogleMail#database
Copy this file to a convenient location, say the Desktop. Rename the file to candorz.
Next a couple of scripts need to be downloaded. They can be found at extract.7z and sql4.7z. Extract these two files to the same location as above. Double click on the sql4 script and watch as a new folder called msgs is created and populated with all the chats. The extracted chats are in xml format.
Popularity: 4% [?]

