A coworker of mine has been keeping a blog with Typepad for several years now. As of recently he decided he wanted to switch to using WordPress on one of our servers. This is usually easy; you export your blog from the original site and import it using the appropriate plugin. WordPress provides great plugins for importing a blog from various other sources, so an import usually doesn’t require too much work. The current Typepad plugin has one big flaw though; it doesn’t import your photos! To make matters worse my coworker’s blog is a photography website with several hundred posts and even more photos. The photos are essentially stuck on Typepad’s servers since manually linking each picture through WordPress would be an incredibly grueling process.
I decided the only way to make this work was to modify the plugin and add the much needed image downloading functionality. Thanks to some of WordPress’ excellent building functions and a lightweight open source HTML parsing library I was able to do this with relative ease. Here’s how it works...Continue reading