Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions contrib/HDRMerge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ local function main()
local set_tag = GUI.Target.add_tags.text
if set_tag ~= nil then -- add additional user-specified tags
for tag in string.gmatch(set_tag, '[^,]+') do
tag = CleanSpaces(tag)
tag = dt.tags.create(tag)
dt.tags.attach(tag, imported)
local cleaned_tag = CleanSpaces(tag)
cleaned_tag = dt.tags.create(cleaned_tag)
dt.tags.attach(cleaned_tag, imported)
end
end
dt.print(_('HDRMerge completed successfully'))
Expand Down Expand Up @@ -483,4 +483,4 @@ script_data.restart = restart
script_data.destroy_method = "hide"
script_data.show = restart

return script_data
return script_data
6 changes: 3 additions & 3 deletions contrib/enfuseAdvanced.lua
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ local function main(storage, image_table, extra_data)
local set_tag = GUI.Target.add_tags.text
if set_tag ~= nil then --add additional user-specified tags
for tag in string.gmatch(set_tag, '[^,]+') do
tag = CleanSpaces(tag)
tag = dt.tags.create(tag)
dt.tags.attach(tag, imported)
local cleaned_tag = CleanSpaces(tag)
cleaned_tag = dt.tags.create(cleaned_tag)
dt.tags.attach(cleaned_tag, imported)
end
end
end
Expand Down
25 changes: 13 additions & 12 deletions contrib/face_recognition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,25 +311,26 @@ local function face_recognition ()
if ignoreByTag (img, ignoreTags) then
dt.print_log("Face recognition: Ignoring image with ID " .. img.id)
else
local tag_name = t
-- Check of unrecognized unknown_person
if t == "unknown_person" then
t = unknownTag
if tag_name == "unknown_person" then
tag_name = unknownTag
end
-- Check of unrecognized no_persons_found
if t == "no_persons_found" then
t = nonpersonsfoundTag
if tag_name == "no_persons_found" then
tag_name = nonpersonsfoundTag
end
if t ~= "" and t ~= nil then
if categoryTagString ~= "" and t ~= nonpersonsfoundTag then
t = categoryTagString .. "|" .. t
if tag_name ~= "" and tag_name ~= nil then
if categoryTagString ~= "" and tag_name ~= nonpersonsfoundTag then
tag_name = categoryTagString .. "|" .. tag_name
end
dt.print_log ("ImgId:" .. img.id .. " Tag:".. t)
dt.print_log ("ImgId:" .. img.id .. " Tag:".. tag_name)
-- Create tag if it does not exist
if tags_list[t] == nil then
tag = dt.tags.create (t)
tags_list[t] = tag
if tags_list[tag_name] == nil then
tag = dt.tags.create (tag_name)
tags_list[tag_name] = tag
else
tag = tags_list[t]
tag = tags_list[tag_name]
end
img:attach_tag (tag)
end
Expand Down
4 changes: 2 additions & 2 deletions contrib/gimp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ local function gimp_edit(storage, image_table, extra_data) --finalize
img_list = ""

for _,exp_img in pairs(image_table) do
exp_img = df.sanitize_filename(exp_img)
img_list = img_list ..exp_img.. " "
local sanitized = df.sanitize_filename(exp_img)
img_list = img_list ..sanitized.. " "
end

dt.print(_("launching GIMP..."))
Expand Down
4 changes: 2 additions & 2 deletions contrib/image_stack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ local function cleanup(img_list)
dt.print_log("image list is " .. img_list)
files = du.split(img_list, " ")
for _,f in ipairs(files) do
f = string.gsub(f, '[\'\"]', "")
os.remove(f)
local cleaned = string.gsub(f, '[\'\"]', "")
os.remove(cleaned)
end
end

Expand Down
4 changes: 2 additions & 2 deletions tools/get_lib_manpages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ local output = io.popen("cd "..dt.configuration.config_dir.."/lua/lib ;find . -n
-- loop through the libraries

for line in output:lines() do
line = string.gsub(line, "/", ".")
local lib_name = line:sub(3,-5)
local cleaned_line = string.gsub(line, "/", ".")
local lib_name = cleaned_line:sub(3,-5)
if lib_name:len() > 2 then
lib_name = "lib/" .. lib_name
local lib = require(lib_name)
Expand Down
4 changes: 2 additions & 2 deletions tools/get_libdoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ local output = io.popen("cd "..dt.configuration.config_dir.."/lua/lib ;find . -n
-- loop through the libraries

for line in output:lines() do
line = string.gsub(line, "/", ".")
local lib_name = line:sub(3,-5)
local cleaned_line = string.gsub(line, "/", ".")
local lib_name = cleaned_line:sub(3,-5)
if lib_name:len() > 2 then
lib_name = "lib/" .. lib_name
local lib = require(lib_name)
Expand Down
4 changes: 3 additions & 1 deletion tools/script_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,9 @@ local function install_scripts()
sm.widgets.folder_selector.selected = i
break
end
i = i + 1
-- Lua 5.5: for loop control variables are read-only. This increment
-- was always a no-op since numeric for loops use an internal counter.
-- i = i + 1
end

log.msg(log.debug, "clearing text fields")
Expand Down