check if exiftool exists in autostyle.lua

This commit is contained in:
supertobi
2017-10-11 09:32:29 +02:00
committed by GitHub
parent 20a31b39e0
commit d0ec941009

View File

@@ -28,6 +28,8 @@ USAGE
> exiftool -AutoDynamicRange XE021351.RAF > exiftool -AutoDynamicRange XE021351.RAF
Auto Dynamic Range : 200% Auto Dynamic Range : 200%
ADDITIONAL SOFTWARE NEEDED FOR THIS SCRIPT
* exiftool
LICENSE LICENSE
GPLv2 GPLv2
@@ -41,7 +43,7 @@ local darktable = require "darktable"
local autostyle_apply_one_image,autostyle_apply_one_image_event,autostyle_apply,exiftool_attribute,capture local autostyle_apply_one_image,autostyle_apply_one_image_event,autostyle_apply,exiftool_attribute,capture
-- Tested it with darktable 1.6.1 and darktable git from 2014-01-25 -- Tested it with darktable 1.6.1 and darktable git from 2014-01-25
darktable.configuration.check_version(...,{2,0,2},{2,1,0},{3,0,0},{4,0,0}) darktable.configuration.check_version(...,{2,0,2},{2,1,0},{3,0,0},{4,0,0},{5,0,0})
-- Receive the event triggered -- Receive the event triggered
function autostyle_apply_one_image_event(event,image) function autostyle_apply_one_image_event(event,image)
@@ -66,6 +68,10 @@ function autostyle_apply_one_image (image)
darktable.print("style name not found in " .. darktable.preferences.read("autostyle","exif_tag","string")) darktable.print("style name not found in " .. darktable.preferences.read("autostyle","exif_tag","string"))
return return
end end
if not checkIfBinExists("exiftool") then
return
end
-- First find the style (we have its name) -- First find the style (we have its name)
local styles= darktable.styles local styles= darktable.styles