As seen in this action chain, I use a lot of templates to adjust metadata beyond what FFF can do internally. (Note that this is just Calibre metadata; the eBooks themselves need to be edited manually.) Here's two more that I think may be of use to @dailyalice or other users.
When run on
#fanficcat (fandom column), this will remove a "crossover" category (or whatever is added by
add_category_when_multi_category) from specific sets of categories.
Code:
program:
f = list_sort($#fanficcat,0,',');
if
## As this checks the sorted string, make sure it's alphabetical order (e.g. 'bar, Crossover, foo')
contains(f, '^Crossover, Mass Effect Trilogy, Mass Effect: Andromeda$', '1', '')
then
'Mass Effect Trilogy, Mass Effect: Andromeda'
elif
contains(f, '^Crossover, Half-Life, Portal$', '1', '')
then
'Half-Life, Portal'
else
$#fanficcat
fi
When run on
#fanficstatus (status column), this sets the value to 'Abandoned' if there's an error (check first to make sure it isn't transient!) and to 'Dormant' if it hasn't been updated in the last year.
Code:
program:
now = format_date(today(),'iso');
updated = $$#fanficupdated;
status = $#fanficstatus;
if
status=='In-Progress' && $#fanficerror
then
'Abandoned'
elif
status=='In-Progress' && days_between(now, updated) ># 365
then
'Dormant'
else
status
fi