Managing your e-book collection

In an earlier post, I hinted about a Slackware package I was trying to create for Calibre. The reason being that I bought my wife an e-reader: a Sony PRS650 with a touch screen using infrared instead of a touch-sensitive layer and pearl e-ink technology. Both those features make for an extremely pleasant reading experience.

However, the Sony Reader software that accompanies the device, is a Windows-only application (of course…) and second, it is not all that much of an application either. Even for Windows, the usual advice you get it is to install Calibre forĀ  managing your e-books – including uploading them to your device.

So, I needed to have Calibre available on my Slackware computers. In fact, I used to have a package for Calibre already! At some point in time the Calibre developer decided to increase the required version of the Python interpreter to 2.7.1. And since Slackware ships Python 2.6.6 to this day, I was no longer able to compile updated packagesĀ  (I got stuck at 0.7.23 but I guess it would have been possible to keep compiling Calibre as far as 0.7.45).

I still wanted a recent version of Calibre, the software has updates about once a week! So I spent quite a lot of time researching how I could add an embedded Python interpreter plus several supporting Python modules into the Calibre package.

And I think I succeeded. I have uploaded Slackware packages for calibre-0.8.6 to my repository yesterday (for Slackware 13.1 as well as Slackware 13.37). During the period where I did not actually have an e-reader at my disposition (it arrived at the house only a few days ago) I used the testing genius of my pal mrgoblin who happened to have an e-reader device in his possession. His beta tests made me realize that I was missing the dbus-python module which is needed for Calibre to recognize when a device is plugged into the computer.

I must say, using Calibre is a lot of fun! I have a small collection of e-books and after installing the Slackware package, I was able to transfer my books to the Sony device and read them there. Then, I managed to almost brick the device by ripping out the USB cable before selecting “Eject Device” in Calibre… let that be a warning for prospective users! It took a lot of reading about soft and hard resets before I had a working e-reader again. I had to reset the device to factory defaults – which means you lose all the books that were already present on the device. It was a good learning experience with only minor inconvenience (because I had transfered only two books to the e-reader at the time) but I kept feeling my wife’s prying eyes in the back of my neck… she was not too pleased with seeing her birthday present getting bricked only 15 minutes after unpacking it!

Calibre will also be very useful for everyone who owns a Kindle (Amazon’s own e-reader). The Kindle only accepts Amazon’s own MOBI format and refuses the “open” EPUB format (which is the most commonly used e-book format outside the US). Using Calibre, you can easily convert your EPUB collection to MOBI format – when you select an EPUB file and tell it to upload it to a Kindle, Calibre will show a dialog that prompts for the automatic conversion to the Kindle’s format. Perfect!

OK, enough talk. Get a package and/or SlackBuild script at:

and don’t forget to also install the icu4c and podofo packages; these two are the only dependencies now. If you want to build the package yourself, be warned if you are running Slackware-current. There is a bug in the “file” utility in Slackware-current which prevents it from recognizing a ZIP file as such, and this bug will cause the SlackBuild script to fail. Thanks to Francesco Allertsen who first ran into this issue and reported it to me, a quick fix is to change the line 235 in the calibre.SlackBuild script:

if $(file ${SOURCE[$i]} | grep -qi “: zip”); then

to:

if $(echo ${SOURCE[$i]} | grep -qi “.zip$”); then

I hope to see a fixed “file” soon. A bugfix has been applied to the file repository already, so file-5.08 should detect ZIP files correctly when it gets released.

Have fun! Eric