History of Importing Content From Other CMSs
Version 6 | Current version | |
---|---|---|
If you port content from another CMS you can add your technique here. Importing Blog Posts from TypepadBe sure you make a backup of your site and test this importer on a non-live site before running this importer on your live site.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 TemplateFirst 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.Typepad template to export data to php hash
Once you have saved this template publish the content and then copy paste the results to a new file called output.php Step 2. Clean Up Text From TypePadThe next thing we need to do is escape quotes in our content and then convert those tags we used in step one back to real quotes. Using command line run the following:Fix typepad output
You now have a new file typepad.php. This should now be a valid php hash of blog post data to store. You can test the file is valid by running the command $ php -l typepad.php Step 3. Configure The Installer.The following code is an installer script which will push each blog post into your bitweaver database. There are a couple of values to set. At the top is $user_id, this is the id of the bitweaver author you would like to assign all the posts to. The second value to set is $blog_content_id, this is optional. All the posts will be stored as the user's posts. If you also want the posts crossposted to a blog on your site, then you should assign the content id for that blog. If you don't to crosspost to any blog leave the value as = 0.Import script
Save this file as something like import_typepad.php. Step 4. Run The ImporterAll that is left is to run the importer. You need to put import_typepad.php and typepad.php in your root directory. Then just load the import file in your browser. Depending on how many records you are storing the importing could take several minutes. Be sure you make a backup of your site and test this importer on a non-live site before running this importer on your live site. | If you port content from another CMS you can add your technique here. Import Scripts and TutorialsImporting Blog Posts from TypepadIncludes templates, scripts and step by step instructions for exporting data from Typepad and importing it into bitweaver BlogsPackage. Additional ToolsConvert HTML to Tikiwiki SyntaxCPAN has a perl script: HTML-WikiConverter, which you can use to convert HTML content to Tikiwiki syntax. This is especially useful for importing hundreds of html pages into WikiPackage, or any package that you want to use Tikiwiki syntax in. There is also an online version of the script if you just need to convert a few pages. |