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

Organize by date in metadata #171

Open
LeslyeCream opened this issue Oct 31, 2024 · 1 comment
Open

Organize by date in metadata #171

LeslyeCream opened this issue Oct 31, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@LeslyeCream
Copy link

I would like to organize my files by creation date in the metadata, but the problem is that they all have the following format: Created at: 03/05/2019 | 22:00

I have searched all the documentation but I can't find anything that helps me (maybe regex(?) to get it.

Any idea if it would be possible? Maybe I'm missing something.

SebastianMC added a commit that referenced this issue Nov 3, 2024
…tors. At a glance a low hanging fruit turned out to be far too complex to be worth it.
@SebastianMC SebastianMC self-assigned this Nov 3, 2024
@SebastianMC SebastianMC added on hold Paused - will be resumed or cancelled. improvement labels Nov 3, 2024
SebastianMC added a commit that referenced this issue Nov 3, 2024
@SebastianMC
Copy link
Owner

Hi @LeslyeCream,

this feature is not supported.
For sorting, the metadata values are used directly, as they exist in notes, no transformation or extraction can be done.

At the same time this looks like a good candidate for an improvement and at glance a low hanging fruit.
Yet, after spending some time on a PoC implementation (see the branch 171-poc-metadata-value-extractors-idea) it turned out to be far more complex.

Putting this on hold as a new feature request, time is the limit for me now.

The partial implementation in the branch 171-poc-metadata-value-extractors-idea contains:

  • defined new syntax to allow for specification of metadata value extractor
  • extended the sorting spec parser to detect and recognize the new syntax
  • defined two extractors (and their syntax) to support dd/mm/yyyy and mm/dd/yyyy date formats extraction
  • extended the data structures generated by the parser to carry the parsing result in a form ready to use by the sorting engine

The remaining implementation steps:

  • extend the sorting engine to use the metadata extractor if it was specified
  • make the code production quality: improve readability, better naming, DRY, minimize the risk of regression bugs
  • create the required new unit tests for extended parser and sorting engine features

I don't think that there is anyone brave enough to take the challenge of completing the implementation: the codebase is complex, the feature probably falls into category of rare edge cases, also the plugin in a niche software.

In other words it has to wait

@SebastianMC SebastianMC added enhancement New feature or request and removed improvement labels Nov 3, 2024
SebastianMC added a commit that referenced this issue Nov 4, 2024
…n, missing errors detection for new scenarios
SebastianMC added a commit that referenced this issue Nov 5, 2024
@SebastianMC SebastianMC removed the on hold Paused - will be resumed or cancelled. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants