From d0ec941009110fdcd0ebe3ce5e4326e6254d64ab Mon Sep 17 00:00:00 2001 From: supertobi Date: Wed, 11 Oct 2017 09:32:29 +0200 Subject: [PATCH] check if exiftool exists in autostyle.lua --- contrib/autostyle.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/autostyle.lua b/contrib/autostyle.lua index 17f27c3..66eca20 100644 --- a/contrib/autostyle.lua +++ b/contrib/autostyle.lua @@ -28,6 +28,8 @@ USAGE > exiftool -AutoDynamicRange XE021351.RAF Auto Dynamic Range : 200% +ADDITIONAL SOFTWARE NEEDED FOR THIS SCRIPT +* exiftool LICENSE GPLv2 @@ -41,7 +43,7 @@ local darktable = require "darktable" 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 -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 function autostyle_apply_one_image_event(event,image) @@ -66,7 +68,11 @@ function autostyle_apply_one_image (image) darktable.print("style name not found in " .. darktable.preferences.read("autostyle","exif_tag","string")) return end - + if not checkIfBinExists("exiftool") then + return + end + + -- First find the style (we have its name) local styles= darktable.styles local style