A6300 - Root
---------Date wise Sub folders - Raw Files
-------------------darktable_exported - sub folder under date wise sub folders All Heic, tiff, png files
I want to import - add to library this tree adding only the raw files.
if I select the root A6300 folder and tick recursive directory and ignore jpegs it adds all Heic and tiffs and png files.
is there a way to only import first level directory or to ignore all files except raw files
Perhaps that would get too complicated when you also want to allow selection of individual files?
But, darktable has tags for the image format that are automatically set. With those, you can select all non-raw files after import, and that selection works over all directories/film rolls (in the âcollectionsâ module, select âtagâ from the dropdown just below the module title, then look under the âdarktableâ tag, âformatâ)
because nobody had that usecase in mind and invested the effort to implement that.
You might file a feature request for that: Sign in to GitHub ¡ GitHub
Thanks a lot probably this will solve my problems.
The reason I want this is because the latest git builds after darktable 3.9.0+1362~ga1de270c4 will not update the library.db and I am getting this error âdatabase `library.dbâ couldnât be upgraded from version 35 to 36. abortingâ and I want to recreate the library.db.
If there is any other solution outside of darktable I am open to it.
I have modified the import_filters.lua script as follows
-- ignore jpeg
dt.register_import_filter("only raw", function(event, images)
dt.print_error("ignoring all jpegs")
for i, img in ipairs(images) do
local extension = img:match("[^.]*$"):upper()
if (extension == "HEIC") or (extension == "PNG") or (extension == "JPG") or (extension == "JPEG") or (extension == "TIFF") or (extension == "TIF") then
images[i] = nil
end
end
end)
in import dialog I select this filter only tic recursive directory but it shows all the files including pngs and heic and tiff
The above lua script works when you actually press the add to library button. So when you select the directory it will show you all the files including jpg,heic,png,tif etc but when you press the add to library button only the raw files are addedd.
Thanks to all specially @chris who pointed me to the lua script