mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Stacks: Configure regex option for StripSequence #1510
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @koutloup on GitHub (Jul 30, 2022).
I edited my photos with various tools over the years, many of them resulting in different suffixes on export. That means i have files like:
IMG_1234
IMG_1234-1
IMG_1234-2
or
IMG_1234
IMG_1234.1
IMG_1234.2
or
IMG_1234
IMG_1234_1
IMG_1234_2
or
IMG_1234.original
IMG_1234.export
or
IMG_1234
IMG_1234.copy
IMG_1234.copy 2
that i would like to have stacked, but don't get stacked.
The current implementation only strips:
The problem here is that there are many different ways to name your edited/exported files and trying to strip all possible sequences would result in unwanted stacks for many users.
One solution without changing the current stacking behavior, could be an config option to provide a regex for what gets stripped from the filename.
Current implementation looks like:
Changing it to
and providing
\.\d{5,}$| copy \d$| \(\d*\)$as exp would result it the same behavior.Summary
I would like to add/implement a PHOTOPRISM_STRIPSEQUENCE_REGEX config option that defaults to the current StripSequence implementation and use it in the StripSequence function, so users can provide there own regular expression and get images stacked that wouldn't get stacked with the current implementation.
somehow related to: #2241 #1122
@TenviLi commented on GitHub (Aug 7, 2022):
Wow, i also need this feature! 😆
For example, i have a directory structure like this:
Photoprism recently don't provide a feature like 'custom glob or regex patterns for StripSequence', so i cannot modify the behaviour of 'stacks automaticly recognition'.
If this feature supported, I don't need to rename the existing image files in batches by myself. It can save a lot of mechanical and repetitive work.
Just add a pattern configiration:
**/*/*_p[0-9]*(PS: I think the design of the album management tool should avoid changing the original directory structure as much as possible.)
Summary
I would like to add/implement a panel for 'custom glob or regex patterns for StripSequence' in settings UI.
Guys, what do you think?