Merge pull request #78 from wpferguson/dt-2.2-compatibility
Darktable 2.2 compatibility
This commit is contained in:
@@ -41,7 +41,7 @@ local darktable = require "darktable"
|
|||||||
local autostyle_apply_one_image,autostyle_apply_one_image_event,autostyle_apply,exiftool_attribute,capture
|
local autostyle_apply_one_image,autostyle_apply_one_image_event,autostyle_apply,exiftool_attribute,capture
|
||||||
|
|
||||||
-- Tested it with darktable 1.6.1 and darktable git from 2014-01-25
|
-- Tested it with darktable 1.6.1 and darktable git from 2014-01-25
|
||||||
darktable.configuration.check_version(...,{2,0,2},{2,1,0},{3,0,0})
|
darktable.configuration.check_version(...,{2,0,2},{2,1,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Receive the event triggered
|
-- Receive the event triggered
|
||||||
function autostyle_apply_one_image_event(event,image)
|
function autostyle_apply_one_image_event(event,image)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ local gettext = dt.gettext
|
|||||||
-- not a number
|
-- not a number
|
||||||
local NaN = 0/0
|
local NaN = 0/0
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ USAGE
|
|||||||
local darktable = require "darktable"
|
local darktable = require "darktable"
|
||||||
|
|
||||||
-- Tested with darktable 2.0.1
|
-- Tested with darktable 2.0.1
|
||||||
darktable.configuration.check_version(...,{2,0,0},{3,0,0})
|
darktable.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
local queue = {}
|
local queue = {}
|
||||||
local processed_files = {}
|
local processed_files = {}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ local dt = require "darktable"
|
|||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("geoJSON_export",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("geoJSON_export",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ local dt = require "darktable"
|
|||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("geo_uri",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("geo_uri",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ require "official/yield"
|
|||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("gimp",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("gimp",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ USAGE
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
dt.configuration.check_version(...,{2,0,1},{3,0,0})
|
dt.configuration.check_version(...,{2,0,1},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("gps_select",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("gps_select",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ require "official/yield"
|
|||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
-- works with darktable API version 2.0.0 and 3.0.0
|
-- works with darktable API version 2.0.0 and 3.0.0
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("hugin",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("hugin",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ local dt = require "darktable"
|
|||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("kml_export",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("kml_export",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
|
|
||||||
|
-- added version check
|
||||||
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
local function apply_rating(rating)
|
local function apply_rating(rating)
|
||||||
local images = dt.gui.action_images
|
local images = dt.gui.action_images
|
||||||
for _, i in ipairs(images) do
|
for _, i in ipairs(images) do
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ local dt = require "darktable"
|
|||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
dt.configuration.check_version(...,{2,0,2},{3,0,0})
|
dt.configuration.check_version(...,{2,0,2},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("slideshowMusic",dt.configuration.config_dir.."/lua/")
|
gettext.bindtextdomain("slideshowMusic",dt.configuration.config_dir.."/lua/")
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ USAGE
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{2,0,1})
|
dt.configuration.check_version(...,{2,0,1},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
local function show_status(storage, image, format, filename, number, total, high_quality, extra_data)
|
local function show_status(storage, image, format, filename, number, total, high_quality, extra_data)
|
||||||
dt.print("Export Image "..tostring(number).."/"..tostring(total))
|
dt.print("Export Image "..tostring(number).."/"..tostring(total))
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ LUA ERROR Hallo Welt!
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Not translated Text
|
-- Not translated Text
|
||||||
dt.print_error("Hello World!")
|
dt.print_error("Hello World!")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ USAGE
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dt.print("hello, world")
|
dt.print("hello, world")
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ https://www.darktable.org/lua-api/index.html.php#darktable_new_widget
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- add a new lib
|
-- add a new lib
|
||||||
local check_button = dt.new_widget("check_button"){label = "MyCheck_button", value = true}
|
local check_button = dt.new_widget("check_button"){label = "MyCheck_button", value = true}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ USAGE
|
|||||||
* require this script from your main lua file
|
* require this script from your main lua file
|
||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{2,0,1},{3,0,0})
|
dt.configuration.check_version(...,{2,0,1},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dt.preferences.register("preferenceExamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
dt.preferences.register("preferenceExamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||||
"preferenceExamplesString", -- name
|
"preferenceExamplesString", -- name
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ local dt = require "darktable"
|
|||||||
|
|
||||||
local log = require "lib/dtutils.log"
|
local log = require "lib/dtutils.log"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dtutils.libdoc.functions["split"] = {
|
dtutils.libdoc.functions["split"] = {
|
||||||
Name = [[split]],
|
Name = [[split]],
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ dtutils_file.libdoc = {
|
|||||||
|
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||||
gettext.bindtextdomain("dtutils.file",dt.configuration.config_dir.."/lua/locale/")
|
gettext.bindtextdomain("dtutils.file",dt.configuration.config_dir.."/lua/locale/")
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ local dt = require "darktable"
|
|||||||
local https = require "ssl.https"
|
local https = require "ssl.https"
|
||||||
local cjson = require "cjson"
|
local cjson = require "cjson"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- compare two version strings of the form "major.minor.patch"
|
-- compare two version strings of the form "major.minor.patch"
|
||||||
-- returns -1, 0, 1 if the first version is smaller, equal, greater than the second version,
|
-- returns -1, 0, 1 if the first version is smaller, equal, greater than the second version,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ USAGE
|
|||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- set this to "false" if you don't want to overwrite metadata fields
|
-- set this to "false" if you don't want to overwrite metadata fields
|
||||||
-- (title, description, creator, publisher and rights) that are already set
|
-- (title, description, creator, publisher and rights) that are already set
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ all tags longer than the given length will be automatically deleted at every res
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dt.preferences.register("delete_long_tags", "length", "integer",
|
dt.preferences.register("delete_long_tags", "length", "integer",
|
||||||
"maximum length of tags to keep",
|
"maximum length of tags to keep",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ local dt = require "darktable"
|
|||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
|
|
||||||
dt.configuration.check_version(...,{3,0,0})
|
dt.configuration.check_version(...,{3,0,0},{4,0,0})
|
||||||
|
|
||||||
-- thanks Tobias Jakobs for this function (taken from contrib/hugin.lua)
|
-- thanks Tobias Jakobs for this function (taken from contrib/hugin.lua)
|
||||||
local function checkIfBinExists(bin)
|
local function checkIfBinExists(bin)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ local dt = require "darktable"
|
|||||||
require "darktable.debug"
|
require "darktable.debug"
|
||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{2,1,0},{3,0,0})
|
dt.configuration.check_version(...,{2,1,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dt.preferences.register("generate_image_txt",
|
dt.preferences.register("generate_image_txt",
|
||||||
"enabled",
|
"enabled",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ This plugin will add a widget at the bottom of the left column in lighttable mod
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
local main_label = dt.new_widget("label"){selectable = true, ellipsize = "middle", halign = "start"}
|
local main_label = dt.new_widget("label"){selectable = true, ellipsize = "middle", halign = "start"}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ increase it if you need more temporary selection buffers
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
local buffer_count = 5
|
local buffer_count = 5
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Plugin allows you to choose how many thumbnails you need per row
|
|||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
require "official/yield"
|
require "official/yield"
|
||||||
|
|
||||||
dt.configuration.check_version(...,{2,0,0},{3,0,0})
|
dt.configuration.check_version(...,{2,0,0},{3,0,0},{4,0,0})
|
||||||
|
|
||||||
dt.preferences.register
|
dt.preferences.register
|
||||||
("selection_to_pdf","Open with","string",
|
("selection_to_pdf","Open with","string",
|
||||||
|
|||||||
Reference in New Issue
Block a user