Migrating from WordPress to Plone

We are working now on the migration of a news site that is currently using WordPress.

We discovered transmogrify.wordpress but, unfortunately, we couldn't use the pipeline sections included there as it was developed to work on top of a WXR export and we only had access to the phpMyAdmin interface.

We ended up exporting some tables in CSV format and writing some additional pipeline sections that I want to merge into the package but I need help on doing some code review.

If anybody over here has/have a similar challenge it would be nice if you can take a look on it.

The sections are the following and are documented on the pull request:

  • transmogrify.wordpress.csvsource: source section that reads information from several CSV files and solves some mappings on users, categories and tags.
  • transmogrify.wordpress.fetchattachment: fetches attachments from the original site by requesting the content and setting the _data field of the item.
  • transmogrify.wordpress.datesetter: sets creation and modification dates of items.
  • transmogrify.wordpress.postprocessor: post-process items after import; it replaces paths with internal links (those that refer to the same domain we're importing), with calls to resolveuid and adds as related items those that ping back to the item.

If there is a better way of doing something please let us know; this is the first transmogrifier I write in 5 years and I discovered that there are some new sections that I'm not aware of.