Project

General

Profile

Feature #8507

Please add file rename functionality

Added by databeaver - over 6 years ago. Updated 2 months ago.

Status:
Triaged
Priority:
Low
Assignee:
-
Category:
Lighttable
Target version:
Start date:
Due date:
% Done:

20%

Affected Version:
git master branch
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

My workflow with photos is roughly as follows:

1. Get shots from camera
2. Prune any obvious failed shots (shaken camera, out of focus)
3. Compare shots of the same subject, selecting the best ones to keep
4. Go through all the shots, applying filters
5. Rename files according to date, serial number within that date and a short description
6. Export images for whatever purpose I need them for

Darktable can do everything but step 5. Currently I'm using a Python script to do the date/serial renaming and Geeqie to add descriptions. This works, but it requires me to reimport the files in darktable as the filenames change.

A hypothetical rename tool in darktable should have a configurable date/serial format and be able to automatically create per-day serials. The description should preferably be stored with the file metadata so it can easily be applied again if I decide to delete a shot late in the workflow and need to renumber the files. There should be a keyboard-only UI for entering descriptions (i.e. shortcuts for "next image" and "enter description") to avoid having to move my hands off the keyboard.

History

#1 Updated by Simon Spannagel almost 6 years ago

Hi,

you can create a preset for the export plugin featuring your rename desires - this will at least name the exported jpegs to your needs. darktable does and will not alter the RAW files for the data's sake I think.

Does that work for you?

#2 Updated by databeaver - almost 6 years ago

Unfortunately, that's not an adequate solution for me. I specifically want to have the RAW files renamed. Renaming a file does not alter its contents, so this should not be in conflict with the policy of not altering the data.

#3 Updated by Tobias Ellinghaus over 5 years ago

  • Status changed from New to Triaged
  • % Done changed from 0 to 20
  • Target version changed from --- to Future
  • Category changed from General to Lighttable

We already allow to copy/move images to different directories, renaming shouldn't be hard and fit dt's principles.

#4 Updated by Tony Teoh Melkild almost 5 years ago

Tobias Ellinghaus wrote:

We already allow to copy/move images to different directories, renaming shouldn't be hard and fit dt's principles.

Sounds good. Renaming based on EXIF information is a must-have for me. My typical workflow:
- Import
- Rename all images with <my name prefix>-<event/location name>_year-month-day_time

#5 Updated by Tony Teoh Melkild almost 5 years ago

And also, it needs to rename the accompanying XMP files ;-)

#6 Updated by bruno binet over 2 years ago

I'm also interested by this renaming feature (to use it in a lua script): what is its status 2 years later?

Also, what happen if I move an image with darktable.database.move_image to a destination path where an image of the same name exists? Is it overwritten?

#7 Updated by bruno binet over 2 years ago

I've just seen that the destination file won't be overwritten, and the move is aborted:
http://www.darktable.org/usermanual/ch02s03s06.html.php#d0e2324

In this case, it would be great to be able to set a new name when moving an image (or have another API method to rename an image) so that we can move files around.

#8 Updated by Karsten Salewski about 2 years ago

Hi Guys,

this seems to be a fairly old feature request. However, I want to second the author. I have pretty much the same workflow. Today I have to perform the renaming task with krename and import the renamed files to datable. Additionally I have to purge the old files, because they don't exist anymore to darktable after they've been renamed.
Pretty complicated for my taste.

Would be great, if this feature could make it on the shortlist ;-)

Best regards,

Karsten

#9 Updated by Kael Shipman 6 months ago

Hey all,

I've also been wanting this feature, and have been wanting to get my feet wet in Darktable Development. I'm going to try to take it on, but am pretty busy myself, so am setting a long deadline for it (like October 2017).

Here's my proposal:

We should handle this by changing the "move" button under "selected images" to "move/rename". When this button is clicked, instead of popping up an FS directory finder dialog, it should pop up a dialog that provides you the same path input field that the "export selected" section offers, i.e., a text input field that accepts a number of $(variables), plus a button that pops up the FS directory finder dialog.

This will allow us to reuse the code for the "export selected" section, and will also allow us to use the powerful EXIF variable substitution features built into that section.

The difference, however, will be that it will NOT export or copy the files it's operating on. Instead, it will rename them, including all associated XMP files.

If anyone sees any issues with this approach, please let me know.

Thanks,
Kael

#10 Updated by Kael Shipman 4 months ago

Ok all, I've finally started poking around on this. It's gonna take me longer than I had anticipated to come up to speed, but I'm optimistic. If anyone wants to take a peek at what I'm doing or offer suggestions, I'm working in a branch on my own fork of the repo at https://github.com/kael-shipman/darktable/tree/dev-rename-files-feature-8507.

Warning, though: I don't think I'll actually be making any commits for at least the next few weeks. Lots to figure out first....

#11 Updated by Federico Bruni 2 months ago

I've stumbled again on this.
Just for the records, the rename functionality is particularly useful when you want to rename some images you've already developed in darktable and you want to preserve the XMP file with all that information.

The dumb and dirty solution (which works with few images) is:

- remove images from darktable database
- rename image and XMP file in your file manager
- update the `xmpMM:DerivedFrom="NAME.EXT"` tag in the XMP file
- import again the images with a new name

I used a python script posted on the user list in the past, but I cannot find it anymore.

I look forward to Kael's work!

#12 Updated by Tobias Ellinghaus 2 months ago

  • bitness set to 64-bit
  • Affected Version set to git master branch
  • System set to all

No need to edit the XMP files, darktable never reads that field. It's just there for you and to have the info in exported JPEGs.

#13 Updated by Kael Shipman 2 months ago

Sorry for the delays all. I remain optimistic about doing this, but I've hardly been able to so much as breathe outside of work for the last 2 months! It's been a crazy fall.... Anyway, I'll understand if someone slides in and gets it done first. Otherwise, I'll keep it on my todo list for "someday soon".

Also available in: Atom PDF