Wednesday, December 19, 2007

Welcome to the new Methot.net!

I started this project back in March. My geek friend Alex is my tech idol. He moved all of his photos to Picasa Web Albums and his blog to Blogger because it simplified his life. I wanted to be just like Alex. Then I signed up for the Bioinformatics Certificate program and my spare time for projects like this went away. But, as is my habit, I thought a lot about how to do it on my mind's back burner.

Finally, after my Biostatistics final exam on December 8th (I think I aced it, grades aren't posted yet) I had time for personal projects again.

The first order of business was to get the photo albums moved. The blog posts all contained links to the albums in the their old locations at methot.net/gallery. I spent some time writing a program to move them, but then realized that those albums all originally came from iPhoto on our Mac. So I had the bright idea to just re-export them to Picasa Web Albums. That took a few hours but was, as Alex would say, easy peasy.

Then I had to update the links in all the old blog posts and make their formatting consistent. Wordpress uses MySQL. I dumped that database and made a local copy. Then I edited the MySQL export script directly and updated all of the photo gallery URLs to point to the albums' new homes at Picasa Web Albums. Once that was done I imported the modified Wordpress database into my local MySQL server.

After that it was a fairly simple matter to write a little Java program that read the posts from MySQL and used the Blogger API (Google published great APIs to a bunch of their tools) to post them to Blogger, complete with their original post dates. Viola! You can read every post since I started blogging at the new location, and all of the album links in the posts point to the photo albums' new locations.

The final steps were to redirect my Feedburner RSS feed to the Blogger version of the blog and set up email notification for my readers who live in the dark ages :). I think that's all working now.

The only thing missing is the photo captions that I had entered by hand in Gallery. But I can write a program to go find all those and transfer them to the Picasa version. And if I want to get really ambitious, I'll transfer all the really old albums at http://methot.net/photos to Picasa Web Albums. That's a much more difficult problem because they were created using an old photo editing application (LView Pro) that emitted very dirty HTML that's hard to parse automatically.

Anyway, here we are. Thanks, Alex, for the inspiration (and always for the geek advice and guidance). Welcome, everyone, to the new methot.net!

2 comments:

ark said...

Oh yeah, that's right! You have learned well grasshopper!

Bill Napier said...

Hey John, I've been reading and enjoying your blog, and wanted to ask you about the Bioinformatics Certificate you're working on. Is that with the UW?

Things at FOH are pretty much the same - still fun and educational for me.

Bill Napier
wfnapier@hotmail.com