Sometimes... stuff happens |
I am a father, husband, son, friend, software developer who loves Ruby, and an unemotional robot ( or at least that's what I've heard ). |
So i’ve had this Tumblr account for a while now and never really decided what to do with it. I also had a wordpress blog that was going mildly stagnant. So the decision was made… I was going to take the plunge and move to Tumblr full time. But what about all that wordpress history? I don’t want to lose all of that.
After the decision was made I embarked on the journey to find a way to move my wordpress posts over to tumblr, but all I found was a php script that seemed dated. Really who wants to work with php anyway? So I figured, I have this wordpress export and tumblr has an API… I’m going to just write something to do this for me.
At work I recently got to use HTTParty which turned out to be really cool. So I used that to do the heavy lifting. Then I looked at Nokogiri to parse out the XML file. After reading through the documentation I realized that, hey wait a minute, Crack is required by HTTParty already… why don’t I just use that. So I did and boy was that easy.
Long story short, you now have a ruby script that will Move over your posts fairly well. At this point I haven’t gone further to implement comment or tag importing but you at least get your posts. It also has me thinking that writing a wrapper forthe tumblr API would be pretty cool. Maybe that will come next. So try it out if you want, you can find it on github.
Oh yeah make sure to turn off any sort of Twitter notifications beforethe import. I didn’t… Whoops. Sorry for the barrage of tweets this morning, followers.