![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2013
Device: Papyre 6.1, Kindle PW
|
Help with searching two columns
Hi all,
I need some help with Calibre. I'm trying to search through two different columns for similarities (on the entire library, not just a single book). Is it possible? I'll explain a bit more: I started my library with the basic columns, and then a while ago I added a column (#secondseries) for second series information. The problem is, as I added more books afterwards, I started using the series column a bit differently and never got around to fixing the older books (because there's too many of them, and I don't always know the series name by heart, so I can't really compare manually). So I ended up with stuff like: "Book 1" with Series "12 Days.Advent Calendar [1]" and #secondseries empty, while the new books are "Book 2" with Series "12 Days [14]" and #secondseries "Advent Calendar [2]" (which is more accurate as they're yearly series). ![]() So basically what I want to do is have a sort of "find duplicates" but where I can choose any two columns (series, in this case, but I suppose cross-referencing keywords through any two columns might be useful) and find matching keywords or similarities (even if I don't know the keyword). Is there a way to do this? Either via search or a plugin I missed or something? (I hope that made sense, I usually feel like I make a mess when I'm trying to explain stuff) ![]() |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
I cannot think of a particularly good way to handle a situation like this.
You might be able to perform a search with series:true AND secondseries:false. This would show you any books which have info in the series column, but nothing in the secondseries column. You would still have to manually slog through all the results, updating entries as you go. You can then sort on series or secondseries depending on whichever similar wording you're looking for at the time. I would think you might need to sort on both, just to make sure you don't miss anything. You will still need a way to find and compare books where there is info in both columns though. Obviously setting both to true will get a listing and sorting will help to group similar series names. It won't be perfect and you'll still have to do a lot of manual editing. |
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2013
Device: Papyre 6.1, Kindle PW
|
Thank you for the reply Sabardeyn! Hmm, that might be helpful. It won't be perfect, as you say, but it'll probably help me thin down the list considerably. Thanks!
If anyone has any other ideas, they'll be quite welcome. ![]() |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
You're very welcome.
Conditional searches like I suggested above means calibre will remove a book from display when you enter anything into the secondseries column. After all, once there is something in secondseries that title no longer meets your search criteria. So if you see something else that needs editing, do that first. Then correct for the missing secondseries info. Otherwise you'll lose track of it. ![]() Only other things I would suggest is to run the Find Duplicates and Quality Check plugins. They're invaluable for spotting minor errors. Depending on just how much, and how accurate, you want your metadata to be. |
![]() |
![]() |
![]() |
#5 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,660
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I wonder if this could be done with a third column (true false), which is based on the results of a template that compares the two columns in some way. See http://manual.calibre-ebook.com/template_lang.html
My skills in this facet of calibre are scratchy at best but I think that's where I'd start experimenting. Templates have several modes of operation - simple, advanced, single function, template program and general program. I suspect you'd need to use one of the program modes. BR |
![]() |
![]() |
![]() |
#6 | ||
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2013
Device: Papyre 6.1, Kindle PW
|
Quote:
![]() ![]() Quote:
Thank you!! |
||
![]() |
![]() |
![]() |
#7 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,660
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,362
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,660
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
May the OP could borrow from what kiwidude has in his Fine Duplicates PI. BR |
|
![]() |
![]() |
![]() |
#10 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2013
Device: Papyre 6.1, Kindle PW
|
Thanks again BetterRed!
Quote:
Is the series column considered multi-value? Since it also has the series number along with the name. ![]() |
|
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,362
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
To check if series and #secondseries are the same, use something like the following in a column built from other columns Code:
{series:'strcmp($, field('#secondseries'), '', $, '')'} You could do a bit of fuzzier searching by using a "contains" match instead of an exact match. Something like: Code:
program: a = field('series'); b = field('#secondseries'); first_non_empty( test(b, contains(a, b, b, ''), ''), test(a, contains(b, a, a, ''), '') ) |
|
![]() |
![]() |
![]() |
#12 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2013
Device: Papyre 6.1, Kindle PW
|
Oh! You're right, I forgot series_index is separate.
I'll give a try to the first code tonight and see what turns up, and I'll give a try to the program this weekend, since I have no clue how to properly use it and thus will require more investigating. ![]() Thank you so much for the help! ![]() |
![]() |
![]() |
![]() |
#13 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,362
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Hint: you can edit the template in a column built from other columns from the spreadsheet without restarting calibre. Simply click on any cell in the column and press F2, or whatever the "edit" key is on your system. Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Columns | raiderkilo | Calibre | 5 | 01-21-2012 05:53 PM |
Been searching, need help!! | SpaceKake | Which one should I buy? | 1 | 10-04-2011 07:21 AM |
Columns | Noughty | Library Management | 18 | 08-15-2011 04:57 PM |
Columns | darkpoet | ePub | 8 | 09-09-2009 10:17 PM |