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 first line syncs my laptop library with the contents of the server library. I do this because I have some custom columns in my Calibre to save the date read, the rating, the read status, and a review. I will expand on this later.
- Once this sync has taken place, the second line launches Calibre in the laptop. That path is where the executable lives.
- When I close Calibre, the third line syncs any change I might have done in my library back to the server.
- The last line restarts Calibre server in my home server. This is necessary for the server to pick up my new changes.
The flow
My usual flow, then, looks like this:
- I obtain a new ebook in pdf or epub format (or any other format).
- I launch my
calibre2.commandfrom the command line on my laptop.- This is where the script executes and syncs any change from the server library to my local library.
- 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.
- I convert the book to kepub format.
- Close Calibre.
- Here is when the script continues its execution, syncing my new book to the server and restarting it.
- 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.
- 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.
- I read the book 😄
- After I finish the book, I open my Calibre server website on my phone. I do this due to laziness to open the laptop.
- I edit the book to add my rating, update the date read and add a review.
- 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.