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

Advanced sorting by metadata values ordered with custom 'lookup list' idea (a non alphabetical, non numerical, arbitrary list of labels) #195

Open
SebastianMC opened this issue Jan 31, 2025 · 3 comments
Assignees

Comments

@SebastianMC
Copy link
Owner

SebastianMC commented Jan 31, 2025

Parking the idea posted by @Chapien here in discussions.

[...] is it possible to manually sort by metadata, in an explicit order? I have a reading list, with a property called 'status' that can have three values: reading, unread, complete. I want to manually sort it so that those with the reading status are on top, then unread, then complete. However, I can only see how to sort with implicit (ie, by alphabetical order) instructions. Is there any way I can list a pre-defined order of priority? Ie hard define the order as "reading, unread, complete" based on the metadata value.

@SebastianMC SebastianMC self-assigned this Jan 31, 2025
@SebastianMC SebastianMC changed the title TBD Advanced sorting by metadata values ordered with custom 'lookup list' idea (a non alphabetical, non numerical, arbitrary list of labels) Jan 31, 2025
@Chapien
Copy link

Chapien commented Jan 31, 2025

Oh, then I'm guessing it's not yet possible. Glad it was a good idea though!! Thank you.

@SebastianMC
Copy link
Owner Author

@Chapien yup, not supported for now, as stated below your original question in discussions.

Yet, after sleeping on the idea it turned out that a simple implementation is at hand, a low hanging fruit.
I should have time to do it in two weeks from now, and the concept boils down to grouping items by the value of specified metadata (for now grouping can be driven by presence of specified metadata with any value).

---
sorting-spec: |
  with-metadata: status value-matching(reading)
    > modified 
  with-metadata: status value-matching(unread)
    > created
  with-metadata: status value-matching(complete)
    < a-z
---

@Chapien
Copy link

Chapien commented Feb 2, 2025

This looks great, looking forward to the update.

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

No branches or pull requests

2 participants