An Improved Interface for Migrating to Jekyll
27 Dec 2010
I’m a sucker for shiny new services, which means I’ve swapped out blog hosts around half a dozen times. This is the third time I’ve come back to Jekyll, and the importing system hasn’t really changed since I first migrated from self-hosted Wordpress.
My latest migration is from Posterous - a solid blogging system, but lacking in customisation, and with my recent move to self-hosting, I wanted to consolidate my stuff.
There is no easy export option for Posterous - the only method of getting your data out is to use their API.
I set about writing an importer for Posterous, then noticed this ticket asking for a better import CLI.
After a little hacking around, I present: A Blog import command set for Jekyll.
Usage
To import a blog from another service or export file:
CSV
jekyll import csv --file=</path/to/csv.csv>
Typo
jekyll import typo --dbname=<database name> --user=<username> --pass=<password>
TextPattern
jekyll import textpattern --dbname=<database name> --user=<username> --pass=<password> --host=<hostname>
MT
jekyll import mt --dbname=<database name> --user=<username> --pass=<password>
Mephisto
jekyll import mephisto --dbname=<database name> --user=<username> --pass=<password>
Drupal
jekyll import drupal --dbname=<database name> --user=<username> --pass=<password>
Wordpress
jekyll import wordpress --dbname=<database name> --user=<username> --pass=<password>
Wordpress.com
jekyll import wordpressdotcom --file=</path/to/export.xml>
Posterous
jekyll import posterous --user=<email> --pass=<password> --site=<sitename (default is primary site)>
Note that the Posterous importer is required for this to work.