Section 6.10. Exporting Blogger Data

When you publish within Blogger, you are, in actuality, exporting Blogger data in a templated format, which just happens to be readable in a browser. However, there's no reason why you can't export the data using any other template.

As an example of this process, if you eventually decide to move from Blogger to another blog tool such as Movable Type, you can export your existing posts and all associated information into a format that Movable Type can then import.

To demonstrate exporting the Blogger Data, we'll use the Movable Type Blogger Export template. To download and learn about this, visit:

http://www.movabletype.org/docs/mtmanual_importing.html#exporting%20blogger%20entries

This template is shown in Example 6-9. As you can see, it's much smaller than your existing template.

Example 6-9. Movable Type blogger export template
<Blogger>

AUTHOR: <$BlogItemAuthor$>

DATE: <$BlogItemDateTime$>

-----

BODY:

<$BlogItemBody$>

--------

</Blogger>

Once you've backed up your existing template, copy the Movable Type export template over it and save the change. Next, access the Settings view and the Publishing tab and change the name of the generated file to export.txt, to prevent overwriting your existing blog page. Save this change. Access the Formatting tag next and change the count of postings to cover the number that you want to export. At this time, the value is set to seven days' worth of posts, which we'll leave as is.

If you want to export all your data, just make sure you pick the Latest Posts option, and set the number of posts to be greater than the number you know you have.

Finally, access the Archive tab and turn archiving off, so that you don't override the archived pages. Publish the page.

The results of the exportation of the data are:

AUTHOR: Shelley Powers  

DATE: 11:24 AM  

-----  

BODY:  

<img src="http://www.oreillynet.com/images/javascript/javascript_logo.jpg" 

align="right" vspace="10px" hspace="10px"><br><b>Blogger<

/b> is a weblogging tool that's accessed online. It can be found at the 

<a href="http://blogger.com">Blogger web site</a>, and takes

 <i>very little effort</i> to create either an account, or your first weblog. 

Once you've seen how easy weblogging can be, you'll wonder 

why you didn't try weblogging sooner.   

--------

Because there's only one posting, there's only one entry in the exported file. If there were more postings, there would be more entries.

Once you're finished, return your blog filename back to the original, turn archiving back on again, and change the number of posts back to what you normally display. Any format can be used to export the data. You can export into a spreadsheet format, a plain text format, or even a specialized XML format.