OK... this is what I got :
jean-luc@E-5530:~$ darktable -d lua 3,965593 LUA ERROR : /home/jean-luc/.config/darktable/luarc:1: module '~/.config/darktable/Import.lua' not found: no field package.preload['~/.config/darktable/Import.lua'] no file '/usr/local/share/lua/5.3/~//config/darktable/Import/lua.lua' no file '/usr/local/share/lua/5.3/~//config/darktable/Import/lua/init.lua' no file '/usr/local/lib/lua/5.3/~//config/darktable/Import/lua.lua' no file '/usr/local/lib/lua/5.3/~//config/darktable/Import/lua/init.lua' no file '/usr/share/lua/5.3/~//config/darktable/Import/lua.lua' no file '/usr/share/lua/5.3/~//config/darktable/Import/lua/init.lua' no file './~//config/darktable/Import/lua.lua' no file './~//config/darktable/Import/lua/init.lua' no file '/usr/share/darktable/lua/~//config/darktable/Import/lua.lua' no file '/home/jean-luc/.config/darktable/lua/~//config/darktable/Import/lua.lua' no file '/usr/local/lib/lua/5.3/~//config/darktable/Import/lua.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.3/~//config/darktable/Import/lua.so' no file '/usr/lib/lua/5.3/~//config/darktable/Import/lua.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './~//config/darktable/Import/lua.so' no file '/usr/local/lib/lua/5.3/~/.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.3/~/.so' no file '/usr/lib/lua/5.3/~/.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './~/.so' jean-luc@E-5530:~$ Would it be that I have to compile lua ? I thought it was part of the padckage - I'm currently using dt 2.6.2 from Pascal's ppa. Rgrds, J.-Luc > Message du 15/12/19 00:19 > De : "August Schwerdfeger" > A : "Jean-Luc CECCOLI" > Copie à : "Darktable Users List" > Objet : Re: [darktable-user] Is there a way to bulk import many folders at > once? > > I think the Lua script needs to have a '.lua' extension, and the line to bring it in should just read 'require "" ' (with no extension). > You can run Darktable with the '-d lua' switch to display Lua errors in the terminal. > > -- > August Schwerdfeger > [email protected] > On Sat, Dec 14, 2019, 16:48 Jean-Luc CECCOLI wrote: > > Hello, > > I wanted to give it a try as my first step in learnig lua scripting. > Moved my db to another place. > Created a file named Import.in into ~/.config/darktable and containing the > following lines : > > local darktable = require("darktable") > importDirs = function() > darktable.database.import("/media/jean-luc/NEF/20081207") > end > importDirs() > > Created a file named luarc into ~/.config/darktable and containing the > following line : > > require "~/.config/darktable/Import.in" > > Launched darktable, and... nothing. :-( > > > What did I do wrong ? > > > Regards, > > > J.-Luc > > > > Message du 13/11/19 16:43 > > De : "August Schwerdfeger" > > A : "Darktable Users List" > > Copie à : > > Objet : Re: [darktable-user] Is there a way to bulk import many folders at > > once? > > > > For a one-off, one just has to make a Lua script with an import line for each folder one wants to import > > > > local darktable = require("darktable") importDirs = function() darktable.database.import("/path/to/folder1") darktable.database.import("/path/to/folder2") ... end importDirs() > > > > and then place the script in the Lua script directory and add a 'require' statement to load it, as described in the instructions in the 'lua-scripts' repository [1]. The mass-import will then run when Darktable starts up, after which the script can be removed. > > -- August Schwerdfeger [email protected] > > > > On Wed, Nov 13, 2019 at 9:13 AM wrote: > > On Tue, 12 Nov 2019 23:29:26 -0600 > > August Schwerdfeger wrote: > > > > >If the "import directories recursively" checkbox in the import dialog > > >does not fit your bill, the 'darktable.database.import' Lua function > > >(https://www.darktable.org/lua-api/index.html#darktable_database_import) > > >can import a folder. If you have a text file with a list of the > > >folders you want to import, it should be fairly quick work to make a > > >Lua script that will mass-import all of them. > > > > Could you please provide some example on how to do it? I don't know > > lua, but I'm willing to waddle through it because that's a function > > that's would be helping for me. > > > > -- > > sknahT > > > > vyS > > ____________________________________________________________________________ > > darktable user mailing list > > to unsubscribe send a mail to [email protected] > > > > > > ____________________________________________________________________________ > > darktable user mailing list to unsubscribe send a mail to > > [email protected] > > > ____________________________________________________________________________ > darktable user mailing list to unsubscribe send a mail to > [email protected] > > ____________________________________________________________________________ > darktable user mailing list to unsubscribe send a mail to > [email protected] > ____________________________________________________________________________ darktable user mailing list to unsubscribe send a mail to [email protected]
