Skip to content

Conversation

@SebastianMC
Copy link
Owner

@SebastianMC SebastianMC commented Nov 4, 2024

#171 support for extractors of metadata values to sort by (transformed) part of metadata value

A partially working version, not to be merged until completing the below:

Done (when opening this PR):

  • defined new syntax to allow for specification of metadata value extractor
    • !!! DOESN'T allow for spaces in metadata names
  • 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
  • extend the sorting engine to use the metadata extractor if it was specified

Remains to be done:

  • see how to extend the new syntax to allow spaces in metadata names
    • rather a blocker issue, if not fixed: so far spaces in metadata names were allowed
  • add error handling in parser for the new syntax
  • make the code production quality:
    • improve readability (e.g. now there are ...name1, ...name2, ...extractor1, ...extractor2, etc.)
    • refactor the structures, newly introduced, maybe the pre-existing which became overloaded
    • better naming
    • DRY
    • minimize the risk of regression bugs
  • create the required new unit tests for extended parser and sorting engine features

@SebastianMC SebastianMC merged commit de15f48 into master Jan 3, 2025
2 checks passed
@SebastianMC SebastianMC deleted the 171-poc-metadata-value-extractors-idea branch January 3, 2025 19:10
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.

2 participants