Skip to content
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

File stat (e.g., mtime) timestamps #38

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

shtrom
Copy link

@shtrom shtrom commented Apr 26, 2023

This introduces a modular way to extract dates from files. This is useful to use the mtime stat instead of parsing the filename, as mentioned in #19.

The modularity is added by adding a Matcher object, an implementation that use the Filename, and another that uses the Stat information

@shtrom shtrom changed the title Unix File timestamps File stat (e.g., mtime) timestamps Apr 27, 2023
@shtrom shtrom force-pushed the file-timestamps branch from 08e7c63 to b96c455 Compare May 29, 2023 10:45
@shtrom shtrom force-pushed the file-timestamps branch from b96c455 to 6a0e203 Compare May 29, 2023 12:55
@shtrom shtrom force-pushed the file-timestamps branch from 156c4e0 to 86ae79d Compare May 31, 2023 14:11
@shtrom shtrom force-pushed the file-timestamps branch from 86ae79d to 4b27e70 Compare June 1, 2023 11:19
@shtrom shtrom marked this pull request as ready for review June 1, 2023 11:20
@shtrom
Copy link
Author

shtrom commented Jun 1, 2023

@xolox Ok, this PR is good to go. Care to take a look?

Essentially, this adds a --stat-timestamp argument that uses the mtime of the file instead of trying to extract the date from the filename. To do so, I split out the date-extraction logic into a generic interface, so this potentially paves the way to other ways to get the date out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant