11-15-2010, 03:18 PM | #1 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Jan 2009
Location: South Pacific
Device: Kindle DX
|
Initial Collection Organizing
Hello everyone,
New to the world of Calibre and Mobileread, and I'm finding both wonderful. (also I need a way to get rid of the pesky 'Hello Sidetrack, you've never posted' message). The forums have been great to glean information so I can bring my existing collection into Calibre and organize it. I'm managing some duplicates as I do. To compensate for some of my Garbage In, without full blown SQL available, some things that would help me (and maybe others) are some "canned SQL" functions: unique, as in title:unique author:unique or some other way to filter duplicate or unique terms, like maybe expanded relational operators as in format:>1 which might turn a search like format:txt and (format:zip or format:lrf or ... ) in to format:txt and format:>1 Also, options to unmerge/split a record might be nice as well for cases when multiple editions that should be separated have gotten grouped together. I'm finding ways to accomplish most of this within Calibre, but maybe not the best and fastest ways (enlighten me?). This is the sort of slicing and dicing available in databases; is it worth coding in to the interface? |
11-15-2010, 03:29 PM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
A relop for formats should be relatively easy to implement, open a ticket for it so it isn't forgotten.
|
Advert | |
|
11-15-2010, 04:09 PM | #3 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Jan 2009
Location: South Pacific
Device: Kindle DX
|
Wow, Kovid. Nice program you've got going here. Thanks for the reply.
I had to look up relop Before I submit the ticket... I assume that the format count for a record is relatively easy, is it as easy to apply to a title/author/what-ever-else count across records? A title:>1 or title_count:<2 sort of thing? |
11-15-2010, 04:14 PM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, per record counting is easy, cross record counting is not as easy.
|
11-15-2010, 04:38 PM | #5 | ||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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 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 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:
|
||
Advert | |
|
11-15-2010, 04:43 PM | #6 |
Enthusiast
Posts: 39
Karma: 10
Join Date: Jan 2009
Location: South Pacific
Device: Kindle DX
|
Last edited by Sidetrack; 11-15-2010 at 04:45 PM. |
11-15-2010, 08:39 PM | #7 | |
Enthusiast
Posts: 39
Karma: 10
Join Date: Jan 2009
Location: South Pacific
Device: Kindle DX
|
Quote:
With a little formatting I could have a group of titles to past into the search dialog. Any idea how large of a string and how many search terms it'll handle? |
|
11-15-2010, 08:49 PM | #8 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I don't know the limits. I generated some search query strings that exceeded my editor's line length limits. I didn't even try to paste them into the search box because I ran into another problem when searching for dupes - there was no demarcation between duplicate groups.
|
Tags |
canned sql, enhancement, unique records |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Initial impressions of Nook | norrisg | Introduce Yourself | 6 | 10-03-2010 01:25 PM |
Initial parse failed: | mburgoa | Calibre | 4 | 08-07-2010 08:50 AM |
DX - Initial Observations | poohbear_nc | Amazon Kindle | 39 | 06-13-2009 08:53 PM |
Initial Java RSS2Book | sammykrupa | Sony Reader | 2 | 12-04-2006 06:44 AM |
Got It! Initial Impressions! Some Help? | firekat | iRex | 3 | 07-28-2006 11:07 AM |