Quote:
Originally Posted by chaley
I may have confused things, but lets put that aside.
I have an implementation that doesn't require the temporary VL but respects the current VL. It is a bit more complicated because I wanted to generalize it to any field, not just authors. To use what I describe below you must be running calibre 7.7 or later.
To use it, make a stored template named whatever you want -- I use "get_one_book_per_field_value". The template itself is:
This template takes one argument, the field (column) you are interested in (authors).
Next, make this template search:
Code:
template:"""program: get_one_book_per_field_value('authors')#@#:b:yes"""
It calls the above stored template with the argument "authors". I recommend you create a saved search with it. I did and named it "one_book_per_author". You now have @Katja_hbg's B.
You also need @Katja_hbg's A. To get it, put this in a stored template named what you want. I named it "item_has_notes". The template is
This template also takes 1 argument, the field (column) name.
Now make another template search
Code:
template:"""program: item_has_notes('authors')#@#:b:yes"""
This calles the stored template with the field name "authors". Again, I recommend you save it as a search. I did that, naming it "author has notes".
You can now do searches like: - search:"=author has notes" and search:one_book_per_author
- formats:epub and tags:foobar and search:one_book_per_author
- search:one_book_per_author
All of this works for me. I hope it works for you.
|
Hi @chaley,
Could you please create a similar template to search for each author that has a Link and return only one book per author?