Ebook Publishing Using Linux Tools

Digital books, aka “ebooks” are going to change the publishing world just as iTunes and digital music have changed the music industry.  At the moment, Amazon’s Kindle seems to be the biggest fish in the pond.  While the actual numbers are fuzzy, Amazon’s Kindle appears to be driving ebook growth, as suggested by this article.

Recent news points to authors making a dramatic shift from traditional publishing houses to self-publishing, as pointed out in this article that describes why Barry Eisler turned down a $500,000 deal from a mainstream publisher, choosing instead to self-publish.  This particular article was in fact my own tipping point: I had written a science fiction novel 30 years ago that I was unable to get any of the publishing houses interested in at the time.  I thought to myself, “Why not?”  So I dusted off the old digital manuscript, completely rewrote the story, and recently published it on Amazon’s Kindle publishing site.  BTW, for more info on how the original digital manuscript migrated from machine to machine over that thirty year period, see the Author’s Note on the home page for my novel, Second Cousins.

As a long-time hard-core Linux user, I thought that some of you other Linux folks might be interested in how to write and publish a Kindle ebook using only Linux tools.  Before I give the the list of required software for publishing a Kindle ebook using Linux (it’s a short list), I want to point out there there isn’t any good single “Howto” guide that I’ve been able to find that describes the best way publish a Kindle ebook.  There are a whole bunch of references that describe part of the process, like this one for example that describes how to create an NCX file that will enable live table of contents navigation on the Kindle.  I spent a lot of time diddling with XML and OPF (Open Packaging Format) files before deciding that this was not the way to go.  

Likewise, some of the Kindle HowTo references out there suggest writing your book using an html editor, defining bookmarks and tags to specify the table of contents, cover, and start page  in such a way that the Kindle device will recognize them. Again, wrong approach, IMO.  When I write, I want to focus on the story, not the software.

Then I found The Answer: this.  An OpenOffice template specifically designed to support publishing Kindle ebooks.  And that, ladies and gentlemen, is the only software you need to publish a Kindle ebook on Amazon.  If you follow the simple Youtube video instructions for using this template, you can directly upload the .doc file generated by the template to the Amazon Kindle publishing site.  No muss, no fuss.  This file contains all the tags and bookmarks necessary for a Kindle device or one of the free Kindle reading apps to be able to render the cover, table of contents, and book contents correctly.  Further, the OpenOffice Kindle template formats your text such that you see your book as it will appear when viewed on the Kindle.

Considering the amount of time I save by using this template, the nominal fee charged by its developer is well worth it for me. However, if you really do want to write your book in html, and create the ancillary NCX and OPF files, you can do this and then create an uploadable Kindle ebook file using the free Kindlegen app from Amazon.  But seriously, why would you want to?

 

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

E-book

SuperVPN's picture

I love to read books and Ebook is great for me! Very easy and perfect!
I didn't try Linux, but it seems to me that it is not bad. I must try it!

Thanks Doug for the info. I

Advantix For Dogs's picture

Thanks Doug for the info.
I also want to publish ebook.. maybe sell it to
can get a lot of money ...

now, to the Open Office...

Your Gift for Your beloved Dogs in 2011 : Advantix For Dogs

LyX

daisyJRT's picture

Another useful tool is LyX. A LaTeX Front end. It takes some getting used to but you can focus on the writing and let it do the typesetting/formatting. Easily exports to PDF or HTML. Then you can use Calibre to convert to EPUB.

Daisy
www.bohemjewel.com

RE:Ebook Publishing Using Linux Tools

William Smith's picture

That’s really great new to hear. It’s interesting to see how much change would be there after new publications.

the future

Anonymous's picture

Keep your eyes and ears on the lookout for PressBooks. It's on the horizon.

E-book template for OOO, Libreoffice

Script Doctor's picture

Very interesting thread regarding the open source template and Scrivener for Linux. Thanks for posting this.

Open Office template for Kindle

John Hardin's picture

Very interesting thread regarding the open source template ...

I'd point out that the template itself is commercial. There's no license information available on the website, but because he's charging for it I suspect the template itself is not open source licensed.

Another useful tool is LyX. A

Anonymous's picture

Another useful tool is LyX. A LaTeX Front end. It takes some getting used to but you can focus on the writing and let it do the typesetting/formatting. Easily exports to PDF or HTML. Then you can use Calibre to convert to EPUB.

WWW.lyx.org

www.calibre-ebook.com

creating ebooks

LM's picture

Personally, if I'm going to create an ebook, especially if I'm going to the trouble to do it with Free, Libre and/or Open Source Software, I wouldn't want to stop at just using free software, I'd want to create it in a format that would encourage free interchange. There was a really interesting article at A List Apart by someone who wrote a regular book (not an ebook) using HTML and CSS as the formatting language. The book was converted to PDF and then published professionally. Users can do all of that themselves with Free and Open Source tools such as a text editor or HTML editor like Kompozer and HTML conversion tools such as wkhtmltopdf or html2ps.

I just attended a writers conference and while there was excitement about the new opportunities ebooks presented, the general consensus was that regular books wouldn't be going away any time soon. With the self-publishing options now available such as publish on demand, I don't foresee economic factors eliminating old-fashioned books in favor of ebooks.

Also, as to the comments on what someone's time is worth versus a prepared commercial solution, sometimes the knowledge gained by the experience of learning how to do it yourself is worth far more than both the time or monetary factors involved.

Free ebook formats

John Hardin's picture

I'd want to create it in a format that would encourage free interchange.

The template does support ePub format.

It does now

Doug.Roberts's picture

At the time that I wrote the article it did not yet support epub.

--Doug

Smashwords

Doug.Roberts's picture

Speaking of e-publishing in multiple formats, you should check out www.smashwords.com. You upload your book as a word doc, and they process it into html, pdf, txt, epub, mobi, rtf, lrf, and pdb formats for you. Also, once your book is accepted into their Premium Catalog, they automatically distribute it to major online retailers such as Apple, Barnes & Noble, Sony, Kobo, Borders Australia and Angus & Robertson Australia (both powered by Kobo), Whitcoulls (New Zealand, powered by Kobo), the Diesel eBook Store and other distribution outlets coming soon.

Where is your proof Doug?

GumBO's picture

Digital books, aka “ebooks” are going to change the publishing world..

Really? I haven't seen any proof that it will. Perhaps you should provide us with some evidence before you boldly proclaim such words. E-books have had plenty of time to capture the market, as far back as ten years ago, but still, many of us buy books for the sheer joy of turning over a page in its truest sense. Somehow a Kindle doesn't quite fit on a summers holiday down at the beach, where power supply is in short supply and sand is.. well.. just about everywhere. Gotta say, being a Linux user, the offerings are pretty poor in relation to the enemy MS Windows. Raise this thread in five years time Doug.

eBooks are going to change the publishing world..

Linux Rants's picture

"Really? I haven't seen any proof that it will."

Seriously? How about the FACT that in the second quarter of 2010, Amazon sold more eBooks than hardcover books? How about the FACT that over the course of 2010, Amazon sold more eBooks than paperbacks? Now, you may prefer a good old fashioned page turner to a Kindle, but the facts are in, and eBooks have already made their impact on the publishing world.

Oh, and as a side note, the Kindle battery lasts a week on a single charge. A perfect device for a summer holiday down at the beach. It also weighs next to nothing and takes virtually no space in a bag full of sunscreen and sunglasses.

The Sony Reader's battery

Anonymous's picture

The Sony Reader's battery last up to two weeks. And I don't have to go to Amazon every time I want a book. However there is that glare...

Bingo

Doug.Roberts's picture

Some of the paper book publishers are still living in denial, but the reality is that the rules have changed. Look at how the movie industry has changed in the past few years due to the huge growth in the availability of streaming media sources. Look at how the music industry has changed over the past 10 years due to digital media. Paper books will be around for a while, but they will not be the principal media for reading books in the near future.

On battery life: my Kindle 3, btw, can go about a month on a single charge with the wireless off.

You're welcome

Doug.Roberts's picture

Nameless dude/dudette: You're welcome to your own opinion. If you disagree with the article perhaps you should do your own research, write it up, and submit it to Linux Journal (and then have an anonymous reader tell you that you are all wrong.)

Try it, you might like it!

If anyone has any

thefekete's picture

If anyone has any restructured text files they want to convert to epub, i just found this project:

https://bitbucket.org/wierob/rst2epub/

Calibre

AC's picture

How about the Calibre e-book reader/manager? It appears to support a pretty wide range of formats, and can convert form one type to another.

h t t p: / /calibre-ebook.com

GPL v3 licensed, btw. Should be freely available from the Ubuntu software center.

$300 nominal fee?

Anonymous's picture

>"Considering the amount of time I save by using this template, the nominal fee charged by its developer is well worth it for me."

Had it been $1000, in principle it could still have been worth it for you. Yet it would have been rather ridiculous to call it a "nominal" fee, wouldn't it? Well, I just think at $300 it is just as ridiculous.

I don't know what you were buying, but

Doug.Roberts's picture

The Kindle template costs $67.00 at http://www.kindletemplate.com/

--Doug

The linked page doesn't say

Anonymous's picture

The linked page doesn't say $67 anywhere, you have to click on "Add to cart" to see that, and I had not done that. Why? Because the bottom of the page says "We currently charge over $300/conversion" and that's the only price I had seen. Way to go for a confusing page.

And yet, even if less ridiculous, still ridiculous to call $67 "nominal."

Time value

Doug.Roberts's picture

Your time must be worth less than mine. I saved hours in preparing my book for Kindle publishing by using this template, and I will save hours using it on the next book. It paid for itself in about thirty minutes. I'd call that "nominal".

New version of the template coming

Doug.Roberts's picture

I just had an email exchange with Brian Schartz, author of the Kindle template, that I thought I'd share:

You’ll be excited to see what will be included in the next version – the ability to use the template to publish to iBooks believe it or not. I’m almost there, just a couple more tweaks and the template will be suitable for publishing to: Kindle, Nook, iPad, Google Books, and just about anywhere you can upload an ePub file to!

Thanks

Eddie Orman's picture

Thanks Doug for sharing :)

Calibre and Mobipocket

Peter Labrow's picture

I've used both Calibre and Mobipocket. Both are really publishing tools not writing tools. I found neither especially satisfactory, for example creating ePub validation failures by not getting permission on the XML files right. I had to manually correct this several times. But neither are suitable for writing.

Hi Peter

Eddie Orman's picture

Well this is going to be an ongoing thing i guess, cause every time we have a new advanced software, later we realize that it would have been much better, the technology advances and so our needs of software's to be more user friendly, isn't it........

Thanks

Eddie Orman's picture

Here is a library called as Calibre its a free and open source e-book library management application for Windows, Mac and Linux. Important functionalities include library management, format conversion, news feeds to ebook conversion and even e-book reader synchronization features.
Free Credit Score

Calibre

Doug.Roberts's picture

Thanks Eddie. I did download and install Calibre. It looks very useful for what it was designed to do. However, it is not a writing tool. I had a very specific goal here: find the least intrusive tool set that would allow me to write and publish in Kindle ebook format.

But, as long as we are discussing ebook conversion tools, there is also MobiPocket (Windows only) which can covert html into a format compatible with a number of ebook systems. To use MobiPocket, most people would convert their Word doc file into filtered html, and then use MobiPocket to convert that into the prc and opf ebook files.

--Doug

Thanks Doug

Eddie Orman's picture

I have tried the Mobipocket eBook Reader 6.2, its great thanks for letting me know that, here is one more thing, i believe if we use the .txt files in any reader i guess it should work cause .txt is the simplest from of text and will be helpful if one has only to read, cause images cannot be added in the .txt file. and all the files content can be converted in the .txt format, what do your think.

e-book formatting

Peter Labrow's picture

The problem with plain text is you aren't taking advantage of XHTML characters for open and closed quotes, en dashes, em dashes and so on. I personally find it frustrating when e-books have inch and foot marks instead of quotes. Scrivener is rich text, but it doesn't generate anything like the junk code that Word does when converting. I can't speak for OpenOffice.

OpenOffice

Doug.Roberts's picture

Re: quotes, OO actually inserts the correct characters for open and close quote marks. BTW, to use the template you edit and save your work as an odt file. It is only when you are ready to upload to kdp.amazon.com that you save a version as Word 97/2000/XP doc file.

BTW, I just upgraded to Ubuntu 11.04, and the default office suite is no longer OpenOffice, it is LibreOffice. I've yet to test if LibreOffice formats the .doc file properly for publishing using the template.

LibreOffice ~= OpenOffice

Anonymous's picture

LibreOffice is a fork of OpenOffice, so far they're mostly identical binaries... in the future perhaps you'll see differences, but not today.

Scrivener

Peter Labrow's picture

Since I'm a Mac user, I only had it partly on my radar. Your best best is to contact the company which makes it - Literature and Latte. They are VERY helpful people and really responsive. They'll tell you first-hand where they are up to. I did see it in my Facebook feed a couple if times - I'm fairly sure it's in beta, but I think it's an open beta.

Scrivener

Peter Labrow's picture

Hi - you should take a look at Scrivener for Linux. This once Mac-only writing tool is THE BEST long form writing software by far. Now, it's on its way to Linux. The Mac version ALSO saves to Kindle and ePub format, for example. It's low cost and really works well, although it works differently than most words processors (with good reason). I used to write my first novel, The Well, here are a couple of blogs explaining which it's so good. Word processors like Word and OpenOffice just don't come close - this is developed for writers, by writers.

Thanks

Doug.Roberts's picture

Scrivener sounds like a good tool Peter; thanks, I'll check it out.

As a follow-on comment: I prefer that my writing tool be just a plain-jane word processing application, that's what I'm used to writing with. This is why I was so happy to discover the OpenOffice Kindle template. Now I can just write and not have to worry about any of the ebook formatting issues (aside from the toc and cover bookmarks).

--Doug

Writer's Cafe

Athena Grayson's picture

Writer's Cafe is a suite of tools that has native linux support ( http://www.writerscafe.co.uk ) and is very reasonably priced. It does a lot of the same things Scrivener does and exports to .odt, .html, .txt, and some sort of Windows Help file. It's got an entire suite of tools for mind-mapping and plotting and the like. I'm completely in love with it. Writer's Cafe's Storylines app (used for the actual writing) uses styles that are compatible with the .odt standard and translate fairly well for both screenwriting and novel-writing.

In my (so-far limited) experience with Kindle conversions, the deceptively simple "upload/convert" process will give you a usable file, but often, you'll end up midway through and see some weird character, or bad line breaks. Any time you convert, be sure to test the whole file from start to finish on your Kindle or Kindle app privately before you stick it out there. I know a lot of fellow authors that actually upload to Smashwords first, excluding Kindle and PubIt from the SW distribution, and then use the Smashwords-generated file to upload to Kindle and PubIt because Smashwords makes such a clean file.

Mixed feelings

Doug.Roberts's picture

Hi Athena.

I have mixed feelings about the Writer's Cafe toolkit. On the one hand it appears to provide lots of widgets and features for organizing your story. On the other hand, however, it is the antithesis of my preferred writing environment: the digital equivalent of a blank page in front of me.

I want my writing tools to fade into the background and not get in the way of letting the words flow. To each his/her own, though. It's nice to see that there are cross-platform products like Writer's Cafe available.

--Doug

For those of us who write

Athena Grayson's picture

For those of us who write weirdly (I write out of order--not on purpose, but invariably, I find that certain scenes do so much better when they're put in different places), the "writing by scene" encouraged by tools like WC Storylines and Scrivener can be a godsend.

One thing I did find, at least with OpenOffice (but maybe LibreOffice has fixed things) is that the longer I had it open--even with only one or two instances--the more resources it seemed to use up. I hope it was a function of that release of ubuntu and my 64-bit system, but it happens when I run OOo through Windows7, too. Hopefully, LibreOffice cured whatever was leaking. :)

Ah, ghost software

David Lane's picture

You know, I had heard on the NaNo boards that there was a Scrivener for Linux back before I sat down to do Script Frenzy and then you mention it again. A Google search turns up a couple of blogs about beta code and expirations of March 2011, but the main Scrivener site does not seem to have anything about it.

So at this point, I am not sure that this product actually exists...

David Lane, KG4GIY is a member of Linux Journal's Editorial Advisory Panel and the Control Op for Linux Journal's Virtual Ham Shack

Scrivener for Linux

Linux Rants's picture

It does, in fact, exist. I have it installed on my Netbook right now. It's just a little awkward to find.

If you want to give it a try, you can find the file here:
http://www.literatureandlatte.com/scrivenerforwindows/

Don't be deterred by the "forwindows" part. The Linux version can be found on the same page, just a little farther down.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState