Skip to content

Commit 1b272be

Browse files
committed
various scripts - reverted the calls to io_popen and os_execute back
to the respective lua calls.
1 parent 9f423ee commit 1b272be

14 files changed

+26
-26
lines changed

contrib/autostyle.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ script_data.show = nil -- only required for libs since the destroy_method only h
6969
-- run command and retrieve stdout
7070
local function get_stdout(cmd)
7171
-- Open the command, for reading
72-
local fd = assert(syslib.io_popen(cmd, 'r'))
72+
local fd = assert(io.popen(cmd, 'r'))
7373
darktable.control.read(fd)
7474
-- slurp the whole file
7575
local data = assert(fd:read('*a'))
@@ -188,4 +188,4 @@ darktable.register_event("autostyle", "post-import-image",
188188

189189

190190
script_data.destroy = destroy
191-
return script_data
191+
return script_data

contrib/color_profile_manager.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ end
107107

108108
local function list_profiles(dir)
109109
local files = {}
110-
local p = dtsys.io_popen(DIR_CMD .. " " .. dir)
110+
local p = io.popen(DIR_CMD .. " " .. dir)
111111
if p then
112112
for line in p:lines() do
113113
table.insert(files, line)

contrib/fujifilm_dynamic_range.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ local function detect_dynamic_range(event, image)
106106
-- without -n flag, exiftool will round to the nearest tenth
107107
command = command .. " -RawExposureBias -n -t " .. RAF_filename
108108
dt.print_log(command)
109-
output = dtsys.io_popen(command)
109+
output = io.popen(command)
110110
local raf_result = output:read("*all")
111111
output:close()
112112
if #raf_result == 0 then

contrib/fujifilm_ratings.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ local function detect_rating(event, image)
6565
local JPEG_filename = string.gsub(RAF_filename, "%.RAF$", ".JPG")
6666
local command = "exiftool -Rating " .. JPEG_filename
6767
dt.print_log(command)
68-
local output = dtsys.io_popen(command)
68+
local output = io.popen(command)
6969
local jpeg_result = output:read("*all")
7070
output:close()
7171
if string.len(jpeg_result) > 0 then
@@ -76,7 +76,7 @@ local function detect_rating(event, image)
7676
end
7777
command = "exiftool -Rating " .. RAF_filename
7878
dt.print_log(command)
79-
output = dtsys.io_popen(command)
79+
output = io.popen(command)
8080
local raf_result = output:read("*all")
8181
output:close()
8282
if string.len(raf_result) > 0 then

contrib/geoJSON_export.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ dt.preferences.register("geoJSON_export",
331331
_("opens the geoJSON file after the export with the standard program for geoJSON files"),
332332
false )
333333

334-
local handle = dtsys.io_popen("xdg-user-dir DESKTOP")
334+
local handle = io.popen("xdg-user-dir DESKTOP")
335335
local result = handle:read()
336336
handle:close()
337337
if (result == nil) then

contrib/geoToolbox.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ local function reverse_geocode()
412412
-- jq could be replaced with a Lua JSON parser
413413
startCommand = string.format("curl --silent \"https://api.mapbox.com/geocoding/v5/mapbox.places/%s,%s.json?types=%s&access_token=%s\" | jq '.features | .[0] | '.text''", lon1, lat1, types, tokan)
414414

415-
local handle = dtsys.io_popen(startCommand)
415+
local handle = io.popen(startCommand)
416416
local result = trim12(handle:read("*a"))
417417
handle:close()
418418

contrib/image_stack.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ local function list_files(search_string)
348348
search_string = string.gsub(search_string, "/", "\\\\")
349349
end
350350

351-
local f = dtsys.io_popen(ls .. search_string)
351+
local f = io.popen(ls .. search_string)
352352
if f then
353353
local found_file = f:read()
354354
while found_file do

contrib/image_time.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ local function get_image_taken_time(image)
226226

227227
local exiv2 = df.check_if_bin_exists("exiv2")
228228
if exiv2 then
229-
p = dtsys.io_popen(exiv2 .. " -K Exif.Image.DateTime " .. image.path .. PS .. image.filename)
229+
p = io.popen(exiv2 .. " -K Exif.Image.DateTime " .. image.path .. PS .. image.filename)
230230
if p then
231231
for line in p:lines() do
232232
if string.match(line, "Exif.Image.DateTime") then
@@ -244,7 +244,7 @@ end
244244

245245
local function _get_windows_image_file_creation_time(image)
246246
local datetime = nil
247-
local p = dtsys.io_popen("dir " .. image.path .. PS .. image.filename)
247+
local p = io.popen("dir " .. image.path .. PS .. image.filename)
248248
if p then
249249
for line in p:lines() do
250250
if string.match(line, ds.sanitize_lua(image.filename)) then
@@ -265,7 +265,7 @@ end
265265

266266
local function _get_nix_image_file_creation_time(image)
267267
local datetime = nil
268-
local p = dtsys.io_popen("ls -lL --time-style=full-iso " .. image.path .. PS .. image.filename)
268+
local p = io.popen("ls -lL --time-style=full-iso " .. image.path .. PS .. image.filename)
269269
if p then
270270
for line in p:lines() do
271271
if string.match(line, ds.sanitize_lua(image.filename)) then

contrib/kml_export.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ if dt.configuration.running_os == "windows" then
343343
elseif dt.configuration.running_os == "macos" then
344344
defaultDir = os.getenv("HOME")
345345
else
346-
local handle = dsys.io_popen("xdg-user-dir DESKTOP")
346+
local handle = io.popen("xdg-user-dir DESKTOP")
347347
defaultDir = handle:read()
348348
handle:close()
349349
end

official/enfuse.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if enfuse_installed then
116116

117117
local version = nil
118118

119-
local p = dtsys.io_popen(enfuse_installed .. " --version")
119+
local p = io.popen(enfuse_installed .. " --version")
120120
local f = p:read("all")
121121
p:close()
122122
version = string.match(f, "enfuse (%d.%d)")

0 commit comments

Comments
 (0)