Calibre Google Drive



About 7 years ago, I wrote a post about how the ebook library management app Calibre can contribute to problems with Amazon Kindle e-readers: it basically screws their battery life. I detailed a workaround for it, and to this day, I still get visits to that page, so neither Calibre nor Amazon must have gotten around to fixing it.

Calibre can help you organize, edit and synchronize your eBooks, track the eBooks you’ve read and liked, converts eBook formats, and downloads covers and metadata. It works with Dropbox, Box, Google Drive, Microsoft OneDrive, and Amazon Cloud Drive and supports for over 18 formats. It can also make eBooks from your personal documents. April 2020: Calibre is under constant development, and since I wrote this a couple years ago I see options that I didn't notice back then.There are configurations for adding an SSL certificate, setting up user accounts, and disabling guest access, which makes it a really secure browser. A calibre content server and cloud provider (Dropbox, Box, Google Drive, Microsoft OneDrive, and Amazon Cloud Drive) client 1) CC is a device-based calibre library organizer. Once you put books. Also, if the Calibre library on the host computer is stored in a cloud service, such as Box.net, Google Drive, or Dropbox, then either the cloud service or a third-party app, such as Calibre Cloud or CalibreBox, can be used to remotely access the library.

Drive

I now have a suspicion that Calibre also causes problems with iCloud Drive, so I’m leaving this here for anyone it might affect. Some scenarios for the search engines below:

  • If you store your Calibre Library folder on iCloud Drive, and have noticed that your remaining space does not reflect the storage you’re using, this is for you.
  • If you have deleted files on iCloud Drive but find that the free space reported by iCloud.com or your device does not immediately update to reflect the deletion, or…
  • If you have removed everything on iCloud Drive but still find space allocated to “Documents” in the “Manage Storage” section of iCloud settings on your iPhone/iPad — in other words, if you expect to have free space, and have done everything including a check of the “Recently Deleted” area and emptied your Recycle Bin, but the amount of free space is still inaccurate, I know that feeling.
Calibre Google Drive

This seems to happen to a lot of people, perhaps for other reasons, but it happens. Skip ahead to “Is it you, Calibre?” if you just want my conclusion.

So here’s my experience. A couple of years ago, I had this issue, and had to call Apple Support. It took several calls to resolve, because they wanted me to sign out of iCloud on every device (not an insignificant hassle with multiple devices), and when that established that the issue was on their servers, it had to be escalated to Engineering, and the eventual fix was they wiped everything on my Drive and reset it. I had to backup all my files locally (requires a Mac!) first. I believe I still suffered some data loss.

After that, it was all good, but my confidence in iCloud Drive was shaken, and I didn’t want to use it as storage for anything important. Every year since then, they’ve made enhancements to iCloud Drive, and to the Files.app on iOS, which has made me slowly more willing to embrace it again as a cloud file system worthy of My Stuff.

And then this happened again. 13GB of space just wouldn’t come back after I’d deleted files. The files were gone, the space was not reclaimed. After putting it off for two weeks, I got on the phone with Apple again, and two calls later, they managed to “repair” my Drive using some standard tools they have (Engineering was not involved this time). So, a slightly better experience than before.

Is it you, Calibre?

I’ll say upfront that this is a hunch. I don’t have the strength anymore to experiment on my iCloud account and conclusively prove anything.

Both times this happened to my iCloud Drive, I was using it quite “normally”. Nothing fancy, except that my Calibre Library folder was on it, and I knew that the Calibre app was actively updating files on it whenever I added/removed ebooks. This last time, the problem appeared after I’d deleted a ton of files THROUGH Calibre, and as best I can recall, a similar situation took place years ago.

With the Amazon Kindle problem, there’s something about the way that Calibre writes files to the Kindle’s drive that causes it. In other words, Calibre (which is a sluggish cross-platform app that behaves in a very non-Maclike way) may have some non-standard ways of interacting with the OS and filesystem. I think the way that it writes/deletes files isn’t the same as if you manually dragged files around yourself via the Finder. It might be through some low-level UNIX operations, but this is where I’m out of my depth.

So it’s not a stretch to imagine that when you delete ebooks in Calibre, it deletes them from your drive in a way that may cause issues. Deletes them in a way that is invisible to iCloud, so it doesn’t know that the files are gone and it should give you the space back. On a local drive? It works fine, and that’s how it’s used by millions anyway. But on a weird aliased virtual cloud drive that Apple hacked together inside a folder called “Mobile Documents”? Maybe not fine!

Here’s what I’d suggest trying if you have this problem: move your Calibre Library off iCloud Drive. I’ve put mine on Dropbox and it seems fine. Do NOT put it on Google Drive. Call Apple, and have them repair or reset your drive. Some luck is required here, but they’re your only hope. Once you get your missing space back, don’t use Calibre with it again.

I’ll be here with crossed fingers too, waiting to see if this happens again.

I previously wrote EPUB and DeDRM: Why Google Play Store is the best eBookStore for iBooks fans. (Bonus: Fixing Adobe Digital Edition crash.), but my efforts to put the books I own on my personal device were frustrated when it turned out all of my Google Play books were DRM free. So I could easily put the ePUBs in Google Drive, upload to Google Play and drop them into iTunes for use on my iPhone.

Today I purchased a genuine Google Play Adobe Editions DRMd book. I was able to remove the Adobe DRM and open it in iBooks on my iPhone. So it's doable - barely. I fear, however, that my app.net friends who think this is an easy solution to eBook DRM problems are operating on a higher plain than I. DRM removal is not the answer to flat (soon falling?) eBook sales. iTunes music style DRM (signed files) is the answer.

I'm not sure I can quite recreate all the steps, but these tips may help Mountain Lion users. Use them while you read and reread Apprentice Alf's guide.

Downloads

Calibre Google Drive English

Calibre Google Drive

You need to download the following apps and install the first two.

  1. Adobe Digital Edition
  2. Calibre
  3. The limelinx tools (includes the DeDRM app but, most importantly, the DeDRM_calibre plugin)
Calibre Google Drive
  1. Download your ePub from Google Apps. This process is very cryptic (I think Google wants us to stop downloading these.) Mouseover your book in Play, look for a strange faint dashed line icon, click it to get the download option. You will download a .ascm file.
  2. Launch Adobe Digital Edition and register yourself with Adobe. Open your .ascm file in ADE, observe that an ePub file is now saved to Documents/Digital Editions. Note that carefully.
  3. Launch Calibre and then carefully follow the directions for installing DeDRM_plugin.zip into Calibre. Note that Calibre has changed a bit since the directions were written so some interpretation may be needed.
  4. The directions say: 'On Macintosh and Windows systems no customization is required for ebooks from Kindle for Mac/PC or Adobe Digital Editions (ADE), provided that calibre is run on the same computer and user account as the installation of Kindle for Mac/PC or ADE to which the books were downloaded. The default key is found and stored in the preferences automatically. ' This did not work for me. I had to follow the configuration steps, which are cryptic. I clicked on DeDRM then clicked the customize button the configuration for 'Adobe Digital Editions eBooks', then click on the green + to get 'default_key'. Ignore 'Import Existing Keyfiles'. Then restart Calibre.
Calibre Google Drive
  1. Now, using Calibre, import the ePub file saved in Documents/Digital Editions.
  2. You should be able to to Save Only ePub format to disk. The ePUB produced at that point is DRM free (or was in my case).

Calibre Google Drive Sync

Prior to using Calibre I'd tried DeDRM.app unsuccessfully; it didn't have a key ('.der file') and coulndn't find one. After I'd gotten the Calibre process working I tried DeDRM again and it had the 'default_key'. I ran it again the Documents/Digital Editions ePub and it told me the DRM was removed. This is a much easier process than using Calibre; perhaps there is a shortcut to get directly to this step. Going forward I expect to use DeDRM.app.

Calibre-web Google Drive

Incidentally, the Alf site warns that commercial 'DeDRM' apps are wrapped copies of the DeDRM code. I believe that's true.

Calibre Companion Google Drive

Update 3/27/2014:After I got the default_key working I can simply use DeDRM to remove ePUB DRM. The configuration process creates a .der file that is stored in /Users/YourUserName/Library/Preferences/com.apprenticealf.dedrm. That .der file can be added to a new DeDrm.app install through simple setup — it’s the output of the complex process described above.