[MTIF>http://www.sixapart.com/movabletype/docs/mtimport]
http://svn.automattic.com/wordpress/trunk/wp-admin/import/mt.php
http://www.sixapart.com/movabletype/docs/mtimport
< %
if (false) {
formatTime = "MM/dd/yyyy HH:mm:ss";
spaceName = "Main";
parentName = "Main.Blog";
sql = "where doc.web='${spaceName}' and doc.parent='${parentName}' order by doc.creationDate";
for (item in xwiki.searchDocuments(sql, 0, 0)) {
if (xwiki.hasAccessLevel("view", context.user, context.database + ":" + item)) {
docItem = xwiki.getDocument(item);
tag = docItem.getObject('XWiki.TopicTags');
categories = "CATEGORY: Uncategorized\n";
if (null != tag && (tag.get('tags') != '')) {
categories = '';
catlist = tag.get('tags');
cats = catlist.split(' ');
for (cat in cats) {
categories += "CATEGORY: " + cat + "\n";
}
}
print "TITLE: ${docItem.name}\n";
print "AUTHOR: hans\n";
print "DATE: ";
print xwiki.formatDate(docItem.creationDate, formatTime);
print "\n";
print categories;
print "STATUS: publish\n";
print "-----\n";
print "BODY:\n";
print "${docItem.getRenderedContent()}";
print "-----\n";
print "--------\n";
}
}
} %>