Thanks to the popularity of ebook readers and software for writing books for reading on those devices, self publishing a book has never been easier. Sure, the writing part is still the toughest portion of the process but once you’ve done that you can quickly and (fairly) easily share your work with a wider audience.
Having published two ebooks, and being in the process of putting together another one or two, I’ve learned that after writing a book you need to do a few more things before making it available to the world.
Let’s take a look at two of the tools that I use before publishing an ebook.
EPUB files are very structured. I’m not just talking about the chapters (which is made up of individual XHTML files) but also the way in which those files, the supporting files, and the directory structure inside an EPUB file are arranged. If you read more about that in the notes for a presentation I gave in 2011.
No matter how careful you are or what tool you’re using to create or assemble a book in EPUB format, you can make a few mistakes. That’s why you need to validate your book before setting it loose. Validation is the process of making sure that your EPUB books contain all the elements that ebook readers expect. Like what? Here’s a partial list:
- Complete metadata
- The proper directory structure in the EPUB file
- Valid XHTML
- Working links and references to files in the EPUB file
- A table of contents
Validation isn’t difficult. And a command line tool called epubcheck makes it fairly easy. epubcheck is a Java application, so make sure you have a fairly recent JRE installed on your computer.
To use epubcheck, just run this command:
java -jar epubcheck–3.0b5.jar ebook_file.epub
Here are the results of a run I did with a partially-completed ebook:
In this case, the file names I’d given the individual chapter titles contain spaces. Not a massive sin, but one which can cause problems.
Keep in mind that tools like epubcheck are great at finding problems. But in many cases, they’re lacking when it comes to explaining what those problems are, specifically. It assumes that you have a level of knowledge and the knowledge to fix the problem. That’s not always the case.
When a writer of my acquaintance was validating an ebook, he got an error message telling him that there was invalid HTML syntax in a particular file. He has a decent knowledge of HTML and went to the line number that the validator pointed to in the file, and he didn’t see anything wrong. He enlisted my help, and discovered that the validator was expecting paragraph tags around text surrounded by blockquote tags.
Still, validating an EPUB file only takes a few moments. And you don’t necessarily need to go to the command line to do it. epubcheck is also included in Sigil, a nice WYSIWYG EPUB authoring tool.
Like it or hate it (and there’s a lot in between as I understand), Amazon is the biggest and arguably most popular marketplace for publishing, selling, and buying books. Amazon, however, uses a proprietary format with the extension .mobi. And apart from BookType, there aren’t any free or Open Source tools for creating books in the .mobi format.
But you can convert your ebooks to .mobi using a command line tool called KindleGen. KindleGen converts a number of formats – including HTML, XHTML, and EPUB – to .mobi. And it’s quite easy to use.
To convert an EPUB file to .mobi, run the command:
Depending on the size of your file, the conversion takes only a few seconds. Here’s what the tool returns at the command line when you run it:
The conversion isn’t too bad, either. Here’s what an EPUB converted to .mobi looks like in the Calibre ebook management application:
Question to ebook authors out there: are there any utilities that you find useful? Feel free to share your picks by leaving a comment.
This work is licensed under a Creative Commons Attribution 4.0 International License.