Bug ID: 318357
Summary: regexp based image grouping
Component: Albums GUI
Assignee: [hidden email] Reporter: [hidden email]
It seems that one can already group images together in digikam, but this
happens only manually (e.g. selecting them and then tell it to group them).
What I'd like to see is regular expression (ideally PCRE) based grouping rules.
Perhaps even on a per folder basis (maybe with subfolders inheriting the rules
from parent folders, if none are explicitly set or cleared).
WIth that one could easily do things like:
a) Group images:
b) a) Group images:
but no others
c) Group images:
d) mightier things like, group
which I'd find handy cause I use about the following system:
The base image (typically the raw) is called after it's SHA1, e.g.
images derived from it (e.g. JPEGs) have some string attached
Now two problems come up.
1) Obviously we can't write "foo" in the regexps to mark the characters that
should be identical on all grouped images.
I would probably solve this by adding a field, which of the subpatterns (i.e.
the stuff in "(...)" ) needs to be identical.
This way one could e.g. write:
To tell, for a file to be grouped, subpattern 1 must be identical and apart
from that any file ending with a dot . and jpeg, jpg or raw.
Or my example above with the hashsums:
To tell, for a file to be grouped, subpattern 1 must be identical, and either
followed by a dash - and one or more arbitrary characters (or by nothing)...
and then followed by a dot . and followed by some extensions.
2) There need to be a way to select the "primary" image, i.e. those which is
opened to be viewed, or from which tumbnails are created, etc.
Either one could do this by another regexp and/or by file flags like "most
Of course all that would be quite a complex system, on the other hand I think
it would be worth it, as it allows for very mighty grouping mechanisms to be
--- Comment #6 from Christoph Anton Mitterer <[hidden email]> ---
I think you really should consider to make this per-directory configurable...
like I proposed by storing it in a .digikam file or so,... or perhaps also via
XATTRs (XATTRs alone are not enough, since these are not usable in all cases).
And one should probably make such setting _optionally_ inheritable to
subdirectories (unless another .digikam file overrides again.
Also, I think (2) form above is not possible right now, right?
What |Removed |Added
Attachment #86614|remerged patch |Implement "group by regex"
description| |menu item and configuration
| |dialogue Boost-regex is
| |used in favour of Qregex
| |since Boost features real
| |PCRE syntax (including
| |greedy/non-greedy selection
| |that doesn't need to be
| |hardcoded into the
What |Removed |Added
CC| |[hidden email]
--- Comment #9 from Jasper <[hidden email]> ---
The patch cannot work against dk git as albumsettings.cpp does not exist (for
example). Any chance of an updated patch, or better, inclusion in digikam?
Implement "group by regex" menu item and configuration dialogue Boost-regex is
used in favour of Qregex since Boost features real PCRE syntax (including
greedy/non-greedy selection that doesn't need to be hardcoded into the
--- Comment #11 from Jasper <[hidden email]> ---
Thanks for the patch.
I am a regex NooB, so not sure if the failure to group images is due to my
lack of understanding, or digikam being buggy atm (<1 min unresponsive..).
to group jpg and raw together. But no change 8(
My asumption was that having selected a whole bunch of images the jpg's and
the cr2's would be grouped.
Also tried one from the history... no change (not suprised there 8)
This is an essential feature IMHO if _only_ to group jpg and raw, not to
mention what else you must be able to do! What do we need to do to help support
this becoming part of mainline as a user?
--- Comment #15 from Gilles Caulier <[hidden email]> ---
As i don't recieve a reponse from your post on mailing list, i CC my message in
this file :
As i already said, I'm not favorable to include Regular Expression
rules in digiKam GUI. It's not users friendly. Using RegEx in source code is
not a problem of course.
For the rest of features, there is no problem...
digiKam for KDE4 is frozen for new features (git/master). Only bugfixes will be
introduced in this code. This want mean that patch must be adapted to
"frameworks" git branch, where new features are introduced. Details about
digiKam for KF5 can be found here :
--- Comment #16 from Christoph Anton Mitterer <[hidden email]> ---
(In reply to Gilles Caulier from comment #15)
> As i don't recieve a reponse from your post on mailing list, i CC my message
> in this file :
Whom do you mean?
> As i already said, I'm not favorable to include Regular Expression
> rules in digiKam GUI. It's not users friendly.
I don't really see any problem... one can either disable the feature per
default or provide a default which will work for many users (e.g. to group same
name with different .ext).
Since digikam strives to be a professional photo management/collection
software, I think a feature like the regexp-based grouping is really important
(since all pros have their pics usually in different "versions".
> Using RegEx in source code is
> not a problem of course.
Which makes the whole thing basically uninteresting, when it's a) just a patch
never merged (and thus never gets into distros) or b) there is just one set of
rules (which like doesn't fit what one wants.