I’ve been planning this for a while. I had written my own blog engine, it’s been bits and pices of code I’ve been patching to each other with band aid and chewing gum…
It was good for late 90s and early 2000… However the net changed, I had to move on, I didn’t update my blog code accordingly, it became sluggish, I became sluggish… No updates on my blog, no updates on my code… So I made one last leap and wrote a small perl script to port my contents to wordpress. It went OK. The content was there, well, at least the text part of it.
The images were another story. I was too lazy to write regexps to cover all my possible images in the content while importing. So I used some mod_rewrite tricks. I think it covered most of my image content.
I preserved the same story ids while importing, this gave me a lot of flexibility on the content that are “famous” on my blog: Like this one, and this one. They were contents that were constantly searched and linked. I couldn’t afford to lose them. So some more mod_rewrite magic needed. Like converting links like http://emresaglam.com/blog/haber.php?id=183 to http://emresaglam.com/blog/183
In the end, I spent almost equal time writing my perl script and my mod_rewrite rules 🙂 (for mod_rewrite: 3 lines to cover RSS, 5 lines to cover image contents plus friendly urls and backward compatibility) I’ll share them sometime when I’m not lazy.
Well, hopefully I’ll go back writing stuff again 🙂