How to update a film roll?

DT 3.4.1 on opensuse leap 15.2

How can I update an existing film roll? I have both added and deleted some photos (outside of DT)

Thanks

You should not delete files outside darktable. You can now remove all pictures in darktable, and import the directory again. Existing changes will be re-applied based on the sidecars.

1 Like

I know, but it’s not possible since DT doesn’t any file rename and IMG_1234.CR2 or DSCF1234.RAF, doesn’t help me.

I have to do the rename operations outside of DT.

Thank you for the info

Rename first, import later.

I use this to rename files based on date:

exiv2 -r'%F_%H-%M-%S_:basename:' *

If there are already XMP files (because I forgot to rename the files before importing…):

exiv2 -g Exif.Photo.DateTimeDigitized *jpg|gawk '{print "mv", $1, $5 "-" $6 "_" $1, "; mv", $1 ".xmp", $5 "-" $6 "_" $1 ".xmp"}'|sed 's/:/-/g'|bash

(change the jpg to the correct extension)

Those commands format the file names as yyyy-MM-dd-hh-mm-ss_original_name.ext and yyyy-MM-dd-hh-mm-ss_original_name.ext.xmp.

Why?

I do this all the time and the only thing I at times run into are stray xmp and/or pp3 files.

My development test environment shares directories between RawTherapee and darktable (same is true for my separate stable test environment). I use both programs and the command line to rename, delete, move and copy files. Whatever is easiest at that time.

I do automatically run a (darktable) cleaner/purge script on a regular basis using the purge_from_cache and purge_non_existing_images tools. But that is good practise no matter what.

Never have I run into trouble doing this.

Right, it’s not a big deal, it’s just the skull icons. Still, the supported way is to manage imported files via darktable. Actually, I find it easier to pick the ‘film roll’ (I hate that term) in collect images, Ctrl+A to select them all, click Remove, and reimport. I build my darktable without Lua support.

The purge_non_existing_images.sh script that comes with darktable takes care of the skull(s) and possible currently unavailable messages and the purge_from_cache.sh script cleans the cache.

Both are database maintenance tools and, as stated before, it is advisable to run these every so often, even if you play by the (unwritten?) rules. They also can solve other issues (ever had a thumbnail show up as a different underlying image?).

These aren’t LUA scripts! They can be found here: /XYZ/darktable/share/darktable/tools/

[stasis] jacques ~ $ ls -l /opt/darktable/share/darktable/tools/
total 20
-rwxr-xr-x 1 root root 947 feb 3 14:36 common.sh
-rwxr-xr-x 1 root root 1564 feb 3 14:36 extract_wb_from_images.sh
-rwxr-xr-x 1 root root 4008 feb 3 14:36 purge_from_cache.sh
-rwxr-xr-x 1 root root 2896 feb 3 14:36 purge_non_existing_images.sh
-rwxr-xr-x 1 root root 2424 feb 3 14:36 purge_unused_tags.sh

Anyway: Doing it all from within darktable is the smart thing to do, but nothing is lost or breaks when you do not.

2 Likes

Follow-ups to the above discussion.

  1. What’s the difference between managing collections as a film roll vs. folder? Are there things you can do with a film roll that you can’t do with a folder and vice versa?

  2. In lighttable mode, I moved some images to a folder that I had not previously imported. The new folder shows up as a film roll, but only the images I moved are visible. The rest of the images in the folder are missing from lighttable. How do I fix this?

  1. Not much, apart from how they’re displayed. In folder view you can choose to view subfolder content as well. See the fine manual
  2. Import the folder.

Running Windows.

I have a folder I imported which does not have IMG_6333.CR2 ver 0 in it, just ver 1, IMG_6333_01.CR2.xmp. I don’t know how ver 0 was removed. I have used add to library, but that doesn’t bring it back. How do I get it back?

Can you still open the version 0 in the darkroom? That would mean the image is still in the database. And you could then rewrite the sidecar perhaps?

darkroom displays ver 1, no ver 0. I know I can copy ver 1 to make a ver 2, and then discard the history to get the equivalent of ver 0. I’m just puzzled over what happened to ver 0.

When I add to library, I see this:

image

which indicates that 6333 is an old picture, so there seems to be no way to re-import it.

I have three more images in that folder that don’t have a ver 0.

You didn’t duplicate and then remove v0? I have a lot of images like that, where v0 was an old (usually display-referred) edit and then I created a v1 (scene-referred) edit later and removed v0.

I don’t normally remove ver 0, so I don’t know what happened. I now think that as long as I can copy and start over with a ver 2, or later, I shouldn’t worry about it.

Yeah it’s just a number. I wouldn’t worry.