Cleaning up an ebook library with Calibre

Removing duplicates: Let’s get rid of your duplicates. To do that choose Calibre > Preferences and then click Plugins in the resulting sheet. In the next sheet click Get New Plugins. In the list that appears locate Find Duplicates, select it, and click Install. Then quit and restart Calibre.

Selecting Fuzzy gives you the best chance of finding the greatest number of duplicate ebooks.

Once restarted, Calibre will display a Find Duplicates entry in the toolbar. Click on it and in the window that appears choose Fuzzy under both the Title Matching and Author Matching headings and click OK. A list of books that are duplicated will appear. Command-click any additional copies of the book (leave one unchecked so that you don’t delete the original) and then click on Remove Books in the toolbar. The duplicates will disappear.

Further cleanup: Despite better metadata, it’s possible that you still face author names presented as Dickens, Charles. While you can scroll down your library list, seek out these errant entries, and manually correct them, I’d instead suggest this technique that I picked from user “Garcie” in the MobileRead forum.

In the Search field, enter author:, (author-colon-comma). Press Return and you’ll see a list of just those books whose authors use this Last Name, First Name scheme. Select all these titles.

Press the E key to produce the Edit Meta Information window and click the Search and Replace tab. From the Search Mode pop-up menu choose Regular Expression. From the Search Field pop-up menu choose Authors. In the Search For field enter (.*), (.*). In the Replace With field enter \2 \1 (with a space between \2 and \1). Below, in the Test Text area, enter Dickens, Charles in the Your Test field. When you do this, the Test Result field should read Charles Dickens, indicating that your other settings are correct. If they are, click the OK button. Your selected titles should now display authors in First Name/Last Name format.

The cure for last name/first name author entries.

Export your books: After cleaning up your books you could stop right here. In the Finder navigate to the library folder you created and within it you’ll find all your ebooks organized in folders by author’s first name.

But suppose you’ve imported multiple ebook formats and they’re all sitting in your library. My guess is that you’ll want these separated so that you know which you can copy to your Kindle and which will work within iBooks. That’s easily done.

On the left side of the Calibre window click on Formats to reveal the format entries below. Now choose a format such as MOBI. Select all the books in the library. Choose Save to Disk > Save Only MOBI Format to Disk. In the Choose Destination Directory window that appears click New Folder and name it something like “My Kindle Books” and click Choose.

View your ebooks by format before exporting them.

The selected books from Calibre’s library will be placed in this folder filed, by default, using the author’s last name. Open this folder and you’ll see other folders representing each of the author’s books.

You repeat this process for epub files. Select EPUB under the Formats entry, select all the books that appear, choose Save to Disk but this time choose the Save Single Format to Disk command. EPUB will appear as the single option. Select it and click OK. You’ll then be prompted for a location for your books.

And there’s more

You ask a seemingly simple question and this is what happens. As I said, Calibre is very powerful and I’ve just scratched the surface. There are other ways to export ebooks so that they don’t also include images and metadata files (check its Saving Books to Disk preference). And you can output all your books into a single directory rather than having them split out into individual folders. You can additionally export books directly to connected devices so that you needn’t fuss with creating these folders or syncing books through iTunes.

If what I’ve provided isn’t enough, click on Calibre’s Help menu. Your default browser will open and you’ll be taken to the Calibre manual page, where you can dig into the details (and there are many).

In the meantime, I welcome comments from experienced Calibre users who can recommend sleeker workflows. And if you know of a different tool that makes cleaning ebooks easier, I’m all ears.

Subscribe to the MacWeek Newsletter

Comments