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:
Bill Ferguson
2024-05-15 21:23:13 -04:00
parent ac945b9843
commit 55e68f8cd0
70 changed files with 2311 additions and 1610 deletions

View File

@@ -35,10 +35,26 @@ local du = require "lib/dtutils"
du.check_min_api_version("7.0.0", "moduleExample")
-- https://www.darktable.org/lua-api/index.html#darktable_gettext
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("moduleExample", 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 = "moduleExample",
purpose = _("example of how to create a lighttable module"),
author = "Tobias Jakobs",
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/examples/moduleExample"
}
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, otherwise leave as nil
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
@@ -46,15 +62,6 @@ script_data.show = nil -- only required for libs since the destroy_method only h
-- translation
-- https://www.darktable.org/lua-api/index.html#darktable_gettext
local gettext = dt.gettext.gettext
gettext.bindtextdomain("moduleExample", dt.configuration.config_dir .."/lua/locale/")
local function _(msgid)
return gettext(msgid)
end
-- declare a local namespace and a couple of variables we'll need to install the module
local mE = {}
mE.widgets = {}