-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow unixtime-style timestamp extraction #30
base: master
Are you sure you want to change the base?
Conversation
358b367
to
1060e30
Compare
7b6b962
to
e4dfae5
Compare
Are there plans to still merge this? |
We would also be interested in this feature. @xolox Is this repo still maintained? |
@@ -155,8 +155,9 @@ intended you have no right to complain ;-). | |||
usage of the ``-H``, ``--hourly`` option for details about ``COUNT``." | |||
"``-t``, ``--timestamp-pattern=PATTERN``","Customize the regular expression pattern that is used to match and extract | |||
timestamps from filenames. ``PATTERN`` is expected to be a Python compatible | |||
regular expression that must define the named capture groups 'year', | |||
'month' and 'day' and may define 'hour', 'minute' and 'second'." | |||
regular expression that must define a named capture group 'unixtime' or the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsommer can you provide better documentations or an example of how to use this new unixtime capture group? I had to read the test case to understand it. There is a section lower in the docs containing some Regex examples, Supported configuration options. That would be a good spot for more elaboration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a short example to the README file, hope that helps - otherwise this seems to be abandoned, since the original pull request was untouched for over a year :(
Some backup solutions prefer using UNIX timestamps for tagging backup files or directories. In order to enable the rotation of such files/directories some extra handling is added to enable scanning for UNIX timestamps in file- or directory-names.
e4dfae5
to
d775f3c
Compare
I assume you've worked around this, after all this time, but I published a docker image (here) of my fork (here), which includes your PR. I am not planning to maintain anything in pypi as it's outside my use case, but hopefully this is useful to someone. https://hub.docker.com/repository/docker/aroberts/rotate-backups |
Some backup solutions prefer using UNIX timestamps for tagging backup files or directories. In order to enable the rotation of such files/directories some extra handling is added to enable scanning for UNIX timestamps in file- or directory-names.