Skip to content

Commit e41029d

Browse files
authored
Merge pull request #464 from wpferguson/implement_script_metadata
Implement script metadata
2 parents ac945b9 + 55e68f8 commit e41029d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2308
-1607
lines changed

contrib/AutoGrouper.lua

Lines changed: 225 additions & 218 deletions
Large diffs are not rendered by default.

contrib/CollectHelper.lua

Lines changed: 260 additions & 253 deletions
Large diffs are not rendered by default.

contrib/HDRMerge.lua

Lines changed: 487 additions & 480 deletions
Large diffs are not rendered by default.

contrib/LabelsToTags.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ local du = require "lib/dtutils"
5252

5353
du.check_min_api_version("7.0.0", "LabelsToTags")
5454

55-
local gettext = dt.gettext.gettext
55+
local gettext = darktable.gettext.gettext
5656

57-
gettext.bindtextdomain("LabelsToTags", dt.configuration.config_dir .."/lua/locale/")
57+
darktable.gettext.bindtextdomain("LabelsToTags", darktable.configuration.config_dir .."/lua/locale/")
5858

5959
local function _(msgid)
6060
return gettext(msgid)
@@ -64,6 +64,13 @@ end
6464

6565
local script_data = {}
6666

67+
script_data.metadata = {
68+
name = "LabelsToTags",
69+
purpose = _("allows the mass-application of tags using color labels and ratings as a guide"),
70+
author = "August Schwerdfeger ([email protected])",
71+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/LabelsToTags"
72+
}
73+
6774
script_data.destroy = nil -- function to destory the script
6875
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
6976
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again

contrib/OpenInExplorer.lua

Lines changed: 244 additions & 237 deletions
Large diffs are not rendered by default.

contrib/RL_out_sharp.lua

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,26 @@ local MODULE_NAME = "RL_out_sharp"
6565
-- check API version
6666
du.check_min_api_version("7.0.0", MODULE_NAME)
6767

68+
-- translation
69+
local gettext = dt.gettext.gettext
70+
71+
dt.gettext.bindtextdomain("RL_out_sharp", dt.configuration.config_dir .."/lua/locale/")
72+
73+
local function _(msgid)
74+
return gettext(msgid)
75+
end
76+
6877
-- return data structure for script_manager
6978

7079
local script_data = {}
7180

81+
script_data.metadata = {
82+
name = "RL_out_sharp",
83+
purpose = _("Richardson-Lucy output sharpening using GMic"),
84+
author = "Marco Carrarini <[email protected]>",
85+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/RL_out_sharp"
86+
}
87+
7288
script_data.destroy = nil -- function to destory the script
7389
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
7490
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
@@ -77,15 +93,6 @@ script_data.show = nil -- only required for libs since the destroy_method only h
7793
-- OS compatibility
7894
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
7995

80-
-- translation
81-
local gettext = dt.gettext.gettext
82-
83-
gettext.bindtextdomain("RL_out_sharp", dt.configuration.config_dir .."/lua/locale/")
84-
85-
local function _(msgid)
86-
return gettext(msgid)
87-
end
88-
8996
-- initialize module preferences
9097
if not dt.preferences.read(MODULE_NAME, "initialized", "bool") then
9198
dt.preferences.write(MODULE_NAME, "sigma", "string", "0.7")

contrib/autostyle.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ local filelib = require "lib/dtutils.file"
4343
du.check_min_api_version("7.0.0", "autostyle")
4444

4545
local gettext = darktable.gettext.gettext
46-
gettext.bindtextdomain("autostyle", dt.configuration.config_dir .."/lua/locale/")
46+
darktable.gettext.bindtextdomain("autostyle", darktable.configuration.config_dir .."/lua/locale/")
4747

4848
local function _(msgid)
4949
return gettext(msgid)
@@ -53,6 +53,13 @@ end
5353

5454
local script_data = {}
5555

56+
script_data.metadata = {
57+
name = "autostyle",
58+
purpose = _("automatically apply a style based on image EXIF tag"),
59+
author = "Marc Cousin <[email protected]>",
60+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/autostyle/"
61+
}
62+
5663
script_data.destroy = nil -- function to destory the script
5764
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
5865
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again

contrib/change_group_leader.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,30 @@ local gettext = dt.gettext.gettext
4040

4141
local MODULE = "change_group_leader"
4242

43-
gettext.bindtextdomain(MODULE, dt.configuration.config_dir .."/lua/locale/")
43+
dt.gettext.bindtextdomain(MODULE, dt.configuration.config_dir .."/lua/locale/")
4444

4545
du.check_min_api_version("3.0.0", MODULE)
4646

47+
local function _(msgid)
48+
return gettext(msgid)
49+
end
50+
4751
-- return data structure for script_manager
4852

4953
local script_data = {}
5054

55+
script_data.metadata = {
56+
name = "change_group_leader",
57+
purpose = _("automatically change the leader of raw+jpg paired image groups"),
58+
author = "Bill Ferguson <[email protected]>",
59+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/change_group_leader"
60+
}
61+
5162
script_data.destroy = nil -- function to destory the script
5263
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
5364
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
5465
script_data.show = nil -- only required for libs since the destroy_method only hides them
5566

56-
local function _(msgid)
57-
return gettext(msgid)
58-
end
59-
6067
-- create a namespace to contain persistent data and widgets
6168
chg_grp_ldr = {}
6269

contrib/clear_GPS.lua

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,34 @@
3939
local dt = require "darktable"
4040
local du = require "lib/dtutils"
4141

42+
local gettext = dt.gettext.gettext
43+
dt.gettext.bindtextdomain("clear_GPS", dt.configuration.config_dir .."/lua/locale/")
44+
45+
local function _(msgid)
46+
return gettext(msgid)
47+
end
48+
4249
-- return data structure for script_manager
4350

4451
local script_data = {}
4552

53+
script_data.metadata = {
54+
name = "clear_GPS",
55+
purpose = _("remove GPS data from selected image(s)"),
56+
author = "Bill Ferguson <[email protected]>",
57+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/clear_gps/"
58+
}
59+
4660
script_data.destroy = nil -- function to destory the script
4761
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
4862
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
4963
script_data.show = nil -- only required for libs since the destroy_method only hides them
5064

51-
local gettext = dt.gettext.gettext
52-
gettext.bindtextdomain("clear_GPS", dt.configuration.config_dir .."/lua/locale/")
53-
5465
-- not a number
5566
local NaN = 0/0
5667

5768
du.check_min_api_version("7.0.0", "clear_GPS")
5869

59-
60-
local function _(msgid)
61-
return gettext(msgid)
62-
end
63-
6470
local function clear_GPS(images)
6571
for _, image in ipairs(images) do
6672
-- set the location information to Not a Number (NaN) so it displays correctly

contrib/color_profile_manager.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ du.check_min_api_version("7.0.0", "color_profile_manager")
5454

5555
local gettext = dt.gettext.gettext
5656

57-
gettext.bindtextdomain("color_profile_manager", dt.configuration.config_dir .."/lua/locale/")
57+
dt.gettext.bindtextdomain("color_profile_manager", dt.configuration.config_dir .."/lua/locale/")
5858

5959
local function _(msgid)
6060
return gettext(msgid)
@@ -363,6 +363,13 @@ end
363363

364364
local script_data = {}
365365

366+
script_data.metadata = {
367+
name = "color_profile_manager",
368+
purpose = _("manage external darktable color profiles"),
369+
author = "Bill Ferguson <[email protected]>",
370+
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/color_profile_manager"
371+
}
372+
366373
script_data.destroy = destroy
367374
script_data.restart = restart
368375
script_data.destroy_method = "hide"

0 commit comments

Comments
 (0)