Calibre in the Cloud

Calibre screenshot

I've mentioned before that I keep my entire e-book collection in my Dropbox folder, and I can access it anywhere I have a Web connection. I didn't come up with the idea myself; instead, I shamelessly stole the idea from Bill Childers. I suspect he stole it from someone else, so feel free to steal the idea from me.

Basically, it involves two programs, both free (well, three, if you count Dropbox). First, create a folder inside your Public folder that resides in your Dropbox folder. You can name this folder anything you like, but because it will be hosting all your e-books, it's wise to name it something no one would guess.

Then, in Calibre, click on the bookshelf icon (upper left), and click "switch library". Then, select that new secret folder you made inside your Public Dropbox folder. Calibre will move your entire library to that folder, so make sure you have enough free space in your Dropbox to handle your entire e-book collection. If you have too many e-books, you could create a separate library inside Calibre and just keep a select few books in that Public folder.

Now you should have a working install of Calibre that stores your e-books and database inside your Dropbox. You simply can open this library file with Calibre on other computers that sync with Dropbox, or you can go one step further and create a cloud-based repository that you can browse from any computer. And, that's where calibre2opds comes into play.

calibre2opds is a Java application that creates a Web site from your Calibre library. Download the Java application from http://www.calibre2opds.com, and launch it with your favorite Java runtime environment. Once it's launched, you'll see many options for tweaking how your library will look. The first thing you need to do is make sure the Database Folder is pointed to the secret folder to which you moved your Calibre library. Then, you'll want to set the Catalog Folder to something. It's okay to leave it set to _catalog, which is the default.

Figure 1. calibre2opds is a GUI Java application.

Next, you need to decide what sort of Web site you want to create. If you want to be able to browse it with any Web browser, leave the "Compatibility Level" at "OPDS". If you want to browse directly with your Android device, you can choose either TROOK or ALDIKO, and calibre2opds will generate a catalog that those readers can access directly. Once you tweak any other settings to your liking, click the Generate Catalogs button on the bottom, and it will create all the files you need right inside your Calibre database folder.

Because you did all this inside your Public Dropbox folder, you can look for that _catalog folder and find the index.html file inside it. Right-click on index.html, get the Dropbox public link for it, and see the result. (Note: you may need to find the index.xml file if you're trying to browse with Aldiko or Trook.)

Figure 2. Here is my e-book collection, created by calibre2opds.

Shawn is Associate Editor here at Linux Journal, and has been around Linux since the beginning. He has a passion for open source, and he loves to teach. He also drinks too much coffee, which often shows in his writing. You can contact Shawn via e-mail, ljeditor@linuxjournal.com.

Load Disqus comments