Discussion:
[darktable-user] Lighttable filter
Coding Dave
2018-11-21 09:13:28 UTC
Permalink
Hi,

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
Matej Martinovic
2018-11-21 09:37:58 UTC
Permalink
Hey Dave,

try using the filename filter in combination with the G in the upper
right corner in lighttable.

BR
Matej
Hi,
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
Coding Dave
2018-11-21 12:13:43 UTC
Permalink
Did you try your solution?

The G groups JPGs and Raws together. So imagine I have A.JPG, A.RAW, B.JPG,
C.RAW, D.JPG, D.RAW I will see 4 images if I turn G on and 6 if I turn it
off. However, having G on does not help me remove B and C because it also
shows A and D.
What I am looking for is a way to filter the images s.t. I see only B.JPG
and C.RAW because there is no corresponding second image.

If I missed something, please update me on your thoughts.

Kind regards
/Dave

Am Mi., 21. Nov. 2018 um 10:38 Uhr schrieb Matej Martinovic <
Post by Matej Martinovic
Hey Dave,
try using the filename filter in combination with the G in the upper
right corner in lighttable.
BR
Matej
Am Mi., 21. Nov. 2018 um 10:14 Uhr schrieb Coding Dave <
Post by Coding Dave
Hi,
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.
Post by Coding Dave
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.
Post by Coding Dave
Do you have an idea for helping me out here?
Kind regards
Dave
____________________________________________________________________________
darktable user mailing list to unsubscribe send a mail to
Matej Martinovic
2018-11-26 07:11:47 UTC
Permalink
Post by Coding Dave
Did you try your solution?
Sorry for the late reply.
Yes, it's how I've filtered for jpegs with/without corresponding raws
in the past. As you've stated, it won't help if you want to show B.JPG
*AND* C.RAW. I've misread that in your OP.

BR
Matej
Post by Coding Dave
Did you try your solution?
The G groups JPGs and Raws together. So imagine I have A.JPG, A.RAW, B.JPG, C.RAW, D.JPG, D.RAW I will see 4 images if I turn G on and 6 if I turn it off. However, having G on does not help me remove B and C because it also shows A and D.
What I am looking for is a way to filter the images s.t. I see only B.JPG and C.RAW because there is no corresponding second image.
If I missed something, please update me on your thoughts.
Kind regards
/Dave
Post by Matej Martinovic
Hey Dave,
try using the filename filter in combination with the G in the upper
right corner in lighttable.
BR
Matej
Hi,
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
Coding Dave
2018-11-26 23:26:10 UTC
Permalink
Ah okay, now you can use the script and as a result you will find your
single images (corresponding one missing) marked red. That makes it very
easy to revoke after review.

Kind regards
David
Post by Matej Martinovic
Post by Coding Dave
Did you try your solution?
Sorry for the late reply.
Yes, it's how I've filtered for jpegs with/without corresponding raws
in the past. As you've stated, it won't help if you want to show B.JPG
*AND* C.RAW. I've misread that in your OP.
BR
Matej
Am Mi., 21. Nov. 2018 um 13:15 Uhr schrieb Coding Dave <
Post by Coding Dave
Did you try your solution?
The G groups JPGs and Raws together. So imagine I have A.JPG, A.RAW,
B.JPG, C.RAW, D.JPG, D.RAW I will see 4 images if I turn G on and 6 if I
turn it off. However, having G on does not help me remove B and C because
it also shows A and D.
Post by Coding Dave
What I am looking for is a way to filter the images s.t. I see only
B.JPG and C.RAW because there is no corresponding second image.
Post by Coding Dave
If I missed something, please update me on your thoughts.
Kind regards
/Dave
Am Mi., 21. Nov. 2018 um 10:38 Uhr schrieb Matej Martinovic <
Post by Matej Martinovic
Hey Dave,
try using the filename filter in combination with the G in the upper
right corner in lighttable.
BR
Matej
Am Mi., 21. Nov. 2018 um 10:14 Uhr schrieb Coding Dave <
Post by Coding Dave
Hi,
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.
Post by Coding Dave
Post by Matej Martinovic
Post by Coding Dave
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.
Post by Coding Dave
Post by Matej Martinovic
Post by Coding Dave
Do you have an idea for helping me out here?
Kind regards
Dave
____________________________________________________________________________
darktable user mailing list to unsubscribe send a mail to
____________________________________________________________________________
darktable user mailing list to unsubscribe send a mail to
Patrick Shanahan
2018-11-21 12:53:09 UTC
Permalink
Post by Coding Dave
Hi,
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?
a simple bash script or maybe someone has written an LUA script,
https://github.com/darktable-org/lua-scripts
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Registered Linux User #207535 @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode
Remco Viëtor
2018-11-21 13:17:56 UTC
Permalink
Post by Coding Dave
Hi,
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?
For me that's the kind of thing to do through a shell script, before import
into darktable:
import all files from the cards into a directory,
run a script that removes the unwanted (orphaned) files
(for each .NEF: if no corresponding JPG exists, remove .NEF;
for each .JPG: if no corresponding .NEF exists, remove .JPG;),
import the directory into darktable.
Of course, this requires a certain discipline when importing your files, in
that the relative paths from NEF to JPG should stay the same.

That said, I use a combination of Digikam (sorting, tagging and adding
captions and titles) and Darktable (global editing), sometimes Gimp (detailed
editing, e.g. wire removal).

On a side note, I've heard it said that it's better not to remove individual
files due to the nature of the card memory. Best seems to be to just fill up the
card, and remove all files after transfer (and backup) through an in-camera
format of the card.

Remco
Coding Dave
2018-11-23 17:25:12 UTC
Permalink
Hi,

sure, I can write some script and do some filtering on filenames and
forward it to the non-revocable rm -rf $files - but this is very dangerous
and error prone.
It would be nice to have a visual feedback of the picked items and to be
able to work on them with reject/0 stars like we always do in darktable.
Darktable has powerful filtering tools based on tags, properties, file
types, etc. I was wondering maybe I just did not yet spot the property that
I can use for easily achieving my goal.

Kind regads
Dave

Am Mi., 21. Nov. 2018 um 14:28 Uhr schrieb Remco Viëtor <
Post by Remco Viëtor
Post by Coding Dave
Hi,
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?
For me that's the kind of thing to do through a shell script, before import
import all files from the cards into a directory,
run a script that removes the unwanted (orphaned) files
(for each .NEF: if no corresponding JPG exists, remove .NEF;
for each .JPG: if no corresponding .NEF exists, remove .JPG;),
import the directory into darktable.
Of course, this requires a certain discipline when importing your files, in
that the relative paths from NEF to JPG should stay the same.
That said, I use a combination of Digikam (sorting, tagging and adding
captions and titles) and Darktable (global editing), sometimes Gimp (detailed
editing, e.g. wire removal).
On a side note, I've heard it said that it's better not to remove individual
files due to the nature of the card memory. Best seems to be to just fill up the
card, and remove all files after transfer (and backup) through an in-camera
format of the card.
Remco
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to
Patrick Shanahan
2018-11-23 17:42:17 UTC
Permalink
Post by Coding Dave
Hi,
sure, I can write some script and do some filtering on filenames and
forward it to the non-revocable rm -rf $files - but this is very dangerous
and error prone.
It would be nice to have a visual feedback of the picked items and to be
able to work on them with reject/0 stars like we always do in darktable.
Darktable has powerful filtering tools based on tags, properties, file
types, etc. I was wondering maybe I just did not yet spot the property that
I can use for easily achieving my goal.
Kind regads
Dave
Am Mi., 21. Nov. 2018 um 14:28 Uhr schrieb Remco Viëtor <
Post by Remco Viëtor
Post by Coding Dave
Hi,
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?
For me that's the kind of thing to do through a shell script, before import
import all files from the cards into a directory,
run a script that removes the unwanted (orphaned) files
(for each .NEF: if no corresponding JPG exists, remove .NEF;
for each .JPG: if no corresponding .NEF exists, remove .JPG;),
import the directory into darktable.
Of course, this requires a certain discipline when importing your files, in
that the relative paths from NEF to JPG should stay the same.
That said, I use a combination of Digikam (sorting, tagging and adding
captions and titles) and Darktable (global editing), sometimes Gimp (detailed
editing, e.g. wire removal).
On a side note, I've heard it said that it's better not to remove individual
files due to the nature of the card memory. Best seems to be to just fill up the
card, and remove all files after transfer (and backup) through an in-camera
format of the card.
Remco
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to
____________________________________________________________________________
darktable user mailing list
the script would only be dangerous if you failed to provide proper checks
within. you do not have to delete the files immediately, consider moving
them to another directory and then deleting the directory after
inspection. you are constrained only by yourself.
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Registered Linux User #207535 @ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode
FK
2018-11-24 09:52:46 UTC
Permalink
Hi Dave,

I had a related problem once (see
https://www.mail-archive.com/darktable-***@lists.darktable.org/msg04024.html
). For me the solution was a LUA script I posted on thist list (think I
didn't manage to upload it to the lua-scripts-repo):

https://www.mail-archive.com/darktable-***@lists.darktable.org/msg04055.html

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 Dave
Hi,
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
____________________________________________________________________________
darktable user mailing list to unsubscribe send a mail to
Coding Dave
2018-11-25 17:25:26 UTC
Permalink
---------- 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 FK
Hi 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 Dave
Hi,
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 Dave
darktable user mailing list to unsubscribe send a mail to
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to
FK
2018-11-28 12:24:39 UTC
Permalink
Glad I could help - that's what I like about open software too!!! :-)
Post by Coding Dave
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
Loading...