This is a simple XSLT script to convert a livejournal XML export in to ikiwiki compatible files. The script creates multiple files which are named YYYYMMDD_SUBJECT.mdwn

Script attempts to preserve as much information from the original data as possible, by setting the date of creation and updated metadata based on the information on the export file. It also tries to be reasonable with the file naming, but it's not fool proof.

The script can be run with xsltproc like this: xsltproc -o /tmp/conversion/log convert.xsl exported-data.xml

The files will be output to the directory with the log and can then be moved to the ikiwiki installation.

Parsing comments

The script is now capable of parsing comments as well. It will output comments in a format that the comment plugin will understand. You can fetch the comment data by following instructions on the livejournal comment export page

Download both body data and the metadata in to separate files and edit the script so that it knows where to look for the files.

The script is available for download.