Technology / 

01 Dec 2021

iChat to EML Converter

One of my long-term projects is to eventually move all of my personal communications into archival formats, containerized and indexed in a way that makes them accessible and searchable, with the result being a sort of ‘memory prosthesis’ that might have some utility when my biological one starts to break down.

To this end, I’ve periodically written and re-written various utilities to convert instant messaging client logs from one format to another.

My latest installment is the iChat to EML Converter, which pretty much does what it says on the tin. It converts the files containing saved conversations from the proprietary formats used by Apple iChat, to an RFC 2045/2046-compliant MIME document file (more commonly known as an .eml file).

It works on both the old .chat and newer .ichat flavors of on-disk file format, the former being based on the NeXT-based “TypedStreams” serializer, and the latter using Apple’s Binary Property List (PList) format.

As far as I know, it is the only pure-Python converter for iChat log files; all the other extant conversion programs (including Adium’s iChat-to-Adium log migration utility) rely on Mac OS system APIs, which I expect will disappear from OS X at some point in the future, to parse the serialized data into useful objects. It is my hope that this utility will be useful beyond that point.

I am greatly indebted to the work of Github user dgelessus, for creating the python-typedstream library library, saving me the time of having to reverse-engineer the TypedStreams object serialization format, and to Alex Caithness of CCL Solutions Group, for the similarly-useful ccl-bplist for handling Binary PLists.