Organizing ebooks/books with Calibre

Share it!

Calibre is a program to organize your books, ebook or paper format. It has many, many features/options and therefore at first it looks overwhelming. In this post, I document the features that I use often.

Downloading and Installing

You can download and install calibre from for your platform. Installation is well documented elsewhere on the internet.

Notes on basic usage

When you run calibre, you will see a set of icons at the top of the screen (no Menu Bar). The first thing to do is to create a library. Create a directory where you want to store all your books and click on ‘books on the shelf’ icon (next to green recycle icon). Choose a ‘Switch/Create a library’. Another menu will appear. Choose ‘new library’ to create the new library. There is a check box ‘Copy structure from the current library’. If you created your own custom columns, this check box is very helpful. It will copy the database structure from the current library.

When you create the new library, an empty database called metadata.db is created inside that directory. This is a sqlite3 database that you can access manually by running sqlite3 command.

Adding Books

To add a single book to the current library, click on the very first icon (a book with a plus sign on it). Now you can navigate to the book, when you click on it, it will be added to the library. Note: the original ebook is not deleted. All books are added as ‘author/title(NNN)/ebook’ under the library directory. An entry is made into the metadata.db database. NNN is the index into the books table in the metadata.db database. Also ebook.opf file is created in the same directory that stores the ebook database entry in xml format. This file is helpful if somehow the metadata.db file is corrupted. It can be reconstructed from the .opf files (minus you custom columns).

If you click on a down arrow right next to the ‘Add Books’ icon, you can see more choices. One of those choices allows you to add all the books under a given directory and sub-directories.

One that confused me at first was the empty book. This choice allows you to make a book entry into the database without actually adding any book. The idea here is to track any physical books you may have on your bookshelf.

You can control how calibre gets the title and the author for an ebook while adding it into the library. By default, calibre gets the title and author information from the ebook metadata field. To change this behaviour, click on Preferences, ‘Change Calibre Behaviour’, then ‘Import/Export’ collection, ‘Adding Books’. Here you can set number of options on how the ebook title / author is determined.

EBook Formats

Calibre supports many different ebook formats, and actually have built-in ebook readers for most of these formats. It is possible to store a number of ebook formats with the same ebook entry. Only single title is listed in the ebook preview pane.

One thing I noticed is that if you have a collection of ebooks in a .zip file, it will be added into the library if there is at least one ebook in the zip archive. This makes it easy to add number of ebooks easily by just adding one single zipped file, but the problem is that it is not easy to get to the ebook you want or to search for them.

If you have multiple formats for the same ebook, which should be the primary format or the preferred format? You would think that it would be .pdf format, but .pdf format metadata is very limited. The best format is the .epub format.

Editing Metadata

One very useful feature is bulk editing metadata. You can select number of ebooks (or select a single ebook) in the ebook browser view, and select ‘Edit Metadata in Bulk’, and check the second check box, ‘Swap title and author’, then click OK. Lot of ebooks metadata swaps the author and title and this feature is very useful to fix that problem.

You can download covers for a set of ebooks, but updating metadata individually allows you to preview the ebook covers from Google, Amazon, Open Library and pick the one that you like.

The metadata includes also the review of the ebook.

Running the server

After all the ebooks are set up on the computer in various libraries, the next question is: how can we access these ebooks from another computer on the home network?

Calibre provides a server that you can run in the background to serve the list of ebooks in a given library. It takes the port number and the calibre library as parameters. Here is an example to run six servers in six different ports:

/usr/bin/calibre-server -p 8081 --with-library "/mnt/sdb2/Reference" &
/usr/bin/calibre-server -p 8082 --with-library "/mnt/sdb2/Magazines" &
/usr/bin/calibre-server -p 8083 --with-library "/mnt/sdb2/Computers" &
/usr/bin/calibre-server -p 8084 --with-library "/mnt/sdb2/Textbooks" &
/usr/bin/calibre-server -p 8085 --with-library "/mnt/sdb2/NonFiction" &
/usr/bin/calibre-server -p 8086 --with-library "/mnt/sdb2/Fiction" &

You can access to the catalog by pointing your browser to the given port number. For example to access a Magazine catalog you would point browser to:

Note that you would view only the catalog via the server. To view the ebook, you have to download the ebook and then open it by using the appropriate viewer installed on your computer.

Creating Custom Columns

Select ‘Change Calibre Behaviour’ from Preferences, from ‘Interface’ collection of options, choose ‘Add your own columns’. Click on the green ‘+’ sign on the right hand side to add a column. The Column Heading is used as a heading in the book browser window, and Lookup Name is used in the sqlite3 database as a column name.


My system is running Fedora Core 14 Linux on HP Compaq Computer with 3.2GHz Pentium with Hyper Threading. (1Gb total memory).

In this configuration Calibre starts to slow down once the number of books gets over 4000 or so books. At about 5000 books, it takes up to about 5 seconds to display the main screen.

Share it!

This entry was posted in Projects and tagged . Bookmark the permalink.

One Response to Organizing ebooks/books with Calibre

  1. jonathan22 says:

    Further, we have stemmed off into offering a SWAP program where customers can not only sell their broken-glass LCD’s to us but actually recycle them by receiving new ones in return. By doing this, our customers are saving on new parts

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">