View Single Post
Old 11-10-2022, 03:29 PM   #7721
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,131
Karma: 77213683
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Click image for larger version

Name:	2022-11-10 17_48_55-Add actions.png
Views:	386
Size:	45.3 KB
ID:	197652

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

Last edited by ownedbycats; 11-10-2022 at 06:40 PM. Reason: tidying up template spacing/formatting
ownedbycats is offline   Reply With Quote