From charlesreid1

Revision as of 04:45, 3 October 2011 by Admin (talk | contribs) (→‎Warning)
Kindle.jpg


Warning

I highly recommend you NOT use the program Calibre. It's a cumbersome, awkward, poorly-written program that does nothing but create hassles with the Kindle. I really like the Kindle, and I thoroughly enjoy reading on it. It has brought me much happiness. The only problems that I have had with the Kindle have stemmed from Calibre (and there have been no shortage of problems!).

In short, don't use Calibre.

Creating a Kindle Ebook

There are a couple of different options for creating a Kindle ebook, I've explored 2 here.

First, the Sigil/Calibre approach is an easy-to-use combination of GUIs, but as anyone who has dealt with GUIs knows, doing anything non-trivial can be a huge PITA. Plus, with the bugs in these programs, even doing trivial things is a PITA. (Example dialogue: "I want to create a chapter AFTER the current text. Why is it creating a chapter BEFORE the current text?!?")

The kindlegen approach uses the command-line, which you can combine with the power of text editing. That makes for a really nice integrated approach. However, the documentation on kindlegen is sparse, so it takes some trial and error.

Kindlegen (RECOMMENDED METHOD)

You can download Kindlegen from Amazon here: http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621

I unzipped it and added it to my path.

Running it without arguments gives the kindlegen help output:

$ kindlegen

**************************************************
* Amazon.com kindlegen(MAC OSX) V1.2 build 33307 *
* A command line e-book compiler                 *
* Copyright Amazon.com 2011                      *
**************************************************

Usage : kindlegen filename.opf/.htm/.html/.epub [-c0 or -c1 or c2] [-verbose] [-rebuild] [-onlydeps or -nodeps] [-western] [-o <file name>]
Options:
   -c0: no compression
   -c1: standard DOC compression
   -c2: Kindle huffdic compression
   -o <file name>: Specifies the output file name. Output file will be created in the same directory as that of input file. <file name> should not contain directory path.
   -verbose: verbose output
   -rebuild: rebuilds all dependencies
   -onlydeps: build only needed dependencies
   -nodeps: do not check/build dependencies
   -western: force build of Windows-1252 book
   -releasenotes: display release notes
   -gif: images are converted to GIF format (no JPEG in the book)

However, this doesn't cover some of the nuanced details, like how to create tables of contents, or deal with multiple files.

The directory Sample/ provides a nice sample ebook, with associated files, which is great - except that none of it is really explained.

Kindlegen Sample Explained

The example provided with Kindlegen is contained in the Sample/ directory. The key to understanding how it is all pulled together is Guide.opf.

OPF files are briefly explained here: http://en.wikipedia.org/wiki/EPUB#Open_Packaging_Format_2.0.1

The full specification is detailed here: http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm

They're part of an e-publishing standard. Fortunately, Guide.opf is well-commented, so it's pretty easy to just copy it and modify it to suit your own needs. If you're interested in going further, the above links should help you out.

If you open toc.html, or if you open Guide.mobi in a Kindle emulator on your computer, you should be able to see how the html files relate to the final e-book produced. All of the files provided in the example are either document pages, supplementary pages, or images, and these are all tied together in the OPF file Guide.opf.

To build the Sample/ e-book, feed the OPF file to kindlegen:

$ kindlegen Guide.opf

**************************************************
* Amazon.com kindlegen(MAC OSX) V1.2 build 33307 *
* A command line e-book compiler                 *
* Copyright Amazon.com 2011                      *
**************************************************

Info(prcgen): Added metadata dc:Title        "Kindle User's Guide"
Info(prcgen): Added metadata dc:Date         "2009-11-17"
Info(prcgen): Added metadata ISBN            "9781375890815"
Info(prcgen): Added metadata dc:Creator      "Amazon.com"
Info(prcgen): Added metadata dc:Publisher    "Amazon.com"
Info(prcgen): Added metadata dc:Subject      "Reference"
Info(prcgen): Added metadata dc:Description  "An overview of all the Amazon Kindle features and how to use them. 3rd Edition."
Info(prcgen): Parsing files  0000013
Info(prcgen): Resolving hyperlinks
Info(prcgen): Resolving start reading location
Info(prcgen): Added metadata Start reading   "2670"
Info(prcgen): Building table of content     URL: /Users/charles/pkg/kindlegen/newsample/KUG.ncx
Info(pagemap): No Page map found in the book
Info(prcgen): Computing UNICODE ranges used in the book
Info(prcgen): Found UNICODE range: Basic Latin [20..7E]
Info(prcgen): Found UNICODE range: Latin-1 Supplement [A0..FF]
Info(prcgen): Building MOBI file, record count:   0000040
Info(prcgen): Final stats - text compressed to (in % of original size):  045.18%
Info(prcgen): The document identifier is: "Kindle_Users_Guide"
Info(prcgen): The file format version is V6
Info(prcgen): Saving MOBI file
Info(prcgen): MOBI File successfully generated!

Sigil/Calibre

Sigil and Calibre are two free tools available for e-book creation.

Sigil creates e-books; it is essentially like a barebones text editor or HTML editor, but with very basic functionality. It only produces ebooks in the epub format.

Calibre has no e-book content creation capabilities. It is merely a format conversion tool.

Creating a Plain Ebook with Sigil

As an example, I am going to create an ebook from a few sections from the Wikipedia article on http://en.wikipedia.org/wiki/Elephants

File:Sigil1.png
Screenshot of an empty ebook, starting in Sigil.
File:Sigil2.png
The first step is to copy and paste information from the Wikipedia article into Sigil. This is just a bunch of "Normal" text.
File:Sigil3.png
To create a heading for the chapter, pick the heading text, and use the drop-down menu on the top left and pick "Heading 1". This makes the selected text into a chapter heading.

Creating a New Chapter with Sigil

File:Sigil4.png
To create a new chapter, use the red "Ch" button (top right) or pick Insert > New Chapter.

To create a new chapter, use the red "Ch" button (top right) or pick Insert > New Chapter.

Note that the chapter break will be inserted at the location of your cursor, so if your cursor is at the beginning of a chapter, a chapter will be inserted before the cursor. So, you should probably move your cursor to the end of the chapter, so the new chapter will be created after your cursor.

Creating the Finished Product

The "finished product" from Sigil will be an ebook in the epub format (.epub extension).

Save the ebook by picking File > Save or File > Save As.

Using Calibre to Create Kindle Ebook

The last step in the process is to create the finished/polished ebook in .mobi format, which is the Kindle-readable format.

First, open the Sigil-created .epub file by going to Add Books > Add books from a single directory. This will add the epub file to your Calibre library.

File:Calibre1.png
Once you add a book, it shows up in your Calibre library.

To edit information like Title and Author, click the "Edit Metadata" button, or pick the menu Edit Metadata > Edit Metadata Individually. You can also add a cover to the e-book by clicking "Browse" under "Change Cover" in the Edit Metadata window.

Once you are satisfied with the metadata, click the "Convert Books" button to convert the e-book from epub to mobi format. This gives you another opportunity to edit the metadata:

Before you convert the book, you have a chance to edit the metadata.

On the left-hand side is a navigation menu. Picking "Table of Contents" allows you to include a table of contents (the table of contents is not included by default).

Include a table of contents by checking the first box.

You can also pick "Mobi Output" and specify the name of the table of contents.

Specify a name for the table of contents.

Now that you're ready, click "OK".

Upon starting the conversion process, the number of jobs specified in the lower right hand corner will be greater than 0.

When you are done, you will be able to see the file types associated with a particular ebook. This should now be epub and mobi, not just epub.

Change in associated file types.

Ecub

General specification

Thoughts

Initial Thoughts (06/13)

The Kindle seems intuitive to figure out. The display is really sharp and really crisp.

I don't think I realized the potential of being able to carry around a whole bunch of books in a really light device, until I started thinking about the books that were on my bookshelf that I could put onto my e-reader. It's literally like putting 100 pounds of books into something the size and weight of a magazine.

Further Thoughts (06/18)

I'm still very impressed by the Kindle. The display works great even in sunlight.

The only thing I have problems with is when I accidentally push the wrong button and end up at the beginning or end of a book I'm in the middle of reading - navigating throughout the book is somewhat cumbersome. This is especially the case with Gutenberg ebooks, which have no table of contents whatsoever.

The controls for navigating are not so intuitive (why does a book have 7,000 "locations"???) and the bar at the bottom of the screen showing progress has various things (black arrows, tiny unfilled boxes) whose meaning is not explained and I don't really understand.

I'm 90% satisfied with the Kindle, but the navigation issues are definitely a problem. I think there should be a better user's guide (either paper or electronic) that would explain some of these more subtle things. Otherwise, my approach has to be adding a bookmark every few hours.

More Thoughts (07/22)

I am really enjoying reading with the Kindle. I can finally read with one hand. The screen and graphics and pictures show up great, even in sunlight. It works very smoothly.

The only problem I have now is dealing with periodicals and getting them onto my Kindle. Kindle somehow tags certain ebooks as periodicals, and when it does, putting new versions of periodicals on the Kindle replaces the old versions (or, hides them). I'm not sure how to change this, but it would be nice to change.

It would also be nice if Amazon put together a nice Kindle ebook-management software that was basically a working and not crappy version of Calibre.

For now, my management technique is to keep my ebooks organized in folders on my computer, and copy the entire directory structure onto the Kindle (not necessarily all the books - just the directory structure with the books I want on the Kindle). This doesn't organize them when I interface with the device itself, but as a disk drive, it keeps the ebooks organized.

I also keep backups of my notes and highlights, contained in the files My Clippings.mbp and My Clippings.txt.