View Single Post
Old 04-03-2021, 02:13 AM   #5748
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,171
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I made another FFF-related template for use with Action Chains' single-field edit. It will set the fanfic's status column to "Abandoned" if either:
  • the last-updated column is more than 730 days ago
  • the error column is filled (note that it'll run for any value, including the transient and informational ones. So you want "save all errors" unchecked!)

Also note that since this uses the new field references, you need a minimum of Calibre 5.14 for this.

Code:
program:
d1 = format_date(today(),'iso');
d2 = $$#yourfanficupdatedcolumn;
status = $#yourfanficstatuscolumn;
error = $#yourfanficerrorcolumn;

	if
		and(
			status=='In-Progress',
			days_between(d1, d2) ># 730,
			)
	then
		"Abandoned"
		elif
			and(
				status=='In-Progress',
				error,
				)
		then
			"Abandoned"

	else
		status
	fi

Last edited by ownedbycats; 04-03-2021 at 10:41 PM.
ownedbycats is offline   Reply With Quote