How would you copy history of an image and paste (overwrite) to another using only lua scripting? Assume that the source/destination file names are known.
I’m searching right now in lua documentation, unfortunately I don’t have any clue where to start …
Thanks.
use dt.gui.action() shortcuts
1 Like
Thanks! I see, the action paths are displayed in Preferences/Shortcuts … I’ll give it a try!
I read in lua documentation (https://docs.darktable.org/lua/stable/lua.api.manual/darktable/gui/action/):
darktable.gui.action
function(
path : string,
[instance] : integer,
element : string,
[effect] : string,
[speed] : integer
) : string
Will perform the specified effect on the path, instance, and element of an action, or return the status.
path - string - The full path of an action, i.e. 'lib/filter/view'.
[instance] - integer - Optional - The instance of an image processing module to execute action on. If not provided, 1 is used.
element - string - The element of an action, for example ‘selection’, or leave empty for default.
[effect] - string - Optional - The effect of an action, for example ’next’, or leave empty for default.
[speed] - integer - Optional - 1 causes the effect to be performed, 0 or NaN returns the current status.
return - string - The current status of the action.
My question is: what other possibilities do I have for “element” and “effect”? Where can I find more to read about it?
E.g. I want to set history stack mode to overwrite, using dt.gui.action()