chrismeller / import

Habari plugin to import data from a BlogML XML export into your blog. Note that it currently does not support comments!
http://habariproject.org
3 stars 1 forks source link

Handle Post Slugs Better #4

Open chrismeller opened 11 years ago

chrismeller commented 11 years ago

The export plugin uses the post's permalink as the post url, which makes sense.

The import plugin, though, uses the post url as the slug.

One of these needs to change, I'm just not sure which.

chrismeller commented 11 years ago

Note that we do export the actual slug itself in the post-name element. This doesn't seem to be compliant with BlogML, though (I have no idea what its use is supposed to be), so we shouldn't assume that's where it is.

rick-c commented 11 years ago

The sample blogml file at http://blogml.codeplex.com/releases/view/60036 has the post title in the post-name field, as well as in the title field, a clear duplication of data. Also, the xsd declares that the posttype can have 0 - 1 instances of the post-name field. I think the field can be safely ignored completely, especially since we use the post slug as the post url internally.