فهرست منبع

removed unnecessary code

Markus Spring 8 ماه پیش
والد
کامیت
2c6d2fa89f
1فایلهای تغییر یافته به همراه2 افزوده شده و 57 حذف شده
  1. 2 57
      mail2blog.lua

+ 2 - 57
mail2blog.lua

@@ -6,8 +6,8 @@ email_1 = config.email_1
 email_2 = config.email_2
 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'
 
@@ -180,61 +180,6 @@ local function numberToString(number, nilReplacement, nanReplacement)
   return result
 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
 local function create_safe_filename(title)
   local replacements = {