---------- Forwarded message ---------
From: Coding Dave <***@gmail.com>
Date: So., 25. Nov. 2018, 16:33
Subject: Re: [darktable-user] Lighttable filter
To: <***@googlemail.com>
Hi Felix,
thats the kind of helpful message I expected by asking in the users mailing
lst. Thank you for your idea and sample code. I have modified it to my
needs and am very happy with the results.
Kind regards
David
---SCHNIPP---
local dt = require "darktable"
-- function to get number of images in group
local function tablelength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count-1
end
-- Mark all RAWs red that are lacking their corresponding JPG and vice
versa
-- We do this by checking the items in the group.
-- Since we assume that this script is called directly after importing and
we want to find the images that are lacking their counterpart (a.NEF but
not a.JPG and vice versa) we can get them by looking at the group size.
If this is 1 its clear that the counterpart is missing.
local function mark_isolated_files_red()
local images = dt.gui.action_images
-- check if there are selected images
if next(images) == nil then
dt.print("no images selected")
return true
end
for _,v in pairs(images) do
local members = v:get_group_members()
-- check if the group size is 1
if tablelength(members) == 1 then
for _, m in ipairs(members) do
m.red = true
end
end
end
end
dt.register_event("shortcut",function(event, shortcut)
mark_isolated_files_red()
end, "Mark all RAWs red that are lacking their corresponding JPG and vice
versa")
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua
--- SCHNAPP ---
Post by FKHi Dave,
I had a related problem once (see
). For me the solution was a LUA script I posted on thist list (think I
It brings the JPG-Version of an Image to the front of the
(RAW+JPG)-group stack, as the default order ist RAW front, JPG to the back.
Maybe you can adapt it to check for pairs and the select the JPG or the
RAWs - then you can execute the script via a hotkey, see the result in
lighttable (the selection) and then delete as needed.
Hope that helps,
Regards,
Felix
Post by Coding DaveHi,
I have a Nikon camera with 2 slots and set them to put JPG on one and
RAW on the other. This makes the camera only delete one or the other
when deleting from the camera itself, it looses track of the coupled
images.
Now I am looking for a way to remove the other one. So I would be
interested in a filter that shows all files which dont have both a
$FILENAME.NEF and a $FILENAME.JPG but only one of them.
Do you have an idea for helping me out here?
Kind regards
Dave
____________________________________________________________________________
Post by Coding Davedarktable user mailing list to unsubscribe send a mail to
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to