Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2010, 04:41 PM   #1
NoBiscuit
Junior Member
NoBiscuit began at the beginning.
 
NoBiscuit's Avatar
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Sony PRS-505
Show Duplicate Titles

Hi
Is there anyway I can get Calibre to display all books with duplicate titles?
Thanks
NoBiscuit
NoBiscuit is offline   Reply With Quote
Old 02-15-2010, 04:44 PM   #2
Bilbo1967
Not scared!
Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.
 
Bilbo1967's Avatar
 
Posts: 13,424
Karma: 81011643
Join Date: Mar 2009
Location: Midlands, UK
Device: Kindle Paperwhite 10, Huawei M5 10
If you sort by Title then any duplicates will be all together. Is that enough for your purposes?
Bilbo1967 is offline   Reply With Quote
Advert
Old 02-15-2010, 04:52 PM   #3
NoBiscuit
Junior Member
NoBiscuit began at the beginning.
 
NoBiscuit's Avatar
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Sony PRS-505
Quote:
Originally Posted by Bilbo1967 View Post
If you sort by Title then any duplicates will be all together. Is that enough for your purposes?
That works, it is just awkward and clumsy when you have 9000+ books in the database. I just wondered if there was a quick way to do it that I had missed.
Thanks anyway.
NoBiscuit is offline   Reply With Quote
Old 02-15-2010, 04:54 PM   #4
Bilbo1967
Not scared!
Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.Bilbo1967 ought to be getting tired of karma fortunes by now.
 
Bilbo1967's Avatar
 
Posts: 13,424
Karma: 81011643
Join Date: Mar 2009
Location: Midlands, UK
Device: Kindle Paperwhite 10, Huawei M5 10
Ah - OK, sorry. I'm a kind of 'lowest common denominator' kind of guy. Hopefully somebody a bit more sophisticated in usage of Calibre will be along shortly.
Bilbo1967 is offline   Reply With Quote
Old 02-15-2010, 05:36 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Just to make your automatic problem more difficult:
1 character difference makes it a different title:
Blue Moon
vs
Blue moon
vs
Blue_Moon

Eyball Mk 1 is a wonderful thing.


The other Gotcha
is I have 2 different books with the same title..Different Authors
Ouch!


Btw sort Authors first, then sort Titles
Calibre seems to bias the sort by the previous sort. (is this a Bubble sort?)
theducks is offline   Reply With Quote
Advert
Old 02-15-2010, 06:06 PM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by NoBiscuit View Post
Is there anyway I can get Calibre to display all books with duplicate titles?
I'm not aware of any way inside calibre. I do it by opening up the metadata.db file in sqlitespy and using an sql query.

This will also do it:

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
Copy that long line, 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. It's a list of dupe titles in unicode format.

Last edited by Starson17; 02-15-2010 at 06:09 PM.
Starson17 is offline   Reply With Quote
Old 02-16-2010, 04:33 AM   #7
NoBiscuit
Junior Member
NoBiscuit began at the beginning.
 
NoBiscuit's Avatar
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Sony PRS-505
Quote:
Originally Posted by theducks View Post
Just to make your automatic problem more difficult:
1 character difference makes it a different title:
Blue Moon
vs
Blue moon
vs
Blue_Moon

Eyball Mk 1 is a wonderful thing.


The other Gotcha
is I have 2 different books with the same title..Different Authors
Ouch!
That is all part of my pain.
NoBiscuit is offline   Reply With Quote
Old 02-16-2010, 04:34 AM   #8
NoBiscuit
Junior Member
NoBiscuit began at the beginning.
 
NoBiscuit's Avatar
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Sony PRS-505
Quote:
Originally Posted by Starson17 View Post
I'm not aware of any way inside calibre. I do it by opening up the metadata.db file in sqlitespy and using an sql query.

This will also do it:

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
Copy that long line, 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. It's a list of dupe titles in unicode format.
Your a Hero, Many Thanks
NoBiscuit is offline   Reply With Quote
Old 02-16-2010, 04:52 AM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by NoBiscuit View Post
Your a Hero, Many Thanks
You're welcome, but as usual, thanks go to Kovid. Not only did he write calibre and make it open source, he's made a special effort to make the power of calibre accessible to us.
Starson17 is offline   Reply With Quote
Old 02-16-2010, 08:16 AM   #10
NoBiscuit
Junior Member
NoBiscuit began at the beginning.
 
NoBiscuit's Avatar
 
Posts: 5
Karma: 10
Join Date: Feb 2010
Device: Sony PRS-505
Quote:
Originally Posted by Starson17 View Post
You're welcome, but as usual, thanks go to Kovid. Not only did he write calibre and make it open source, he's made a special effort to make the power of calibre accessible to us.
Indeed. Great program, thanks Kovid.
NoBiscuit is offline   Reply With Quote
Old 09-19-2010, 02:39 AM   #11
zenrhino
Junior Member
zenrhino began at the beginning.
 
Posts: 8
Karma: 22
Join Date: Aug 2010
Device: iPad
Still Working

Hi,

Does this method still work with 0.7.19?

When I ran the query from bash, it gave me a blank result in dupes.txt.

I tried to run a simple 'get * from books' and it threw me a couple paragraphs worth of errors, none of which seemed to be permission-based (I ran the query as SU).

Thanks,

ZR
zenrhino is offline   Reply With Quote
Old 09-19-2010, 11:30 AM   #12
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by zenrhino View Post
Does this method still work with 0.7.19?
Yes.
Quote:
When I ran the query from bash, it gave me a blank result in dupes.txt.
Is your Library path correct?
Starson17 is offline   Reply With Quote
Old 05-30-2011, 01:45 AM   #13
ctwaley
Junior Member
ctwaley began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2011
Device: Nook
Quote:
Originally Posted by Starson17 View Post
...This will also do it:

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
Copy that long line, 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. It's a list of dupe titles in unicode format.
Hi ppl, new kid on the block here.

FWIW: judging from the command line code Starson17 has shown, it looks like it would work well in a 'nix environment, but for the windows users this would be more appropriate. Create a batch file using the following code:
Code:
@echo off

"%PROGRAMFILES%\Calibre2\calibre-debug" -c "from calibre.library.database2 import LibraryDatabase2; db = LibraryDatabase2('X:\Path\To\CalibreLibrary');dupes = db.conn.get('select title from books group by title having count(*) > 1;');print dupes;" > C:\dupe-titles.txt
This will create a comma-delimited "dupes-titles.txt" file of titles (enclosed in square brackets []) in the base of drive C:. Just copy and paste the code into notepad and name it something like "dupe-titles.cmd". Be sure to change "X:\Path\To\CalibreLibrary" to your actual library path.

And for those using a 64-bit Windows machine, substitute "%PROGRAMFILES(X86)%" for the "%PROGRAMFILES%" path. Also be sure to include the quotes I have shown for the "%PROGRAMFILES%" path at the beginning.

---Cole
ctwaley is offline   Reply With Quote
Old 05-30-2011, 03:20 AM   #14
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
The easiest way to find duplicates is to install and use the "Find Duplicates" plugin.
itimpi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With Duplicate Book Titles pghaworth Calibre 25 09-17-2010 04:56 PM
Duplicate series titles? hairybiker Calibre 2 03-17-2010 06:27 AM
PRS 300: Duplicate titles on reader (and growing!) 747sardine Sony Reader 4 02-19-2010 04:37 PM
PRS 300 and duplicate titles rypleigh Introduce Yourself 1 12-27-2009 03:16 PM
Duplicate titles on PRS700 with SD card herbdb Sony Reader 5 01-26-2009 09:40 AM


All times are GMT -4. The time now is 11:18 PM.


MobileRead.com is a privately owned, operated and funded community.