![]() |
#931 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2017
Device: ipad
|
Thanks for the link. That solved the problem.
However, the question remains as to how it got changed. |
![]() |
![]() |
![]() |
#932 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,409
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The first line of that post is (emphasis added)
Quote:
|
|
![]() |
![]() |
![]() |
#933 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
To add to what chaley said, the plugin restores the search back to what it was after it finishes. Since in your case calibre crashed, the restore step never happened.
|
![]() |
![]() |
![]() |
#934 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Hi capink,
it is possible to separate the aliases like in the normal authors (black instead of blue ampersand)? I have a group-search "pen-names" with authors and #alias and do my similar authors search by this pen-names. If I search for "Robert Lynn Asprin" all the books with Robert Asprin & Co-Author will not be found, because the alias is e.g. "Robert Lynn Asprin & Linda Evans" and not "Robert Lynn Asprin" & "Linda Evans". I hope I expressed it clearly |
![]() |
![]() |
![]() |
#935 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
Code:
def evaluate(self, formatter, kwargs, mi, locals, val, col_name, user_cat_prefix):
new_val = ''
if hasattr(mi, '_proxy_metadata'):
all_cats = mi._proxy_metadata.user_categories
cats = {k:v for k,v in all_cats.items() if k.startswith(user_cat_prefix)}
SEP = mi.metadata_for_field(col_name)['is_multiple'].get('list_to_ui', '')
new_val = set()
if SEP:
val_ = val.split(SEP)
else:
val_ = [val]
for user_cat, v in cats.items():
repl = user_cat.lstrip(user_cat_prefix)
for user_cat_item, src_cat in v:
if src_cat == col_name:
for item in val_[:]:
if item == user_cat_item:
new_val.add(repl)
val_.remove(item)
else:
new_val.add(item)
if new_val:
return ', '.join(list(new_val))
return val
Edit: Alternatively, you can keep your original setup, and modify your search from: Code:
#alias:"=Robert Lynn Asprin" Code:
#alias:"Robert Lynn Asprin" Last edited by capink; 01-18-2022 at 11:01 AM. |
||
![]() |
![]() |
![]() |
#936 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,409
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Ahh, but this is supported only in is_multiple text columns, not composite columns. |
|
![]() |
![]() |
![]() |
#937 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
Edit: I just read the second part of you reply. |
|
![]() |
![]() |
![]() |
#938 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,409
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I realized after writing my post that you are talking about composite columns. That is why I added the qualifier about "Contains names" appearing only on is_multiple text columns.
Random thought: I haven't taken the time to understand exactly what you are trying to do, but it seems that you are trying to populate a column with the list of alternate names for the authors. Why not do this with action chains, where the chain modifies a "standard" is_multiple composite that has "Contains names" checked? The chain would trigger when a book is modified, updating the target column. |
![]() |
![]() |
![]() |
#939 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
Last edited by capink; 01-18-2022 at 10:42 AM. |
|
![]() |
![]() |
![]() |
#940 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,008
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I have the same Grouped Search (penned_as)
It links the normal Authors and my custom column #pseudo4 (Ampersand separated text) As Chaley suspects, the column type is not appropriate |
![]() |
![]() |
![]() |
#941 | |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
Quote:
The fuzzy search of Find Duplicates works pretty well for me so far, therefore and because I was overwhelmed by the rest of your tutorial I'll stick with it for now. I got the idea from you - belated thank you! |
|
![]() |
![]() |
![]() |
#942 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
If you are using commas instead of ampersands, do not tick the option "composite has names" in the Find Duplicates.
|
![]() |
![]() |
![]() |
#943 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
thx!
Regarding the Action Chain, even though I actually have no clue. If I understood the problem with the names, the ampersands and the multiple composite columns correctly, chaley's solution doesn't work either, because these columns don't have "Contains names", right? |
![]() |
![]() |
![]() |
#944 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,409
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
However, if what you have is working then it is probably best to stick with it. Action chains can require substantial template-fu. |
|
![]() |
![]() |
![]() |
#945 |
Leftutti
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
|
OK, I understand.
Of course I stick with "mine" as I have no idea about templates and stuff like that |
![]() |
![]() |
![]() |
Tags |
cross library duplicates, in library duplicates |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Generate Cover | kiwidude | Plugins | 861 | 06-21-2025 11:51 AM |
[GUI Plugin] Quality Check | kiwidude | Plugins | 1247 | 04-18-2025 01:51 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] View Manager | kiwidude | Plugins | 415 | 05-11-2024 03:28 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |