Added metadata fields to scripts that script_manager can access and
display as a tooltip. Added script_manager integration to those scripts that didn't have it.
This commit is contained in:
@@ -31,10 +31,23 @@ local gettext = dt.gettext.gettext
|
||||
|
||||
du.check_min_api_version("7.0.0", "copy_paste_metadata")
|
||||
|
||||
dt.gettext.bindtextdomain("copy_paste_metadata", dt.configuration.config_dir .."/lua/locale/")
|
||||
|
||||
local function _(msgid)
|
||||
return gettext(msgid)
|
||||
end
|
||||
|
||||
-- return data structure for script_manager
|
||||
|
||||
local script_data = {}
|
||||
|
||||
script_data.metadata = {
|
||||
name = "copy_paste_metadata",
|
||||
purpose = _("adds keyboard shortcuts and buttons to copy/paste metadata between images"),
|
||||
author = "Tobias Ellinghaus",
|
||||
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/official/copy_paste_metadata"
|
||||
}
|
||||
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
|
||||
@@ -58,12 +71,6 @@ local publisher = ""
|
||||
local rights = ""
|
||||
local tags = {}
|
||||
|
||||
gettext.bindtextdomain("copy_paste_metadata", dt.configuration.config_dir .."/lua/locale/")
|
||||
|
||||
local function _(msgid)
|
||||
return gettext(msgid)
|
||||
end
|
||||
|
||||
local function copy(image)
|
||||
if not image then
|
||||
have_data = false
|
||||
|
||||
Reference in New Issue
Block a user