View Single Post
Old 05-24-2023, 12:34 PM   #1105
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,439
Karma: 81367635
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Calibre Preferences > Tweaks > Plugin Tweaks. Add action_chains_experimental = True

This will enable a 'Chain Caller' action which lets you run another chain.

Click image for larger version

Name:	2023-05-24 12_36_19-Window.png
Views:	1107
Size:	40.3 KB
ID:	201665

It's a little slow as there's checks for recursion to prevent it getting stuck in an endless loop.

Note: While doesn't seem to be the case here, this may be useful later on: if the reason for using chain-caller is to avoid duplication of templates used for Single-Field Edits, you can use a stored template (Calibre Preferences > Template Functions > Stored Template tab).

As it skips the recursion check, using a stored template in the SFE is faster than using chain-caller on a single-action chain used to hold the template:

Click image for larger version

Name:	2023-05-24 13_45_12-calibre - Preferences - Template functions.png
Views:	1082
Size:	48.8 KB
ID:	201667

Click image for larger version

Name:	2023-05-24 13_44_18-Window.png
Views:	1112
Size:	29.4 KB
ID:	201668

Last edited by ownedbycats; 05-24-2023 at 03:20 PM. Reason: Add info on stored templates
ownedbycats is offline   Reply With Quote