Skip to content

Instantly share code, notes, and snippets.

@boucman
Last active December 17, 2015 01:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boucman/5530900 to your computer and use it in GitHub Desktop.
Save boucman/5530900 to your computer and use it in GitHub Desktop.
-- easy access variables
dt=require("darktable")
table = require "table"
debug = require "debug"
require "darktable.debug"
--dt.debug.debug = true
function test_fn(name,...)
print("***** "..name.." ****")
params = {...}
print(dt.debug.dump(params,"parameters"))
return ...;
end
function get_trace_fn(name)
return function(...) return test_fn(name,...) end
end
dt.register_storage("lua_storage","lua storage",
function(storage,image,format,filename,num,total,hq)
--print(dt.debug.dump(storage),"storage")
for k,v in pairs(storage) do
print(k)
end
--print(dt.debug.dump(num),"num")
storage[num] = "exists"
storage[filename] = "exists"
end,
function(storage)
print(dt.debug.dump(storage))
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment