Quote:
Originally Posted by Sidetrack
To compensate for some of my Garbage In, without full blown SQL available
|
Full blown SQL searching is available .... sort of. What's not available is Full blown SQL record updating, and the connection from the records you find via the SQL search and the GUI interface.
Thus, for duplicates:
Code:
calibre-debug -c "from calibre.library.database2 import LibraryDatabase2; db = LibraryDatabase2('/path/to/library/folder');dupes = db.conn.get('select title from books group by title having count(*) > 1;');print dupes;">dupes.txt
For duplicates with author_sort listed:
Code:
calibre-debug -c "from calibre.library.database2 import LibraryDatabase2; db = LibraryDatabase2('c:/users/frank/documents/my ebooks/calibre');dupes = db.conn.get('select title, author_sort from books group by title having count(*) > 1;');print dupes;">dupes.txt
Change the path to point to your library folder and paste it into a command window (terminal window, dos box, whatever you call it) and it will produce a file in the current directory called dupes.txt with all your duplicate titles in it.
You can also write code segments and run them with calibre-debug -e. I wrote some that generated cut and paste searches to find duplicates.
Quote:
, some things that would help me (and maybe others) are some "canned SQL" functions:
|
Yes, these would be nice, and there have been some threads on them, and some proposals to build in certain specific functions, like duplicate finding. I've also used SQLLiteSpy on the metadata.db, when I get desperate.