Bug 372713

Summary: Add options to unique modifier [patch]
Product: [Applications] digikam Reporter: Simon <freisim93>
Component: AdvancedRename-engineAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: 5.3.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to add some functionality to the unique modifier

Description Simon 2016-11-20 23:09:55 UTC
Created attachment 102351 [details]
Patch to add some functionality to the unique modifier

My aim was to replace my current bash script for renaming my pictures. My renaming scheme is:
*date*_*time**uniq*-*title*.*ext*
where the uniq modifier is an alphabetic character in case of naming conflicts. So I implemented an option to user alphabetic characters instead of numbers and to use a custom separator (or none at all in my case).
Unfortunately it turned out that there is one major problem with the entire advancedrename module: Renaming is done file by file, so a single renaming process can only be aware of already renamed files. Thus the first file that will be conflicting does not get the *uniq* attachment, e.g. two conflicting files are renamed:
   datetime-title.jpg
   datetime_1-title.jpg
while the desirable thing to happen would be
   datetime_1-title.jpg
   datetime_2-title.jpg
However I do not see how this could be easily achieved, so I will keep using my script. However this functionality might be useful to someone, so you might as well integrate it.
Comment 1 caulier.gilles 2020-08-02 13:09:41 UTC
Simon, Any feedback and plan to rebase the patch with master ?
Comment 2 caulier.gilles 2023-05-13 19:11:49 UTC
Maik, did you review this patch already ?

Gilles