polarfox

My second LUA script

Sep 29th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. -- Based on the mosaic.lua script
  2.  
  3. dt = require "darktable"
  4. dt.register_event("shortcut",
  5.     function()
  6.         dt.print_error("Will try to deinterlace now")
  7.         for _,v in pairs(dt.gui.selection()) do
  8.             command = "/home/polarfox/Dropbox/cr2hdr "..v.path.."/"..v.filename
  9.             dt.print_error("this is the command: "..command)
  10.             os.execute(command)
  11.             dng=string.gsub(v.filename,"(.*).[cC][rR]2$","%1.DNG")
  12.             dt.print("HDR saved to "..v.path.."/"..dng)
  13.             dt.database.import(v.path.."/"..dng)
  14.         end
  15.     end
  16. ,"Duplicate as dual iso DNG")
Advertisement
Add Comment
Please, Sign In to add comment