Hello guys,
I use darktable to edit my raw captured images in bulk.
basically my workflow in darktable goes like this
1-import raw images from folder A.
2-edit all the images at once using pre-defined style.
3.export images as jpg to folder B.
And to increase my productivity I looked to use Lua script to automate my workflow.
but I ran against the wall trying to import the images
though I got “Hello World!” showing up in darktable
=========Here is the code========
dt = require “darktable”
dt.films.new(“D:\imgee\”)
dt.database.import(“D:\imgee\”)
I havn’t tested anything, everything I’m writing here is wild guessing. Perhaps @wpfergusoncan test it on his Windows machine.
What doesn’t work?
Have you created a new file and then require this file in the luarc? Like this:
require "test.lua"
First of all you should make dt local to not get into conflicts with other scripts.
local dt = require “darktable”
I think you need to escape the "" like this:
dt.films.new(“D:\\imgee\\”)
Is a new film created with the name "D:\imgee"? (It is interesting, that we have no script in the git repository, that uses “films.new”. So this is not the best tested function.)
And here again I think you need to escape the "" like this:
dt.database.import(“D:\\imgee\\”)
To check error messages you can run dt from the command line like this:
I am running it inside the luarc file and It’s partially working
it does create xmp files in side the directory but it is not showing up the images in darktable
So I know this part at least is working
dt.database.import(“D:\\imgee1\\”)
but it’s not showing up in darktable, because (if I am not mistaken) images must be added to film
and I think that’s because of I am not doing this command right