Categories


Authors

Converting Blurb BookSmart to Microsoft Word

Intro

For as long as I can remember, my grandad has been using Blurb BookSmart or Microsoft Word to write his books. Unfortunately, for a long time, he’s been struggling to complete his current book because BookSmart has become buggy and those bugs aren’t going to be fixed because it has become unsupported and superseded by BookWright.

While BookWright is very similar and there is an upgrade path, he wouldn’t have been able to get used to it.

Blurb’s support officially confirmed that they do not offer a way to export a book from their software to Word:

2021 ∕ 05 ∕ 22 17꞉09꞉26 - RE_[_Blurb_Support]_Re_Export_book_to_Word_-_Mes.png

It seemed like we were stuck between a rock and a hard place but I decided to look into whether I could convert the book myself.


The conversion process

I’m not going to go into a lot of detail right now but, essentially, I found that:

  • BookSmart’s .book files (located in C:\Users\<username>\Documents\BookSmartData\<book title>\) are plaintext and use a sort of HTML-encoded version of XML (XHTML?).

  • A free Python library called python-docx had been created by a person called Steve Canny which can create .docx (Word) files.

Great start!

It took me 5+ hours but I did manage to create a Python script that would automatically take a BOOK file, ignore the ungodly amount of blank lines, preserve / recreate the basic formatting and layout / structure, and create a DOCX file, with XML and LOG files along the way.

I have made this available as a free download at https://github.com/mythofechelon/blurb_booksmart_to_word.

Disclaimer: My Python script is only intended to be a starting point. I only designed it to work with my grandad’s book and I’m sure there’s plenty of functionality that others use which needs to be added.


Sign-off

As usual, I sincerely hope that this has been useful to someone.

Feel free to subscribe to my newsletter to be automatically notified of new blog posts in the future.

😊

How to set up restrictive email anti-spoofing policies

Windows apps for an efficient workflow