Importing Into MoveableType
July 13, 2004 2:19 AM Subscribe
I'm looking to import entries from another journalling system into MT, but I lack the scripting skills necessary to convert the entries into an MT-friendly format. [Less inside. Less is more!]
These entries are stored in plaintext files, which are named after the date of the entry. There's metadata at the end of the file to tell the journalling software what's up.
As an example, this would be the contents of file 20030908:
Quisque luctus scelerisque lorem. Mauris eget est. Cras at tortor. Suspendisse facilisis pellentesque ante. Vivamus aliquet. Donec nisl. Donec arcu. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nam quis nulla non nunc viverra euismod. Nam porta libero sed enim. Aliquam erat volutpat. Ut est eros, malesuada ut, feugiat at, accumsan sit amet, lectus.
Nam blandit ligula interdum lacus.
{title=lorem ipsum is rad, man.}
{template=main}
{datestamp=200309080741}
I need a script that will convert a directory full of these files into a format I can pull into MT. Being able to specify the author/category would also be nice, but really all I need is the entry, the title, and the date.
Is this a terribly difficult thing to code up? Should I be offering to pay someone to write it?
posted by Jairus to computers & internet (5 answers total)
- EditPad for PC or BBEdit for Mac.
- The Movable Type Import Format
- Regular Expressions [tutorial, self link]
Unfortunately, Dean Allen's tutorial on Textism.com -- which I point to from my subsequent tutorial -- seems to have vanished. But if you get stuck I'd be happy to help.posted by Aaorn at 4:52 AM on July 13, 2004