My Calibre set-up

I like using Calibre, and I also like downloading books to my Kobo device wirelessly. Since I always side-load my ebooks, I have a small set-up to achieve this. The way I'm doing this is by having two Calibre installations: one on my laptop and another one on a home server, and syncing the library between them every time I use Calibre on the laptop.

In my MacOS laptop I have the main installation of Calibre (the MacOS part is relevant for my script below). This is where I add my books, clean them and convert them to the kepub format (the format used in Kobo devices). Then on my home server I have a Calibre server installation. When I want to read a new book, I open the experimental browser on my e-reader and navigate to the Calibre server website, click on the book I want, and it gets downloaded to my device.

To achieve this, I set up a small script in my laptop that I use to open Calibre, instead of opening the program the normal way. My script is called calibre2.command, and it resides in a folder I added to my $PATH. That folder is where I put all my scripts that I want to invoke directly from the command line.

#!/bin/zsh

rsync -azP --delete user@server:/home/user/calibre/ /Users/user/Calibre\ Library
/Applications/calibre.app/Contents/MacOS/calibre
rsync -azP --delete /Users/user/Calibre\ Library/ user@server:/home/user/calibre
ssh user@server "sudo service calibre-server restart"

The flow

My usual flow, then, looks like this:

  1. I obtain a new ebook in pdf or epub format (or any other format).
  2. I launch my calibre2.command from the command line on my laptop.
    • This is where the script executes and syncs any change from the server library to my local library.
  3. I fix any metadata I need on the book. Usually I add the series and fix the author name and sort name. Sometimes I also upload an alternative cover I like more.
  4. I convert the book to kepub format.
  5. Close Calibre.
    • Here is when the script continues its execution, syncing my new book to the server and restarting it.
  6. On my e-reader, I open the experimental browser and navigate to my Calibre server address. For me, that address looks like this: http://user:password@server:8080/mobile.
    • I need the user:password bit because my Calibre server is protected. I don't know why I set it up like this, since it's only accessible inside my home, but anyway.
    • Important to note the /mobile part. You can access it without that part, but on a normal e-reader the page won't work, because the Javascript doesn't get executed. the /mobile page is much more accessible for e-readers.
  7. Next to each book, there appears a button for each format the book is available in. I click on the kepub button, and the device asks me if I want to download the book. This makes the new book available on my e-reader.
  8. I read the book 😄
  9. After I finish the book, I open my Calibre server website on my phone. I do this due to laziness to open the laptop.
  10. I edit the book to add my rating, update the date read and add a review.
  11. The next time I open Calibre on my computer, via the above script, my rating and review will get synced back to my local library, Calibre will open and I will have everything updated.

I've been using this set-up for a while now and it works good for me. I hope it can be useful for you too.

#books, #tech