AOL, Plugins, Programming, WordPress

Import your chat transcripts into WordPress

Problem: You have years’ worth of chat (AIM/MSN/Adium/IRC) transcripts saved on your computer, and you’d love to stroll down memory lane and reread some of them, but how? Manually open each one in your browser or chat program?? There’s got to be a better way!

Solution: Install IM-porter, the WordPress plugin that imports your instant message transcripts to your WordPress blog so you can read through conversations from ages past just as easily as you browse the archives of a blog.

After activating the plugin, visit Tools > Import > Chat Transcripts. Then, you can upload a single transcript or a ZIP of transcripts.

IM-porter currently supports transcripts from:

  • AOL Instant Messenger
  • MSN Messenger
  • Adium
  • Colloquy

but you can extend it to parse other formats too. (See the README.)

Imported posts are given the chat post format, and you have the option of tagging them with the participants’ usernames, making them public or private, and adding them to a category.

The IM-porter configuration screen.

After they’re imported, chats will look something like this:

A chat imported by IM-porter

The output may not be perfect (the output will not be perfect), but the original raw transcript is saved as post meta so the post can be updated if you want or fixed by a later version of IM-porter.

If you want to style your chats like AIM used to display them (like in the screenshot I included), you can use this CSS:

.post.format-chat .entry-content p {
	margin-bottom: 0 !important;
}

.post.format-chat .entry-content span {
	color: #00f;
	font-weight: bold;
}

.post.format-chat .entry-content span.participant-1 {
	color: #f00;
}

.post.format-chat .entry-content span time {
	font-size: x-small;
}

Standard
Facebook, Programming, WordPress

Export your Facebook posts to WordPress

I’m a big proponent of owning the data that you create. I use WordPress (of course) wherever I blog, and I use the Keyring Social Importers plugin to make backup copies of my Twitter updates and Foursquare checkins. And as of today, I am also syncing my Facebook updates back to a private WordPress blog using Keyring Social Importers.

Not familiar with Keyring Social Importers? That’s too bad, it’s amazing. Install it, and within minutes, you can be importing data from any one of a dozen sites to your blog. Remember all of that data you put into Myspace/Jaiku/Bebo/Pownce and how it disappeared when the site shut down? Wouldn’t it have been nice to be able to save a copy of all of that? That’s what Keyring Social Importers makes possible.

There’s no built-in Facebook importer in Keyring Social Importers, so I wrote one. You can use it to save copies of your Facebook photos, photo albums, and status updates to an easy-to-browse (and easy to share) WordPress blog.

To use the Facebook importer, install Keyring Social Importers, copy the keyring-importer-facebook.php file into wp-content/plugins/keyring-social-importers/importers/, and then visit Import > Facebook to get started. Let me know what you think.

Note: I’ve only tested the importer on my own account, so it’s possible that it won’t be perfect. All imported data is set to private, just to be safe. Patches and bug reports are welcome.

Standard
Software

Convert iChat transcripts to (useable) XML

iChat (a.k.a. Messages) doesn’t store its chat logs in a format that can be (easily) parsed outside of iChat, so if you want to use your chat data for anything, you’ll need to convert those logs to something better. (Anything would be better. Even AIM’s <FONT>-ridden HTML 3 is more useful than iChat’s binary plists.)

One suggestion I found that came close was to convert the binary plist to XML so that the XML could be parsed with the tool of your choosing:

$ plutil -convert xml1 example.chat

However, the XML generated by that command doesn’t include enough information to reliably determine which participant sent each message. (Or if it does, it doesn’t make it obvious enough that I would dedicate time to writing a parser.)

After trying every other promising script and program, here is the only thing that worked:

  1. Install Adium.
  2. Use Adium’s File > Import to import all of your iChat transcripts.
  3. After it finishes, look in ~/Library/Application Support/Adium 2.0/Users/Default/Logs/ and voila! Folders full of XML chat logs with data you can actually use. The file extension is .chatlog, but the content is sensible XML.

This process worked for me to convert 5,000 transcripts created by iChat between 2007 and 2013, and I used Adium 1.5.8.

Standard