|
@@ -6,8 +6,8 @@ email_1 = config.email_1
|
|
|
email_2 = config.email_2
|
|
email_2 = config.email_2
|
|
|
email_3 = config.email_3
|
|
email_3 = config.email_3
|
|
|
|
|
|
|
|
-local image_max_x = 2000
|
|
|
|
|
-local image_max_y = 2000
|
|
|
|
|
|
|
+local image_max_x = 2500
|
|
|
|
|
+local image_max_y = 2500
|
|
|
|
|
|
|
|
-- local jpg_quality_str = '92'
|
|
-- local jpg_quality_str = '92'
|
|
|
|
|
|
|
@@ -180,61 +180,6 @@ local function numberToString(number, nilReplacement, nanReplacement)
|
|
|
return result
|
|
return result
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
--- convert values to boolean, consider not a number and nil
|
|
|
|
|
-local function GuiActionValueToBoolean(value)
|
|
|
|
|
- -- NaN
|
|
|
|
|
- if (value ~= value) then
|
|
|
|
|
- return false
|
|
|
|
|
- end
|
|
|
|
|
-
|
|
|
|
|
- -- nil
|
|
|
|
|
- if (value == nil) then
|
|
|
|
|
- return false
|
|
|
|
|
- end
|
|
|
|
|
-
|
|
|
|
|
- return value ~= 0
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
-function ThreadSleep(milliseconds)
|
|
|
|
|
- -- local timeout = StepTimeout:Value()
|
|
|
|
|
- local timeout = 500
|
|
|
|
|
- local factor = milliseconds / timeout
|
|
|
|
|
- LogInfo(' '..string.format(_("wait for %d ms. (config = %s ms * %s)"), milliseconds, timeout, factor))
|
|
|
|
|
- dt.control.sleep(milliseconds)
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
--- perform the specified effect on the path and element of an action
|
|
|
|
|
--- see https://docs.darktable.org/lua/stable/lua.api.manual/darktable/gui/action/
|
|
|
|
|
-local function GuiActionInternal(path, instance, element, effect, speed, waitForPipeline)
|
|
|
|
|
- LogInfo('dt.gui.action(' ..
|
|
|
|
|
- quote(path) ..
|
|
|
|
|
- ',' .. instance .. ',' .. quote(element) .. ',' .. quote(effect) .. ',' .. numberToString(speed) .. ')')
|
|
|
|
|
-
|
|
|
|
|
- local result
|
|
|
|
|
-
|
|
|
|
|
- -- if (waitForPipeline) then
|
|
|
|
|
- -- WaitForPixelPipe:Do(function()
|
|
|
|
|
- -- result = dt.gui.action(path, instance, element, effect, speed)
|
|
|
|
|
- -- end)
|
|
|
|
|
- -- else
|
|
|
|
|
- result = dt.gui.action(path, instance, element, effect, speed)
|
|
|
|
|
- -- wait a bit...
|
|
|
|
|
- -- ThreadSleep(StepTimeout:Value() / 2)
|
|
|
|
|
- ThreadSleep(500 / 2)
|
|
|
|
|
- return result
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
--- wait for 'pixelpipe-processing-complete'
|
|
|
|
|
-local function GuiAction(path, instance, element, effect, speed)
|
|
|
|
|
- return GuiActionInternal(path, instance, element, effect, speed, true)
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
-local function randomString(length)
|
|
|
|
|
- if not length or length <= 0 then return '' end
|
|
|
|
|
- math.randomseed(os.clock()//5)
|
|
|
|
|
- return randomString(length - 1) .. charset[math.random(1, #charset)]
|
|
|
|
|
-end
|
|
|
|
|
-
|
|
|
|
|
-- Function to replace German umlauts and sanitize the filename
|
|
-- Function to replace German umlauts and sanitize the filename
|
|
|
local function create_safe_filename(title)
|
|
local function create_safe_filename(title)
|
|
|
local replacements = {
|
|
local replacements = {
|