Nucleus2drupal conversion
Rading about Drupal migrate.module made me think back to somewhere in 2008.
There I was, searching a way to migrate content from Nucleus (version 3.3x) to Drupal 6.
Some ‘migrate’, ‘import’ or ‘xxx2drupal’ modules for Drupal could be found, but none of them were suitable for Nucleus source data. It also seemed like some HTML fiddling was required to really make the content ready for publication on Drupal.
I decided to learn some Ruby and a bit of Drupal’s database scheme by processing exported Nucleus tables and transforming them into INSERT statements for Drupal’s tables. Countless hours were wasted learning how to preserve articles, comments, authors, categories and more…
The little Ruby script eventually did the trick. Now that it’s practically too late to be of any use (it’s been almost two years!), I’m nonetheless enticed to release nucleus2drupal.rb v0.1 onto the pipes.
If you want to try, here’s how it goes:
- Unpack nucleus2drupal.
- Export your Nucleus tables (
category,comment,item,member) using phpMyAdmin into the queries-source directory (nucleus_category.sql, etc). - Modify the query templates in the
queries-insert/directory so that they’ll work for your Drupal database. - Take a look at
nucleus2drupal.rbitself and the settings (and warnings) therein. - Execute
./nucleus2drupal.rb. - If the resulting SQL files (directory
queries-insert/) look okay, then execute them against your (test!) Drupal database.
I’ve tried to clean up most hard-coded specifics, but your mileage may vary. Remember to pay close attention to text encodings along the way if your content is beyond plain ASCII.
Should you eventually fail, let me know how you’re liking that Migrate module instead
December 13th, 2009 at 12:21
thank you, just what i needed