Variables work for thumbnail overlay/tooltip but don't work for import naming pattern

As @paperdigits tipped me in this topic: Purge/clear "collections"/"picture database" on exit. Any method? - #25 by Igor64 I decided to use automated exif-based file renaming while copying from camera/card reader. And found that Rapid photo downloader can’t rename to YYYY.MM.DD (dot-separated as I use), but DT can do it without scripting. (and thus making “import” tool at least partially usable for me). Keeping a library in DT’s manner still isn’t my goal, but having nicely and precisely renamed files should help much.

So I have set:
Setup > Import > naming path:
$(EXIF_YEAR).$(EXIF_MONTH).$(EXIF_DAY)_$(EXIF_FOCAL_LENGTH)mm_f$(EXIF_APERTURE)_ISO$(EXIF_ISO)_$(FILE_NAME).$(FILE_EXTENSION)

And I get fi les named like:
2020.08.29_0mm_f0.0_ISO100_P1234567.RW2

It looks like import tool can’t use some variables. Or can’t interprete them. It reads $(EXIF_APERTURE) but saves 0.0 value to filename, while lighttable reads the same $(EXIF_APERTURE) and shows f/5.6 in overlays and in tooltips.

Both Setup > Lighttable > pattern for thumbnail overlay: $(FILE_NAME).$(FILE_EXTENSION)$(NL)$(EXIF_EXPOSURE) • f/$(EXIF_APERTURE) • $(EXIF_FOCAL_LENGTH)mm • $(EXIF_ISO) ISO $(SIDECAR_TXT)
and Setup > Lighttable > pattern for thumbnail tooltip: <b>$(FILE_NAME).$(FILE_EXTENSION)</b>$(NL)$(EXIF_DAY)/$(EXIF_MONTH)/$(EXIF_YEAR) $(EXIF_HOUR):$(EXIF_MINUTE):$(EXIF_SECOND)$(NL)$(EXIF_EXPOSURE) • f/$(EXIF_APERTURE) • $(EXIF_FOCAL_LENGTH) mm • $(EXIF_ISO) ISO

work like intended

So there are two options:

  1. it’s a bug and i have to rename files using exivtool
  2. I don’t understand something in variables using by DT.

DT 3.2.1. on Linux Mint 19.3

You might want to have a look at this:

https://github.com/darktable-org/darktable/issues/5561

TL;DR: the forward slash (/) is special and cannot be used in file/directory/folder names. On-screen wouldn’t be a problem though.

Yes, i saw that '$(EXIF_EXPOSURE)" gives values like ‘1/500’ (containing slash) and didn’t even try to use it for file naming.

Problem is with $(EXIF_FOCAL_LENGTH)' and '$(EXIF_APERTURE):

‘$(EXIF_APRETURE)’ gives values like ‘5.6’ not ‘f/5.6’. So ‘5.6’ string should be fully usable in file name.

`$(EXIF_FOCAL_LENGTH)’ gives values like ‘180’. Also fully usable in file name.

But import tool saves both strings as ‘0.0’ and ‘0’.