Things that Work: BBedit 9

This past week, I’ve been making my published novels available as ebooks. My experience with Emperor Dad and then Roswell or Bust being out as iPhone App ebooks was encouraging. I don’t make much on each sale, but it does put the stories out there where more people can find them. When I was asked if they were available in other formats, I began the process of converting them to Kindle and Mobi formats.

Both processes are very similar. You feed in your novel in one of several formats and it is converted into a dumbed down HTML version. Then comes the process of editing the HTML so that it displays correctly.

I have to wonder if Kindle was a reengineered mobi format. But in any case, the readers only handle a subset of HTML, not like the WebKit based version in the iPhone. Graham Perks did the conversions for the iPhone Apps, and for that I’m grateful. It wasn’t a simple conversion.

When I ran into the problem that the Mobi Creator software wouldn’t convert my Mac Word document, I experimented and discovered that PDF to HTML conversion of both Mobi Creator and the Kindle web tools was a adequate first pass. But only a first pass. I had to convert that code created by dumb automation and fix it. For that I needed a good HTML editor.

For years, I’ve been using BBEdit. Maybe back to the original version, I don’t know. My memory isn’t that good. However, I stopped upgrading back at BBEdit 8 because I was using iWeb for my main website and was no longer hand coding the HTML. But now I needed to do that again. The upgrade was cheap, and I discovered that version 9 is a nice improvement of an already classic tool.

BBEdit has more options than I’d ever use, but let me tell you what I did.

I went to the Kindle page and fed the PDF of my trade paperback novel in. After a moment’s crunching, I could preview the resulting code in their on-line Kindle emulator. It was pretty ugly. I downloaded the HTML that had been created and unzipped it. On some of the novels, the auto-conversion had even created a table of contents, but on others it hadn’t. I did some minor content editing, like changing the ISBN number for the new ebook version, but it was mostly formatting.

My paper version (and the iPhone App version) had nice dropcaps at each scene change, but Kindle doesn’t do that, so I had to do a simpler version with just the font size command. Interestingly, the automatic conversion changed some of them into a h3 block, some into a h2 block and still others into a lettrine tag, which I’d never heard of, not that they actually worked in the ebook version.

The conversion also was rather erratic in its placements of paragraph blocks, sometimes using p‘s and other times using br‘s. I had to fix that. Thousands of changes through the novel. Conversion of styles sometimes came up with strange colors, I don’t know why. In all, there were hours of manual changes. The bulk was done with BBEdit’s nice grep-capable find and replace, but even then, it had to be eyeballed. A keystroke gave me a side by side rendered version where I could spot layout problems. Once that was done, I was able to use the built-in Tidy functions to convert everything to XHTML and scan for errors. There were thousands of them, and I had to knock them out manually. This is not a job for a script. Mangle formatting of a dialog and the reader will never understand the book.

Once I finished the Kindle formats and published the books that way, I fired up my tame Windows version and fed the Kindle HTML into MobiPocket Creator, and relatively easily created the mobi versions and put them up on the MobiPocket store.

So, now I’m done. I fed dumbed-down, clean HTML into the ebook publishing programs and I now have my books out there for people who prefer to read on their Palms, cell-phones, etc. Now to see if there are any sales.


  1. very nice…really good RnD done. But you could have saved all ur hassles and precious time by just goin to site is for those who need their books and different formats of files to kindle and mobipocket. U also get a chamce to view ur output on a emulated kindle and once you are happy with the results,only then it is proccesed and you can upload it in your amazon account for sale.

Comments are closed.