After my flash of insight I’ve decided to build a tool to help me migrate apocryph.org away from drupal.
Requirements are:
- Work with my Drupal configuration
- Not so tightly coupled to my Drupal configuration that no one else can use it
- Output posts in a neutral format that users can post-process and import into other tools
- Preserve all the important elements of each post, including:
- Formatting. Most posts are in Markdown, and a few are in SmartyPants. Those must be converted to XHTML using the same rules which generate the markup in Drupal
- Files. A few of my posts have files attached, usually images but sometimes other stuff. Those files must be preserved themselves, and any references to the files from within a post (like IMG or A elements) must be preserved as well
- Metadata. The tags, author, timestamp, published/unpublished flags must be preserved
- Links.