Summary: | Batch rename limited, should allow renaming by patterns | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Gregor Hoffleit <flight> |
Component: | AdvancedRename-file | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: | |||
Attachments: |
Patch for extra renaming options (for version 0.1.4)
Screenshot of patched rename plugin Update patch for extra renaming options |
Description
Gregor Hoffleit
2006-08-25 18:42:54 UTC
Created attachment 21869 [details]
Patch for extra renaming options (for version 0.1.4)
I've made this patch to extend limited rename capabilities of this plugin.
When extra check box is checked follwing happens:
* neither extension nor number is added by default
* one can use following extra symbols in Date format:
[e] - extension as is
[e-] - extension lower case
[e+] extension upper case
[i] - sequence number - no leading zeros
[i:4] - sequence number in 4 digit with leading zeros format
[n] - original file name
[n+] - original file name upper case
[n-] - original file name lower case
[n:5..-2] - substring of original filename from char 5 to second from the end
(either 5 or -2 can be empty which means from beginning or to the end, both
star and stop numbers can be positive (from begining) or negative (from end)
also + or - can be used after n)
Also polish translation of new check label is provided.
This patch does not bring the power of krename to kipi but is powerful enough
form most cases. There is screen shot provided in next attachment.
Created attachment 21870 [details]
Screenshot of patched rename plugin
Just a sample of renaming options - part of original name used, arbitrary
formated counter and lowercase extension mixed with date formating.
Piotr
Created attachment 21893 [details]
Update patch for extra renaming options
I didn't realize that there is "complete" extension and "complete" baseName.
So now I allow all of these in extra tags, which additionally all have the same
syntax which match following examples:
[a] - album name
[p+] - absolute path (uppercase)
[e] - extension (small one - after last '.')
[B:4..-2] - base name (big one - all before last ',', from 4-th to one before
last characters)
[n+:..5] - whole name (base + extension, characters from 1 to 5)
[b-:-3..] - base name (small one - all before first '.', last 3 characters)
well, I like it and would suggest something like this for us with a bad memory: --- renameimageswidget.cpp.old 2007-10-22 14:04:35.000000000 +0200 +++ renameimageswidget.cpp 2007-10-22 14:08:28.000000000 +0200 @@ -41,6 +41,7 @@ #include <qpopupmenu.h> #include <qregexp.h> #include <qdir.h> +#include <qtooltip.h> #include <libkipi/interface.h> #include <libkipi/imageinfo.h> @@ -94,6 +95,21 @@ SLOT(slotOptionsChanged())); connect(m_addFileNameCheck, SIGNAL(toggled(bool)), SLOT(slotOptionsChanged())); + QToolTip::add(m_useExtraSymbolsCheck, + "[e] - extension (small one - after last '.')\n" + "[e-] - extension lower case\n" + "[e+] extension upper case\n" + "[i] - sequence number - no leading zeros\n" + "[i:4] - sequence number in 4 digit with leading zeros format\n" + "[n] - original file name\n" + "[n+] - original file name upper case\n" + "[n-] - original file name lower case\n" + "[n:5..-2] - substring of original filename from char 5 to second from the end\n" + "[n+:..5] - whole name (base + extension, characters from 1 to 5)\n" + "[a] - album name\n" + "[p+] - absolute path (uppercase)\n" + "[B:4..-2] - base name (big one - all before last ',', from 4-th to one before last characters)\n" + "[b-:-3..] - base name (small one - all before first '.', last 3 characters)"); connect(m_useExtraSymbolsCheck, SIGNAL(toggled(bool)), SLOT(slotOptionsChanged())); connect(m_addFileDateCheck, SIGNAL(toggled(bool)), There is a patch to test here... Somebody can check it ? Gilles Caulier SVN commit 895529 by gateau: Applied patches from Piotr Tarnowski and tomas to provide more formating options to the batch renamer. BUG:132982 M +9 -1 renameimagesbase.ui M +109 -15 renameimageswidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=895529 |