View Single Post
Old 04-05-2017, 01:55 PM   #1960
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,037
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
(multi-reply)

Quote:
Originally Posted by agumon1123 View Post
Is there a way to use the replace metadata function to do something like add an extra author to stories?
You can, by using the 'split' comma mechanism:

Code:
replace_metadata:
 author=>Bob=>Bob\,Fred
You probably want to use a story URL section or specific match regex rather than applying it universally. And an exact '^Bob$' rather than any 'Bob'.

Also, authorUrl and authorId would need to be handled separately.

Quote:
Originally Posted by firefoxxy View Post
...
This works without a problem for now, and I get the author e.g. 'Twi [archived by ISF_Archivist]'. Can this part in brackets somehow be cut off? I tried doing so. I only came up with the following, but this doesn't work. I guess because the custom column data is not included in metadata?
Code:
replace_metadata:
 #writer=> \[.*\]=>
replace_metadata operates on the metadata entry, you're giving it the column name. Use this instead:
Code:
replace_metadata:
 byline=> \[.*\]=>
[/QUOTE]

But I don't think you'll need it with the next test version.
JimmXinu is offline   Reply With Quote