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

@@ -34,10 +34,25 @@ local df = require "lib/dtutils.file"
du.check_min_api_version("7.0.0", "executable_manager")
local gettext = dt.gettext.gettext
dt.gettext.bindtextdomain("executable_manager", dt.configuration.config_dir .."/lua/locale/")
local function _(msg)
return gettext(msg)
end
-- return data structure for script_manager
local script_data = {}
script_data.metadata = {
name = "executable_manager",
purpose = _("manage the list of external executables used by the lua scripts"),
author = "Bill Ferguson <wpferguson@gmail.com>",
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/tools/executable_manager"
}
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
@@ -45,8 +60,6 @@ script_data.show = nil -- only required for libs since the destroy_method only h
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
local gettext = dt.gettext.gettext
local exec_man = {} -- our own namespace
exec_man.module_installed = false
exec_man.event_registered = false
@@ -55,12 +68,6 @@ exec_man.event_registered = false
-- F U N C T I O N S
-- - - - - - - - - - - - - - - - - - - - - - - - - - - -
gettext.bindtextdomain("executable_manager", dt.configuration.config_dir .."/lua/locale/")
local function _(msg)
return gettext(msg)
end
local function grep(file, pattern)
local result = {}