Importing Data

Published:

thumbnail

Importing my data from WordPress to Pelican seemed like it would be a quick and simple task, only mildly complicated by cleaning up the cruft of miscellaneous accidentally generated tags, and not bothering to copy over things like unpublished drafts and so on.

It actually has taken me hours, at least two hours today and one or two yesterday, mostly because not every file was ready to go after being imported via pelican-import. Secondarily because I had to make some structural decisions about what to store where, and that resulted in a bunch of troubleshooting relative links after finding a little bit of syntax here, and a little bit there, and no real good clear reference for what I was trying to do. (Writing Content in Pelican's documentation and the reStructuredText Primer in the Sphinx documentation were my best references, along with tons of Google searching and a few hints here and there on StackExchange.)

The biggest hurdle I faced was troubleshooting a (SEVERE/4) Title level inconsistent: error on the Selecting a Database article; Pelican really didn't like the way the import tool had assigned syntax to my organization scheme (which was, admittedly, a little overcomplicated). After a bunch of swapping ~~~~ for ---- and a bunch of ---- for ====, it finally behaved itself, but I don't really care for the way Pelican (or I should say, Sphinx) handled the various levels of headers in this case. I can see the argument for making it fairly automatic so the user doesn't have to worry too much about levels, but I may in fact use Markdown if I have to create a multi-header-level file in the future, since Markdown allows you to specify which h-level you want, instead of making Sphinx guess.

Overall, though, I'm happy with the process and my next step will be to make a smooth transition from the WordPress site to my Pelican generated static files. I could worry about the theme first, but frankly, I prefer to get the working data up and running (and escape WordPress ;D ) as soon as possible. Then, I can play with themes until I like something, and update accordingly. My next update should be 100% Pelican!

This post is tagged: