Skip to content

Commit d45a6de

Browse files
committed
Merge pull request darktable-org#10 from supertobi/patch-3
Update kml_export.lua
2 parents 3d0e536 + 2513ac0 commit d45a6de

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

contrib/kml_export.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ local function create_kml_file(storage, image_table, extra_data)
104104
-- Creates dir if not exsists
105105
imageFoldername = "files/"
106106
local mkdirCommand = "mkdir -p "..exportDirectory.."/"..imageFoldername
107-
coroutine.yield("run_command", mkdirCommand)
107+
coroutine.yield("RUN_COMMAND", mkdirCommand)
108108
end
109109

110110

@@ -122,9 +122,9 @@ local function create_kml_file(storage, image_table, extra_data)
122122

123123
local concertToThumbCommand = "convert -size 96x96 "..image.." -resize 92x92 -mattecolor \"#FFFFFF\" -frame 2x2 +profile \"*\" "..exportDirectory.."/"..imageFoldername.."thumb_"..filename..".jpg"
124124
-- USE coroutine.yield. It does not block the UI
125-
coroutine.yield("run_command", concertToThumbCommand)
125+
coroutine.yield("RUN_COMMAND", concertToThumbCommand)
126126
local concertCommand = "convert -size 438x438 "..image.." -resize 438x438 +profile \"*\" "..exportDirectory.."/"..imageFoldername..filename..".jpg"
127-
coroutine.yield("run_command", concertCommand)
127+
coroutine.yield("RUN_COMMAND", concertCommand)
128128

129129
local pattern = "[/]?([^/]+)$"
130130
filmName = string.match(_.film.path, pattern)
@@ -222,7 +222,7 @@ local function create_kml_file(storage, image_table, extra_data)
222222
local createKMZCommand = "zip --test --move --junk-paths "
223223
createKMZCommand = createKMZCommand .."\""..exportDirectory.."/"..exportKMZFilename.."\" "
224224
createKMZCommand = createKMZCommand .."\""..dt.configuration.tmp_dir.."/"..exportKMLFilename.."\" \""..dt.configuration.tmp_dir.."/"..imageFoldername.."\"*"
225-
coroutine.yield("run_command", createKMZCommand)
225+
coroutine.yield("RUN_COMMAND", createKMZCommand)
226226
end
227227

228228
-- Open the file with the standard programm
@@ -234,7 +234,7 @@ local function create_kml_file(storage, image_table, extra_data)
234234
else
235235
kmlFileOpenCommand = "xdg-open "..exportDirectory.."/\""..exportKMLFilename.."\""
236236
end
237-
coroutine.yield("run_command", kmlFileOpenCommand)
237+
coroutine.yield("RUN_COMMAND", kmlFileOpenCommand)
238238
end
239239

240240

@@ -253,4 +253,3 @@ dt.preferences.register("kml_export", "CreateKMZ", "bool", "KML export: Create K
253253

254254
-- Register
255255
dt.register_storage("kml_export", "KML/KMZ Export", nil, create_kml_file)
256-

0 commit comments

Comments
 (0)