darktable-org / darktable-org/darktable
EXIF variables in metadata editor and date formatting function
@wpferguson is already working on this.
Since Jun 23, 2026.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is your feature request related to a problem? Please describe.
I use darktable for photojournalism. I'll go out and take a bunch of photos of, say, a protest, then go home and cull, edit, and tag them all with EXIF/IPTC metadata. Once that's done I ship them off to different organizations and stock photos sites. Each site has different format requirements for the metadata. Here's an example of the format required by Alamy:
$(CITY), $(COUNTRY) $(DATE)$(DATE_THINGY) $(THREE_CHAR_MONTH) $(YEAR). Actual description goes here. $(PHOTOGRAPHER_NAME)/Alamy Live News
San Francisco, USA. 20th Apr 2026. Some interesting things happened. Thomas Hunter II/Alamy Live News
I do use a metadata editor preset and the caption field looks like this:
San Francisco, USA. XXth YYY 202Z. TODO. Thomas Hunter II/Alamy Live News
But that means I need to manually edit the date each time I open the editor.
Describe the solution you'd like
I would like the ability to set any piece of exif metadata using any of the metadata editor fields. Using the standard exiv2 dot notation would be great for this. Further, I'd like the ability to use one of the standard date parsing syntax strings to be able to extract the date fields from the time of photograph. For example:
San Francisco, USA. $(DATE(Exif.Photo.DateTimeOriginal, 'do')) $(DATE(Exif.Photo.DateTimeOriginal, 'MMM')) \
$(DATE(Exif.Photo.DateTimeOriginal, 'YYYY')). TODO. $(Exif.Image.Artist)/Alamy Live News
(There are many libraries for formatting dates, I used date-fns as an example here.)
($(DATE(Exif.Photo.DateTimeOriginal, 'foo')) of course would be so common that it would probably make sense to instead have $(TAKEN_DATE('foo')) instead. It would be less powerful but easier to use.)
Alternatives
Currently I write a headline for a shoot, then copy and paste it into the lightroom / import / apply metadata fields, then go through and edit each one. And then when I need to export images for another service I then go back and edit each image and export again. It's a lot of work and results in images being mistagged.
There is of course other software that can be used (like digikam or photo mechanic (non-linux)) but doing everything in one piece of software is ideal.
I could see the date formatting function being difficult to implement. But that said some sites want 'Mar', some want 'March', etc.
Additional context
Here's how I've configured my metadata editor:
I also have metadata editor presets for the different news orgs. For example, here's the one I use for Alamy stock photos:
And here's one for a different org:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.