Neurotic Fishbowl: Automatically Export MT Entries

« Weekend Dilemnas | Main Index | I Am a Snowshoe! »
comments | incoming pings | outgoing pings



strtotime ("May 4, 2002 01:17 AM")) { ?>

Automatically Export MT Entries

I learned yet another cool thing over at Scripty Goddess. If you use Movable Type, you can generate an export file that is created each time you post to your blog. What you need to do is create a mtimport.html file and put the following code in:


AUTHOR: <$MTEntryAuthor$>
TITLE: <$MTEntryTitle$>
STATUS: <$MTEntryStatus$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
PRIMARY CATEGORY: <$MTEntryCategory$>
<MTEntryCategories>
CATEGORY: <$MTCategoryLabel$>
</MTEntryCategories>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
-----
BODY:
<$MTEntryBody convert_breaks="0"$>
-----
EXTENDED BODY:
<$MTEntryMore convert_breaks="0"$>
-----
EXCERPT:
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
-----
<MTComments>
COMMENT:
AUTHOR: <$MTCommentAuthor$>
EMAIL: <$MTCommentEmail$>
IP: <$MTCommentIP$>
URL: <$MTCommentURL$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
-----
</MTComments>
--------

Make sure to put it between ‹MTEntries lastn="1000"› and ‹/MTEntries›, using a larger number if you have more than a thousand posts. Since MT doesn't have auto exporting functionality yet, this is a handy way to get an export without having to remember to run on. Of course, don't forget to download the file every now and then.

.: Posted May 4, 2002 01:17 AM in Geeky Things, ";print substr($entry_cats, 0, -2); ?> :.






"..."




Comments

as a person that has been called in more than once to perform blog rescue, this is an excellent tip. have you posted this on the MT boards?

.: kd said on May 5, 2002 01:56 AM :: link it :.

Actually - it's from the MT boards. That's where I found it at when I posted it to ScriptyGoddess. Ben wrote it up & posted it there.

.: Christine said on May 5, 2002 12:44 PM :: link it :.

Okay, this may sound like a dumb question, however should I be leaving those "-----" lines inbetween each segment of code?

.: Catherine said on May 6, 2002 07:07 AM :: link it :.

Yes, I would. By leaving them in there, it helps make it easier to see where the entries begin and end.

.: Kymberlie R. McGuire said on May 6, 2002 09:15 AM :: link it :.

You're too early! Come back at May 4, 2002 01:17 AM to see this post.

Post a comment*:
{HTML ok, IP address logged}

Name:


E-mail Address: (Optional)


URL: (Optional)


Add a smilie (launches smilie 'palette')

Comments:


Remember info?





Subscribe to post
Unsubscribe to post
(e-mail field must be filled in)
Enter e-mail address to subscribe/unsubscribe to comments on this post without having to post a comment:
Subscribe to post
Unsubscribe to post
E-mail:
(e-mail field must be filled in) -->

* Please note: Comments that are inappropriate will be deleted - mean, spiteful, rude comments. Don't let that stop you from posting comments. Just wanted to let you know the rules of the house.