View Single Post
Old 07-06-2020, 12:32 PM   #4283
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,012
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Vindemiatrix View Post
I'm looking through the personal.ini defaults and the wiki on github, and I can't find anything--is there a way to add something to one (already extant) metadata category based on a value in another metadata category? I'm not seeing any examples in the add_to_replace_metadata documentation that indicate that it's possible, much less how, but I'd really like to. (Specifically what I want to do is add a specific tag to all works by a given set of authors.)

If there's not, I guess I can do it with a custom column instead, probably...
Here's a basic example of one way:

Code:
add_to_replace_metadata:
 genre=>(.*)=>\1\,A Special Genre Value&&author==Author Name
Note this only works if there is at least one genre value. Depending on site, that may or may not matter. There are other ways without that limitation, but they are more complex.

The conditional (author) can be changed to a regexp to match more than one author value. Use author_LIST if you mean stories with the same set of multiple authors.
JimmXinu is offline   Reply With Quote