A number of days ago, I rediscovered that Facebook will allow you to download a complete copy of (purportedly) all of its data about you. All of your pictures, interactions, hashtags, ads you’ve clicked on, and messages.
Being that Facebook’s ability to browse message history has always been a bit lackluster to me…
I decided that, perhaps, I would download this massive .zip archive and take a look at the older parts of my message threads from the comfort of my own local machine.
Little did I know, I was about to get one big, enormous, disgusting .htm file full of all of my messages from the dawn of Facebook’s combined inbox. What’s worse, the file split my conversations into threads. One big, utterly unnavigable .htm file containing chronological fragments of every message I’ve ever sent. It took forever to load, and seemed to load as I scrolled down the page, meaning I can’t even simply do a ctrl+f search without spending an hour scrolling down. This is no better than the web interface!
Enter FacebookMessageSorter, my response to this godawful formatting crime. It’s a neat little ruby script which chugs through your messages.htm file with a faux-parser built on a couple of cheap regexes and pulls it apart like pork in a smokehouse. It separates it out into separate, neatly indented conversation files, showing single conversations over their whole lifespan without interruption.
There’s a lot of clean-up to do, and I plan on eventually using the Facebook Graph API v2 to make a neat rails project to do the same thing interactively. In the meantime, if you want to reap the benefits of this super-alpha little script, feel free to check out the source on my github.