wordpress → typo → mephisto
Now, bear in mind, there are decent scripts lurking in vendor/plugins/mephisto_converters
that will do a reasonable conversion from either Wordpress→Mephisto or Typo→Mephisto. The problem that comes up, however, is the dichotomy between categories and tags. While I was still using Wordpress (which only offers categories and does not offer tags), I was basically using categories as tags. I never really did get into the whole semantic partitioning between categories vs. tags and find that tags alone satisfy my organizational mindset (meaning, complete chaos, but I digress.
I will not go into how to use these converters, as you can follow these instructions regarding converting from Typo→Mephisto. I imagine the conversion from Wordpress→Mephisto is quite similar, although I haven’t tried it myself.
But, given the aforementioned dichotomy between categories and tags, my previous migration from Wordpress→Typo correctly imported the Wordpress categories as Typo categories. However, for some strange reason, I decided once I started using Typo to only use tags and not categories. This resulted in about a year and a half’s worth of posts with categories but no tags, and a week’s worth of posts with tags but no categories.
I then proceeded to migrate all the posts from Typo to Mephisto (using the instructions I mentioned above.) Unfortunately, the migration script seems to only pick up one set of delineators (categories OR tags, but NOT both). And not only that, it munged the tags that I did have as described, joining them all into single supertags with embedded commas. Not exactly what most people want.
Since there were only 10 or so posts from the previous week while I was using Typo, I ended up just manually fixing all the tags. However, this left all of the Wordpress categories that did not survive the transition through two blog systems. I transiently entertained the notion of manually tagging each and every post, using a backup of my Wordpress database as a reference, but I soon came to my senses and decided to do this programatically.
The following is based entirely on the code from the above referenced website that fixes Mephisto tags based on Typo tags from the Typo database, except that I was fixing Mephisto tags based on Wordpress categories from the Wordpress database. You can just enter all of this at the ./script/console
prompt:
require "converters/base"
require "converters/word_press"
WordPress::Post.find(:all).each do |wp|
mp = Article.findby_permalink(wp.postname)
wp.categories.collect{|c|c.cat_name}.each do |cat|
Tagging.set_on(mp,cat)
end
end