View Single Post
Old 10-31-2012, 05:29 PM   #4
eltrkbrd
Junior Member
eltrkbrd began at the beginning.
 
Posts: 6
Karma: 28
Join Date: Sep 2012
Device: none
Lightbulb How to merge libraries & remove duplicates in calibre

After recently experimenting with calibre portable and figuring out how to merge libraries & remove duplicates, I've decided to share my experience with other calibre neophytes out there in hopes that it may simplify things a bit...

The calibre "convert books" | "create a catalog" | export to CSV (w/ title field only) option works nice just for a simple book list comparison. For this task I used Notepad++ (Windows) with the built in "compare" plugin along with the TextFX plugin to sort lines (unique).

Another option as Kovid suggested is to simply copy the calibre metadata.db file for each existing library without the books into separate directories, then merge and compare with Kiwidude's "Find Duplicates" plugin.

I found it easier to first click calibre "Add books" | then "control the adding of books" | select the "automerge added books" and choose "ignore duplicate" from the drop down list options & finally select the "check for duplicates" under "automatic adding" tab on that same window.

After changing the above options in calibre, click the library (books) icon in the toolbar and select "switch/create library" | "use the previously existing library (default option)" | browse to the folder you saved the metadata.db file to; say library1 for example | then click ok to open library1 in calibre. Then browse again to the folder you saved the metadata.db file for say library2 in and click ok to open that in calibre.

Note that you can now easily switch libraries using the "quick switch" option by clicking the small black down arrow icon to the right of the library icon in calibre.

Once you are in say library #2, select all ebooks (ctrl + a) | then right click and select the option "copy to library" library1. Now quick switch to library1 and you will notice all the book entries from library2 will have been merged with libary1 and the duplicates ignored.

Some other tips I picked up searching the forums here is to use the "Duplicate Finder" plugin's "binary compare" feature to remove binary identical books. Then search for “formats:false” to delete empty book entries from calibre without any ebook formats (book entries withouth any pdf,epub,mobi files, etc.). Alternatively, you can add the "formats" custom column in calibre and sort by that column to delete the empty book entries from calibre (binary compare doesn't automatically delete the book entries from calibre because of metadata that you may want to retain/merge).

For more tips on using Duplicate Finder, see:
https://www.mobileread.com/forums/sho...d.php?t=131017
http://blog.calibre-ebook.com/2011/1...te-finder.html

Lastly, my personal thanks to Kovid Goyal and the many others in the calibre community for making this open source project such an inspiration...

Enjoy!

Last edited by eltrkbrd; 10-31-2012 at 05:45 PM.
eltrkbrd is offline   Reply With Quote