Converting your Blogger blog posts into a Book

We're always up for a new challenge. This one was posed to us by +Ben Morrell who wanted to transform his blog into a book, or more simply a Word document that he could edit before shipping off to a printer. Sure, he could have gone and copy/pasted each blog post into Word, but his blog was started in 2002, having over 10 years of blog posts.

But we've managed to create this transformation process using tools that all bloggers likely have at their disposal.

Step 1: Getting an export of your blog's contents
The best way to get all of your content out of Blogger is by using a site called the Data Liberation Front. The DL is an engineering team inside Google whose purpose is to make it easier for users to move their data in and out of Google Products (so it's safe!). Go here to grab your content out of one of your blogs (by clicking on Configure then Create Archive). You will receive a ZIP file from this export which contains a file inside such as YourBlog.atom.

Step 2: Rename the file
Open up the ZIP file and drag the YourBlog.atom file into a folder on your desktop. Rename the file from YourBlog.atom to YourBlog.xml

Step 3: Download the style sheet and xsl template
Download this style sheet and this XSL template and save them in the same directory with your new YourBlog.xml file.

Step 4: Edit one line in the XML file in a text editor
Open the XML file in a text editor and change:
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
to be
<?xml-stylesheet href="transform.xsl" type="text/xsl"?>

Step 5: Drag the XML file into either the Safari or Internet Explorer browsers
Yes, Safari browser or Internet Explorer browser. Chrome and Firefox might try to apply their own default styling to the XML file, so it works beset in these other two browsers.


The XSL file we've set up is set to do the following transformation:
<h1>Post title</h1>
<h2>Post author</h2>
<h3>Post date</h3>
Blog post content

It does this in reverse order, so it's going from Oldest to Newest posts. If you'd like you can change this to be ascending in the XSL file, and you can add more to the XSL file if you'd like to bring in comments, but we figure this is enough for most. It will also load in external images for the blog posts.


Step 6: Select all and copy paste into Word
This might be a bit tough depending on how big your blog is, but we were able to do a 12 meg blog archive pretty easily. Simply select all, copy, then open a new Word document and hit paste. You might need to wait a bit, but it will work.

Step 7: Save the Word document
Save the document before you start working on it! Once saved, you can edit to your heart's content, resizing images, moving them around, reformatting... everything. Links and images are all preserved as well as much of the formatting.


And that's it! If you have any questions please leave them in the comments below!

Related Posts

Post a Comment

Subscribe Our Newsletter