One of the many things that I don't do much is make a backup of my blog. Until recently the last backup was from 2005. This post is to help anyone else that had similar similar issues using
MovableType 2 (version 2.661).
Most posts on the 'net say "just press the export button". One of the complications that I have is:
1) I don't have access to the command line or db
2) I've never had access to the export command
So, using either a template or scraping the html was the only way to grab the content. I found a
really helpful post on a export template. The only issue was that it was written for a version of MT 2 versions newer than what I needed. So below is the tweaked template that I used. It's not perfect, but it's easier than scrapping html. The
lastn
attribute is for the max number of attributes and I had to remove the mt:if statements because those were from MT v4 (but I can't find the link right now).
<MTEntries sort_by="created_on" sort_order="ascend" lastn="25">
AUTHOR: <$MTEntryAuthor$>
TITLE: <$MTEntryTitle$>
BASENAME: <$MTEntryBasename$>
STATUS: <$MTEntryStatus$>
ALLOW COMMENTS: <MTEntryIfAllowComments>1<MTElse>0</MTElse></MTEntryIfAllowComments>
ALLOW PINGS: <MTEntryIfAllowPings>1<MTElse>0</MTElse></MTEntryIfAllowPings>
DATE: <MTEntryDate format="%m/%d/%Y %H:%M:%S"/>
CONVERT BREAKS: 1
<MTIF tag="EntryCategory">PRIMARY CATEGORY: <MTEntryCategory/>
<MTEntryCategories lastn="1000">
CATEGORY: <$MTCategoryLabel$></MTEntryCategories>
–––––
BODY:
<$MTEntryBody$>
–––––
EXTENDED BODY:
<MTEntryMore/>
–––––
EXCERPT:
<MTEntryExcerpt no_generate="1"/>
–––––
KEYWORDS:
<MTEntryKeywords/>
–––––
<MTComments lastn="1000000">
COMMENT:
AUTHOR: <MTCommentAuthor/>
EMAIL: <MTCommentEmail/>
IP: <MTCommentIP/>
URL: <MTCommentURL/>
DATE: <MTCommentDate format="%m/%d/%Y %H:%M:%S"/>
<MTCommentBody/>
–––––
</MTComments>
<MTPings lastn="1000000">
PING:
TITLE: <MTPingTitle/>
URL: <MTPingURL/>
IP: <MTPingIP/>
BLOG NAME: <MTPingBlogName/>
DATE: <MTPingDate format="%m/%d/%Y %H:%M:%S"/>
<MTPingExcerpt/>
–––––
</MTPings>
––––––––
</MTEntries>
No comments:
Post a Comment