darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Addition to $(VERSION_IF_MULTI)

Open diefau opened this issue 1 year ago • 5 comments

I think it would be nice if this variable could start with one (or more?) character like a '.' or '_' (or parentheses around them?) to better distinguish them from the ones without a version.

diefau avatar Jan 18 '24 10:01 diefau

Do you mean the result of the variable substitution? In bash, one could modify the result with something like `$(VERSION_IF_MULTI/[0-9]/_&/). Perhaps that ability could be added to darktable's variable substitution code, since not everyone would agree on the best delimiter, or even whether there should be one.

ralfbrown avatar Jan 18 '24 16:01 ralfbrown

$(VERSION_IF_MULTI/[0-9]/_&/)

This is already supported, see:

https://docs.darktable.org/usermanual/4.6/en/special-topics/variables/#string-substitution

TurboGit avatar Jan 18 '24 16:01 TurboGit

Oh sorry, I didn't know of the string-substitution (RTFM;-) My intention was, when the original picture name is something like this "851_6327.jpg", then the name of the first duplicate should be like this "851_6327_1.jpg" (or "851_6327(1).jpg" . I think this will be doable with the string-substitution.

diefau avatar Jan 18 '24 16:01 diefau

I don't think the existing string substitution supports regular expressions, only fixed-string to fixed-string replacements, e.g. "IMG" to "". That's why I suggested adding that ability.

ralfbrown avatar Jan 18 '24 21:01 ralfbrown

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Mar 19 '24 00:03 github-actions[bot]

This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.

github-actions[bot] avatar Jan 13 '25 00:01 github-actions[bot]