Quote:
Originally Posted by Eridyne
The intent is to concatenate an arbitrary string, which for this example is "WormFic - ", with the contents of the preexisting 'site' variable, which in this case is "forums.sufficientvelocity.com".
The end result should be the string "WormFic - forums.sufficientvelocity.com", and that should end up in the custom Calibre column "collection", for use with Kobo's Collections feature.
|
As mentioned, there's no specific string concat mechanism, but
replace_metadata can do a lot. Here's one approach.
First, don't change FFF's
site metadata entry--it's assumed to be a domain name and used internally in epub metadata. So we'll make a copy.
Second, I assume you don't actually mean it when you say an
arbitrary string. You want Worm fics specifically.
Code:
[defaults]
add_to_extra_valid_entries:,cat_site
include_in_cat_site:site
add_to_replace_metadata:
cat_site=>^(.*)$=>WormFic - \1&&category==Worm
## Add more lines for Star Trek, Warhammer, whatever.
## Be aware you could get more than one then.
It's honestly probably easier to turn it around and copy
category and append site name, but this is what you asked for.
And you use
custom_columns_settings to populate the Calibre column with
cat_site. You said you have that part already.