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
Programming

Websites shouldn’t close at 10pm

HealthCare.gov is getting a lot of flack for being inaccessible and just generally bad, so I thought I’d check if Minnesota’s state insurance exchange website is any better. I learned this:

And once the website is up and running, it won’t offer 24/7 service. Instead, it will operate from 6 a.m. to 10 p.m. Monday through Saturday, officials said. There will be no Sunday hours.

MNsure spokesman John Reich said the website’s limited hours won’t be permanent.

“The initial hours are so that we can continually update and improve the user experience and add new features,” he said in an email.

(via TwinCities.com)

I can understand (but don’t agree with the idea of) having some planned downtime when you deploy major new changes (like, maybe an hour), but shutting down every night at 10? That’s especially bad for a website targeted towards people who might be working two jobs and don’t get a chance to visit the site until they get off work late at night. They’re out of luck.


Shameless plug: At Automattic, we continually update and improve the user experience and add new features to products like WordPress.com as often as fifty times per day without making the site unavailable 43% of the time.

(If that sounds good to you, come work with us.)

Standard
Life

Eggs and Toothpicks

In our high-school physics class (a dozen years ago), our fun year-end project was to construct a container out of toothpicks and Elmer’s glue that could prevent an egg from cracking when dropped from a height of about ten feet. The idea was to build toothpick crumple zones around the egg such that the egg’s deceleration would be slowed enough that it wouldn’t crack.

I took a different approach:

2293948192_a3a7ac62e2_o

That’s a parachute made entirely out of dried glue. Not only is the parachute made out of glue, the strings connecting it to the egg basket are made out of glue too. I only used twelve toothpicks for the basket, definitely setting the class maximum for glue and minimum for toothpicks.

So how did it perform?

2293304470_45628d4010_o

Not well. The parachute didn’t catch the air until about a foot from the ground, and the toothpick basket was so flimsy that the egg didn’t stand a chance. The glue strings held up though, so I think that if I had dropped it from thirty feet, it would have had a pretty good chance of landing safely.

If there needs to be a moral to this story, I guess it would be “Don’t put all your eggs in one basket if the basket is made out of twelve toothpicks and attached to a glue parachute, unless you’re going to drop the basket from a height greater than ten feet, in which case, you might be ok.”

Standard
Life, Woodworking

I built a Minneapolis table

Earlier this year, I had an idea to build a table that is an inverted 3-D model of a metropolitan downtown. Take a bunch of 1×2 boards, cut them to scale lengths of the buildings in downtown Minneapolis, glue them together, and you’d have something like this:

1

Invert it, and you can see the city a little more clearly:

2

Each piece of wood represents half a city block between Hennepin and Portland Avenues. (The three tall ones in the middle are the IDS, Wells Fargo Center, and the Capella Tower.)

To get started, I cut a bunch of 3/4″ x 2″ stock I had laying around to the correct lengths and laid them out. (They’re miscellaneous woods, but I think oak, birch, and maple are represented.) Unfortunately, after cutting all 234 pieces of wood, I realized that my miter saw’s blade wasn’t true — it was off by about 1ยบ — so I had to re-trim the ends of all of the blocks with a different saw.

After making those cuts, I glued the adjacent blocks together. I only have about a dozen clamps, so this took about ten gluing sessions.

3

The next step was to drill a hole in each block pair that would accept a threaded insert.

4

The original plan was to just glue all of the pieces to each other, but it’s likely (a.k.a. probable) that the table would fall apart as the wood moved due to humidity. I decided to bolt each piece to the bottom of a separate piece of wood, allowing all of the wood pieces to grow and shrink without colliding with each other. The threaded inserts allowed me to disassemble and reassemble the table as many times as I needed without tearing out any screw holes.

Here’s the top with the bolt holes mapped out; for each bolt, I drilled three holes: 1 pilot hole, one countersink to hide the head, and one for the shank of the bolt to pass through. In the picture below, I’ve attached the legs, drilled all of the pilot holes, and started drilling the countersink holes. (The big board is a glue-up of five maple boards.)

5

Here’s a closeup of the pilot holes.

6

Drilling the countersink holes generated a lot of shavings.

7

Same step, but without the shavings.

8

Here was the first dry-fit. How much would you guess that this table weighs?

9

I procured my first belt sander in order to clean up the edges of all of those pieces. Here’s an example of a pair before: there’s some glue leakage, and the two pieces of wood aren’t exactly the same width, so they don’t line up perfectly. Also pictured: my toe.

10

And here’s the same piece after belt sanding. I love belt sanding.

11

The tabletop is attached to the base with dowels and glue. Here’s the underside of the tabletop:

12

After staining both top pieces, reattaching all of the “buildings” underneath, making sure they were all square to each other, gluing on the top, and adding eight coats of shellac, this is the finished product.

14

A comparison between an updated render and the final product. Looks like I got all of the buildings in the right place!

15

The view from underneath. I thought this looked neat.

16

And from the front.

17

From the first cut to the last shellac coat, it took me about 25 hours over a month of nights and weekends, and I’m very pleased with it — I really enjoy having a one-of-a-kind piece of furniture.

Standard
Open Source

Reminiscing about old code

I imported some long-forgotten CVS repositories into GitHub last night: anyInventory and Toby Web Mail (which contains the first commits I ever made to a version control system). They are nine years old and eight years old, respectively.

Those two projects were my introduction to participating in the Open Source ecosystem. It felt magical that strangers were emailing me, asking if they could help develop and translate these projects that I had previously been working on by myself, albeit in the open.


It’s painful to read some of the code, knowing how insecure it is. There aren’t any indications that I knew about XSS or database query paramaterization. That being said, the applications still work. I was able to install anyInventory on my Web server in about 90 seconds. Thank you, PHP backwards compatibility.


My commit messages were not so great back then:

“Various trivial changes”

The commit? 12 changed files with 227 additions and 195 deletions.


Here’s the Slashdot post that was the impetus for anyInventory. I left a comment suggesting that users could solve their inventory problems by just sending all of their uncatalogued junk to me, and I included my actual mailing address. Despite concerns from other users about a physical Slashdot effect, not one Slashdotter took me up on my offer. (Also note the then-requisite SCO comment at the end of the thread.)

Drew Hearle, who submitted that Slashdot post, ended up working on the anyInventory project with me for a while.

I credit the amount of time I spent on Slashdot for my stances on open source, Web standards, and pony pranks.


I wrote Toby Web Mail so that I wouldn’t have to use Outlook Express any more, and it eventually became the basis of my college senior-year independent study project, anyMail. I think, but cannot confirm, that at one point, there were Web hosts offering both Toby and anyInventory as one-click installs. The thought of this now terrifies me. (See the security section above.)

Standard