History of Importing Content From Other CMSs
Version 1
Importing Content From Other CMSs
If you port content from another CMS you can add your technique here.
Importing Blog Posts from Typepad
TypePad won't let you do a database dump of your blog posts, but it will let you dump all your posts and related comments via a custom index template. For this example, we start with a blog by a single author and we create a custom template that generates a text document which we can easily convert into a php hash, which we will then process to push the posts into our bitweaver install.Step 1. The TypePad Template
First thing to do is in TypePad create a new index template. This index file will generate a text file that looks similar to a php hash. Note that because we can't escape quotes in our blog posts text we don't use quotes for our hash, we use %QUOTE%. In the next step we will escape all quotes in our content and then convert the %QUOTE% tags to real quotes. Also worth nothing, in this example, we push TypePad categories into Tags. This assumes you are using the TagsPackage. You could use a similar technique with PigeonholesPackage.
<?php
$typepadHash = array(<MTBlogIfArchives archive_type="Individual"><MTEntries all="1">
array(
%QUOTE%title%QUOTE% => %QUOTE%<$MTEntryTitle encode_xml="0"$>%QUOTE%,
%QUOTE%date%QUOTE% => %QUOTE%<MTIfNonEmpty tag="MTEntryDate" format="%a, %d %b %Y %H:%M:%S %z" language="en_US"><$MTEntryDate format="%a, %d %b %Y %H:%M:%S %z" language="en_US"$></MTIfNonEmpty>%QUOTE%,
%QUOTE%data%QUOTE% => %QUOTE%<MTWeblogIfFullRSSContent><MTWeblogOwnerHas field="feeds_full_content"><$MTEntryBody encode_xml="0"$></MTWeblogOwnerHas></MTWeblogIfFullRSSContent>%QUOTE%,
%QUOTE%comments%QUOTE% => array(
<MTComments>
array(
%QUOTE%anon_name%QUOTE% => %QUOTE%<$MTCommentAuthor$>%QUOTE%,
%QUOTE%date%QUOTE% => %QUOTE%<$MTCommentDate format="%a, %d %b %Y %H:%M:%S %z" language="en_US">%QUOTE%,
%QUOTE%data%QUOTE% => %QUOTE%<$MTCommentBody$>%QUOTE%,
),
</MTComments>
),
%QUOTE%tags%QUOTE% => %QUOTE%<MTEntryCategories><$MTCategoryLabel encode_xml="0"$></MTEntryCategories>%QUOTE%,
),</MTEntries></MTBlogIfArchives>
);
?>