Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2010, 05: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, 05: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: 8,391
Karma: 25892138
Join Date: Mar 2009
Location: Midlands, UK
Device: Sony 650, Sony T2, Xoom, Nexus 7 (2012 & 2013), Nook ST (x3)
If you sort by Title then any duplicates will be all together. Is that enough for your purposes?
Bilbo1967 is offline   Reply With Quote
Old 02-15-2010, 05: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, 05: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: 8,391
Karma: 25892138
Join Date: Mar 2009
Location: Midlands, UK
Device: Sony 650, Sony T2, Xoom, Nexus 7 (2012 & 2013), Nook ST (x3)
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, 06:36 PM   #5
theducks
Grand Sorcerer
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: 15,071
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
Old 02-15-2010, 07: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 07:09 PM.
Starson17 is offline   Reply With Quote
Old 02-16-2010, 05: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, 05: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, 05: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, 09: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, 03: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, 12:30 PM   #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, 02: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, 04: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,094
Karma: 780247
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:49 PM.


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