how can i filter - skull - not availbe in darktable 5.4.0?

i want to remove all pictures that are not existent from database.

thank you!

There is a lua script called select non existing. I don’t know the full in and outs of the script, but I just tested it on a collection and it seems to do the job but was very time consuming on my computer.

1 Like

Hi, you might have a look at this documentation page.

It worked perfectly for me.

1 Like

But do read that full manual page, there seem to be some peculiarities when you are under Windows.
(the script runs fine under Linux, as all required parts are normally installed already).

And, the lua script selects the non-existing images, it’ll be up to you to remove them (through “actions on selection” → “remove”).

1 Like

i activeted the lua script, restared darktable

but where is the script now to run?
i can not find it

Go to the “selection” module in the right sidebar.

1 Like


i found it, but it takes a very long time

1 Like

purge_non_existing_images.sh

do i have to download it from the git
copy it into /darktable/tools folder and execute the
purge_non_existing_images.bat ?

Sorry, I did not know your system is not Linux.

You’d better use the LUA script instead, I guess… Althoug there seems to be a solution for windows systems, I can’t help any further.

2 Likes

the purge_non_existing_images.sh script is not for windows11?

As you can read in the page I linked:

  1. For Windows systems, you will normally need the MSYS2 environment to be installed, as described in the instructions for building darktable in a Windows environment. If you installed darktable using the standard Windows installer package, the location of the script would normally be something like: C:\Program Files\darktable\share\darktable\tools\purge_non_existing_images.sh.

I can’t tell you more, I’m sorry.

No, it’s a Linux/MacOS solution

1 Like

I thought it was just my computer, but it took a really long time for me too. I would find it easier to select the skulls myself and remove them from the DB through the actions on selection module. I wouldn’t delete (trash) in case an image file gets deleted accidently. A skull might be because of an unsupported file type in which case delete would trash the file, so just removing from DB would be safest in my view.

How many images are in the collection that you are scanning, roughly?

EDIT: I looked at the script and it does a system call (talk to the operating system) for each image. There is a different way to solve it that requires only 1 system call if the current collection is all in one directory, or one for each different directory in the collection which should be orders of magnitude faster.

I had about 357 images and I could see a window flashing on and off constantly which suggested to me that each image was being investigated. It would have been a good time to go for a shower or make a coffee. For a large collection I could have gone out and done my grocery shopping. :slightly_smiling_face:

I wonder if it is possible for a filter to select skulls much like you do with rejected or star rated images. This could make the process straight forward and potentially faster, but I have no clue about the practicality of my suggestion.

That’s kind of what I did. I changed the script to get a directory listing of all the files (1 system call) and then I compare the image filenames against the list. Just finished it a couple of minutes ago, so I haven’t tested yet.

Just for reference though, on my system Linux with a fast SSD 1516 images took about 3 seconds with the current script.

EDIT: Just tested and the job line flashed, so it’s less than a second.

EDIT2 : Tested the old script on windows in a VM. 143 images took 18 seconds. The new script took 2 seconds of which 1+ was reading the filesystem. The good news is the most time consuming part of the script is reading the filesystem.

1 Like

Tested and merged so the next time you start darktable the scripts should update and you should have it.

4 Likes

Well that is service. I just tested in on my windows 11 system. I found a folder with 61 images that were all skulls. It took about 1 second per image to flash the job line and move on to the next image. However, I believe I have my DT database on my C drive and my photos on my second SSD drive on the computer. I presume this cross talk between drives could slow my system?

Still it is a great script and gives me time to freshen up my coffee or red wine.

It sounds like the scripts didn’t update. It should be much faster than that. Do you still see flashing windows?