View Single Post
Old 01-18-2021, 10:10 AM   #5214
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,045
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Ascello View Post
Is there a way to have replace_metadata duplicate a tag? For example to have one char named "Adam" to be replaced into "Adam A" and "Adam B" in the same fic?
Yes, \, (slash-comma) indicates to replace with separate items.

Code:
## You can 'split' one list item into multiple list entries by using
## \, in the replacement string.
##
## Examples:
replace_metadata:
 category=>Bitextual=>M/M\,F/M
Quote:
Originally Posted by Ascello View Post
Also is it possible to have 2 conditions to 1 pattern replacement in replace_metadata?
No, only one conditional is permitted.

The whole replace_metadata system has grown into a bit of a monstrosity. 'Simple' changes have unexpected impacts and I'm very reluctant to touch it unless it's actually broken.

You can combine more than one metadata value into a custom 'extra_valid_entries' metadata entry and then check against that if you really want.
JimmXinu is offline   Reply With Quote