-
Notifications
You must be signed in to change notification settings - Fork 22
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
Sorting Folders by Dates in Titles #182
Comments
Hi @JSG-1 you example involves a series of tricky cases: 1. Sorting by folder datesIn Obsidian, folders don't come with date metadata (no creation date, no modification date). By design. This prevents any sorting based on folder creation/update dates. 2. Use dates in titles for sortingThe plugin supports part of the scenarios which you describe.
This works because the dates in format 'YYYY-MM-DD' can be treated as a dash-separated sequence of numbers An example snippet of sorting specification would be then: /+ \-D+ ...
/+ ... \-D+
> a-z The additional syntax At the same time, there is no support for infix matching-and-extraction of numbers. It is intentional. Overall, the plugin doesn't support free-form regexp matching against titles intentionally. It is easy to create a regexp introducing backtracking and kill the performance in result, blocking the Obsidian UI even for relatively small vaults. Matching of infix notation (e.g. dates anywhere in the title) is a good example of that. 3. Mixing of different sorting methods for a single-pass sortingThis is not supported, a far too advanced feature. You cannot specify: for a folder take the date from tile, and if there is no date in title, take the date from metadata. Not supported. RecapThere are three unsupported features:
Excluding these unsupported features, an example sorting spec could look like: sorting-spec: |
target-folder: /
/+ /folders \-D+ ...
/+ /folder ... \-D+
> a-z, > advanced created The resulting sorting would be:
|
Hi @SebastianMC Thank you so much for your detailed response and for taking the time to explain the plugin's capabilities and limitations. Your explanation has given me the clarity I need on how best to proceed, and I now have a much better understanding of how to configure my sorting rules effectively. I really appreciate your help and the work you’ve put into this amazing plugin. Best regards, |
Hi @SebastianMC,
Thank you for this incredible plugin! I’m having trouble configuring it to handle folders with dates in their titles and would appreciate your guidance. I also use the Folder Notes plugin, but I know your plugin supports it, so I suspect the issue is with my configuration.
Problem:
I have folders with dates in the format
YYYY-MM-DD
, which can appear anywhere in the folder name (start, middle, or end). I need to:What I’ve Tried:
regexp: \d{4}-\d{2}-\d{2}
to match folders with dates.> created
, but this doesn’t account for the dates embedded in folder names.Example:
Initial Structure:
Desired Output:
Is there a way to configure the plugin to sort by dates extracted from folder names while using Folder Notes?
Thank you for your time and help!
Best regards,
JSG
The text was updated successfully, but these errors were encountered: