SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
302 stars 23 forks source link

Add the ability to set a custom sort-title or exclude specific strings/chars #80

Closed fischgeek closed 1 year ago

fischgeek commented 1 year ago

Is it possible with this to exclude a string or specific chars or just allow regex patterns to sort the list?

A quick example would be,

Or, even better, have it sort based on meta-data within the note with a sort-title key/value pair.

The Awesome Note.md
---
sort-title: 'awesome note'
---
SebastianMC commented 1 year ago

Hi @fischgeek

sorting by metadata value has been already supported as a result of feature request #23 Simple documentation of that feature is available in #23 and also in example 14 of advanced-manual

For the metadata from your example: sort-title: 'awesome note'

the simplest sorting specification to order by metadata in the root vault folder looks like:

---
sorting-spec: |
    target-folder: /
    < a-z by-metadata: sort-title
---

Entries in root folder not having the sort-title metadata will land below these with the metadata. Grouping by metadata is also supported, if you want consciously handle the cases of different metadata fields and/or order items with and without metadata in the same folder.

For other questions in your message:

Let me know if you have more questions

fischgeek commented 1 year ago

Thanks so much for the detailed reply @SebastianMC! I'm going to try the meta-data sort right now!

fischgeek commented 1 year ago

The plugin won't install for me. Just fails with no reason.

SebastianMC commented 1 year ago

Please try now, the 1.8.2 version is correctly published on github. I messed up the version numbers in the relevant json files vs the release package content and tags.

fischgeek commented 1 year ago

Perfect! Thank you!