GithubHelp home page GithubHelp logo

sebastianmc / obsidian-custom-sort Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obsidianmd/obsidian-sample-plugin

243.0 243.0 19.0 1022 KB

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian

License: GNU General Public License v3.0

JavaScript 0.37% TypeScript 99.62% CSS 0.01%

obsidian-custom-sort's People

Contributors

aidenlx avatar aleksey-rowan avatar andreisager avatar chrisgrieser avatar clemens-e avatar edo78 avatar ericaxu avatar fyears avatar gitmurf avatar henrebotha avatar inouetakuya avatar joethei avatar kostapc avatar lishid avatar phibr0 avatar pozdneev avatar reorx avatar sebastianmc avatar skvale avatar taurelas avatar tfthacker avatar timrogers avatar tokuhirom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obsidian-custom-sort's Issues

[Feature Request] Hiding files/Folders

I'm not sure if this fits this plugin or not.

I have a pesky Context folder that is being generated by something, maybe DB Folder and I thought this plugin would probably have a hide feature. It doesn't appear to, so here's a suggestion!

This plugin has such a great approach to tweaking the file explorer view, which is at this point our main vault navigation so perhaps it might be a nice feature addition.

Off the top of my head, an entry in sortspec like !Foldername would just hide it.

Thanks again for a great plugin.

Phil

Disable notification option

Awesome plugin - thank you.

Possible to enable option to stop notification of "custom sort success" when opening Obsidian?

Cheers,
Jamie

API-based integration with `obsidian-icon-folder` plugin

Under #60 the basic integration with obsidian-icon-folder plugin was introduced.
The connection between the plugins is based on direct access to internal data of the obsidian-icon-folder plugin. That's a reason why the integration is limited: only icons configured directly on folders and files are considered, ignoring the inherited or regexp-applied icons. Also, such kind of integration introduces a tight-coupling: if the obsidian-icon-folder plugin changes its internal data structures, the integration will no longer work.

To address this long term an explicit request to the author of obsidian-icon-folder was supplied:

If the above ticket is completed, the integration can be switched to be API-based, and in result:

  • handle all methods of applying icon to folders and notes
  • be shielded from changes of implementation of obsidian-icon-folder

Feature request: alphabetic wildcard

I like to organize my notes like books, with separate groups for front matter, main text, and back matter:

i. Foreword
ii. Preface
iii. Introduction
1. First main section
2. Second section
3. Third section
A. First appendix
B. Second appendix
Attachments
Diagrams
Etc.

I'm currently using a sortspec with these patterns:

\R+. ...
\d+. ...
App. ...
%

I would prefer to replace the App. ... with \a+. ... so that I can shorten those to a single-letter abbreviation like the Roman & Arabic numerals.

[Feature request] Possible to prioritize starred items?

Starred core plugin allows to "star" a note.

I'm looking for a plugin that allows me to sort by > advanced created but placing starred notes first (a folder considered starred if a note inside is starred).

Would that be possible with this plugin?

How to apply different sortspec to folders and notes?

Apologies for the dumb question. I want my subfolders to be sorted alphabetically, but all notes to be sorted by creation date. is this possible without specifically naming the subfolders in the yaml? I often change my subfolder structure, so it would be nice if I didn't have to specify the note sorting rule manually.

Asses the complexity of adding support for two levels (or multi-level) sorting

The issue #85 requires the two levels sorting.
Investigate the complexity of adding such capability.

What syntax? Using indentation (nesting) seems tempting:

  // indentation-based multi-level sorting syntax (potential)
  target-folder: Journal
  > a-z by-metadata: date
    < a-z by-metadata: time

yet this is already used to distinguish between folder-level sorting and group-level sorting. Road closed in this direction.
Also, indentation turned out to be troublesome for copy & paste of sorting spec from a web page (e.g. documentation on github) or from email. Another reason to avoid this direction.

The other (and safer) option is to involve the comma-separated list of sorting levels:

  // comma-separated notation for multi-level sorting
  target-folder: Journal
  > a-z by-metadata: date, < a-z by-metadata: time

Before implementing this capability assess the complexity, if it is not an overkill

Take into account the existing cumbersome syntax for multi-level alike sorting:

  < a-z, created

If implementing the straight explicit multi-level sorting seems to be too complex (to be worth it), some simpler options do exist, more specific, less generic:

  • extension of the with-metadata: syntax to allow sorting specification at group level
    • technically this would generate the group identifier on-the-fly (instead of the simple number assignment) and grouping would be done based on that dynamic identifier. In result, the sorting order specification would act as a second-level sorting
  • generation of a compound sort-string on the fly, based on two or more metadata values, with assumption that they are numbers or dates (in number-sortable format) plus the ability to use a minus - to indicate the descending order (which is natural for negative numbers)
    • the syntax in this example could look like numeric by-metadata: -date, time

Advanced sorting by creation date doesn't work correctly

Originally posted by @imeed166 in #71 (comment)

I'm actually using < advanced created to sort the folders that were created earlier at the top.

I have a folder that already has a markdown file in it. When I create another markdown file in it, the folder moves to the bottom. Is this normal behaviour? Shouldn't the folder stay in the same place because the file I created is new and the sort should follow the oldest file in the folder like you said

Plugin Fails to Install

Fairly fresh vault in my Obsidian Sync setup.

  • Running Obsidian as administrator
  • Windows 11
  • Other plugins install no problem

image

EDIT: Dev Console doesn't seem to be much help either.

image

[Feature Request] Sorting Notes with specific Metadata Tag

Wondering if it would be possible to enhance the functionality of the plugin with the ability to sort notes in a folder with the help of a specific Metadata Tag?

Use Case:
If you are creating notes based on books I enter the the page number of the book within the metadata of the note.
Therefore it would be beneficial to have the option to sort the notes with that specific tag (e.g. Pages).

Feature: integration with the new core plugin 'Bookmarks' - incl. its drag & drop to allow config-less custom sorting

The 1.2.0 (insider) release of Obsidian introduces a new Bookmarks core plugin.
It is a much more more robust incarnation of the Starred core plugin, a replacement for the latter in the long perspective.
It allows to organise the bookmarked items (files, folders, headers and more) in a hierarchical fashion thanks to the concept of virtual bookmark groups.
Manipulation of the bookmarks hierarchy is done via drag & drop and - thanks to the separation of concerns - the drag & drop allows only reordering the items within the bookmarks collection, and it doesn't allow actually moving files between folders. Confusion between these two drag & drop modes eliminated by design.
The Bookmarks plugin exposes the collected bookmarks (e.g. for integration with other plugins) retaining their internal hierarchy!

This opens a whole new possibility to this Custom Sort plugin to allow sorting by indirect drag & drop in Bookmarks view!

Plugin integration phases:

  1. Expose a new bookmarked: keyword, an equivalent of the existing starred: keyword
  2. Introduce new (default) sorting within the bookmarked: items, which should reflect their relative order arranged by the user in the Bookmarks view
  3. Expose a new plugin setting Automatic integration with Bookmarks. It would work at global level without any need to create sortspec files or sorting specifications. An idea of on-the-fly sorting specification comprising only the bookmarked: keyword for each folder in the vault, if at least any item from the folder is bookmarked

[Feature Request] Allow Custom Sorting Specs inside plugin settings

Would be great for the plugin settings to allow the user to define the sorting options instead of needing a note. I wanted to at least hide the note using ".sortspec.md" but it won't read it if its hidden.

a plugin that allows this is called supercharged links https://github.com/mdelobelle/obsidian_supercharged_links

maybe the settings this plugin provides will inspire and make it easier to provide

This is a great plugin that a lot of people will love! thanks for your work

Update and install problem

Hi,

I tried to update (1.2 --> 1.3) your nice plugin with

image

but I get the message:

image

I wanted to start from scratch, so I deleted the plugin Folder and I removed the file sortspec.md

Now it is not possible to install it again. What can I do?

Allow for different folder note naming scheme

While giving the folder note the same name as the folder is certainly customary, another popular approach is specifying an index name (e.g. README.md or __about__.md) for folder notes.

Both xpgo's and aidenlx's very popular folder note plugins support this approach.

It would be nice, if Obsidian Custom Sort would also support this.

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

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,

  • sort alphabetical
  • ignore the string the

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'
---

[Feature request] Support for priorities of sorting rules

The two example sorting specs show the relevant edge cases:
Example A

---
sorting-spec: |
 /:files The exception
 /:files ...
---

Example B

---
sorting-spec: |
 /:files ...
 /:files The exception
---

The Example A pins the note named The exception to the top and all other notes (/:files ...) go below (sorted alphabetically by default)
The Example B seems to be symmetrical to A and should put the note named The exception to the bottom. The problem is that it doesn't work. It doesn't work because the matching rule /:files ... (match all files) is evaluated (against the note The exception) before the rule /:files The exception. In result the note The exception is captured by the earlier evaluated /:files ....

The solution idea is to add some syntax like in modern CSS, which gives priority for a sorting rule over their predecessors.
Something like:
Example B modified for the imaginary new feature

---
sorting-spec: |
 /:files ...
 /!!! /:files The exception
---

The prefix /!!! could mean: evaluate this rule against folders and files before other rules
For flexibility three levels of priorities could be introduced: /!, /!! and /!!!

Before implementation check if this edge-case feature fits the existing design of sorting engine and if it doesn't add too much hassle

Feature Request: Disable Status bar entry

Please make the 'Custom sort: ON/OFF' Status-Element configurable. In my setup i would like to hide it since my statusbar ist pretty full and i would like to get rid of informations that i don't need for my workflow

[Feature Request] Include default "collapsed" state for folders?

Awesome plugin, has cleared up my whole daily journal tree!

I've been wanting a similar thing for the "collapsed" state of folders.
For example, I have a "contacts" folders that contains about 900 individual files by now. Whenever I add a contact, this folders gets expanded in the file explorer, causing a whole lot of scrolling to make it collapsed again. If the YAML sorting language would include a default "collapsed" state too, this could be automated. I wouldn't need to manually collapse folders like "contacts" 12 times a day.

So: would it be hard to add a default "collapsed" state to the YAML spec?

Not alphanumeric, but natural sort order?

In your documentation you state that this plugin uses alphanumeric, but it seems to use natural sort order. That is that x7, x8 and x70, is sorted according to the number sequence of 7, 8, 70, and not the alphanumeric sequence of 7, 70, 8.

Is this a bug or a feature? And either way, would it be possible to get it to do true alphanumeric sorting?

In the image below I show the result after applying the sorting specification within my file CustomSort, and how it then doesn't show the files in alphanumeric order. Also included are the sequence of the hexadecimal numbers, 0x01FF, 0x0200 and 0x02FF, which are out of order due to the same issue. The 0x02FF is in the middle instead of at the end. Finally the image shows that the custom sort is effective (which also can be seen by file in reverse sort order outside of the SortingBug folder.

image

Regards,
Holroy

Support for multi-level sorting rules (2-3 levels, depending on how the levels are counted)

Goal

The final expected logic of sorting levels (whatever you name them and however you count them):

In the description below, the condition 0 means "items are equal based on the relevant order". Technically 0 is returned by a comparison function if compared items are equal according to the used criteria.

  1. Base level: compare groupIdx, it determines the main grouping of items in a folder
  2. Apply primary order of the group, if 0, continue as below
  3. Apply secondary order of the group, if defined. If not defined or 0, continue as below
  4. Apply folder-level order. If 0, continue as below
  5. Apply folder-level secondary order. if 0, continue as below
  6. Apply the CustomSortOrder.default order, which - as for now - is alphabetical.

Background of pre-existing implementation

Current implementation of the plugin contains a simplistic (yet tricky) limited support for second-level sorting criteria
See #87 and the implementation here

For clarity, the existing code logic:

  • if items in a folder fall into the same sorting group (their groupIdx-es are equal), there is a not obvious processing step, namely:
    • the exception is made for the regexp-based sorting groups, when matchGroup is present on both compared items (99,99% of the time) and both matchGroups are equal
      • both matchGroups present imply one of title-based grouping type
      • both matchGroups equal imply that the titles must be different by definition (file names are unique in a folder)
    • if the secondary order for the group is defined (a limited subset is supported), then:
      • do not apply the main order of the group and go directly to secondary order
      • otherwise -> apply the main order of the group (which is the regular processing)

Tricky! And the question is why? What is the purpose of this unobvious logic?

Conceptual explanation: for regexp-based grouping, it enables the ability to enforce comparison on the regexp-string-match only, instead of comparing full titles. And if the regexp-matched (sub)strings of titles are equal, the secondary sorting order (if defined) is applied. I must have been implementing this in the middle of the night...

Conclusions for the updated fully-fledged multi-level sorting support:

The better idea seems to be unify the above tricky behavior with multi-level sorting. At the same time incorporate a specific indicator of the regexp (a new syntax) to enforce comparison by the regexp solely (not by full title). Doing so will automatically apply secondary sort order if the regexp matches are present and equal.

Integration with obsidian-icon-folder

Hullo,

I have no idea how feasible or challenging this would be but I thought it would useful if it were possible to specify a file or folder icon (perhaps via the icons name) in the sortspec.

I have been using these icons to help me scan through my list of files.
https://github.com/FlorianWoelki/obsidian-icon-folder

For example, one might use the bookmark icon to indicate certain files are book chapters or sections and maybe it would be helpful for them to cluster together (then I imagine alpha-numeric would kick in to order the cluster).

Just a thought.

Thanks for sharing your work,

Handling of the designated note is confusing for some users

Based on the feedback I noticed that the plugin setting for 'path to designated note containing sorting specification' could be confusing for some users, especially non technical. Namely:

  • the user can enter path like sort.md in the settings and then create a note named sorting.md which underneath results in a file sorting.md.md. In result, the note will be ignored by the plugin
  • the user can enter path like Inbox/sort and create a note Inbox/sort (being a file Inbox/sort.md underneath). In result, the note will be ignored by the plugin
  • more similar cases are possible

Find a solution to avoid such confusing mistakes

`target-folder` Setting Not Working on Desktop

Hi @SebastianMC ,

Well done on an excellent and very useful plugin!

I have a sortspec.md file in a folder: Data/Sorting as follows:

sorting-spec: |
  target-folder: Development/C
  Boilerplate
  Comments
  Output
  Input
  Number Literals
  Variables
  Primitives

  target-folder: Notes/Git
  Theory
  Commands

The sorting occurs nicely and with no problems on my mobile (iPhone), but not on desktop (Mac) after toggling the ribbon icon. There is no error reported. I have tried to play around with the target-folder setting to not avail. The only solution appears to be to place a sortspec.md file within the Development/C folder without the target-folder setting, but I don't want to have a separate sortspec.md per folder and prefer to keep all settings in one file as I have tried to do.

The version of the plugin I am using is 1.6.2 installed through Obsidian, Obsidian version 1.1.9, on Mac OS Ventura version 13.2 running on a MacBook Pro Apple Silicon M1 laptop.

Is there a solution to this please? Or is this a potential bug?

Thank you for your attention.

Possible Bug: Incorrect Chinese Support

Problem

This is the sorting-spec:

  target-folder: /
  学业笔记
  Daliy
  编译原理
  数据库
  其他

This is the effect:
image

Obviously the sorting didn't fit my expectation.
The right order should be

学业笔记
Daily
编译原理
数据库
其他
任务管理器
Callouts
sortspec
Template - Daily Task
Template - New Task

This sorting-spec is just the same case as simple-case 2 in the document.
I hope my perception to the grammar was correct.

If you can't type Chinese, you can copy the Chinese above for tests.

Looking forward to your reply!

Appendix

This is the default a-z sorting in Obsidian
image

Some target-folder: get ignored when sorting specs are read from two or more notes

As a side effect of debugging #56 I captured an issue with regexp-based target-folder: being ignored if the sorting spec is read from multiple notes.

Debugging revealed a bug of ignoring parts of previously parsed sorting specifications.

Need to improve the logic.

This piece of logic is not covered by unit tests because of complexity.

Bug introduced in 1.6.0 with the addition of target-folder: by name matching (non-regexp version)

Possible to apply sorting rules from parent folder to subfolders

(first of all, many thanks for making your plugin public, I love it)

I would like to be able to automatically apply the sorting rules from a certain folder to the folder itself and its subfolders.

Something like this.
---
sorting-spec: |
target-folder: Reviews/...
< a-z
---
would custom sort the contents of the folders

  • Reviews
  • Reviews/daily
  • Reviews/weekly

Something like this
---
sorting-spec: |
target-folder: Reviews
< a-z
---
would only custom sort the contents of the folder

  • Reviews

but would keep the following folders sorted in the standard way

  • Reviews/daily
  • Reviews/weekly

Plugin does not work on my system

macOS X.14.6 · Obsidian 1.4.13

Installed the plugin
restarted app
created a note called "sortspec" inside a folder with subfolders and notes
filled with content:

---
sorting-spec: |
  order-desc: a-z
---

restarted app
nothing happened
can't see a "ribbon button" anywhere (and didn't understand where it should be seen)

Update documentation and migrate to https://www.obsidian-custom-sort.info

Recent major and minor releases and discussions included features like:

  • integration with obsidian-icon-folder plugin
  • clarifying the usage of an experimental feature of hiding items in File Explorer
  • explaining the commands built-in into the plugin, yet not documented
  • additional sorting symbols for ASCII and unicode words
  • some more items like that
  • support for multi-level sorting
  • TODO: scan recent PRs and code updates (e.g. #79 or #74)

I could do a major update of the documentation:

  1. Move the content of the advanced-README.md to manual.md, leaving the former as an empty placeholer with redirection to manual.md
  2. Adding new sections in manual.md with the missing items (copy & paste parts of comments from closed issues and discussions)
  3. Updating the ToC

This would be mostly a manual work, not requiring a fresh head, yet a major milestone towards a good quality documentation

  • bookmarks integration, videos and technical documentation
  • move the advanced documentation to wiki, split in sections, add a ToC, etc.

[Feature request] Sort by modification date, treating folder and files equally

Hi, could it be possible to sort by modification date, treating folders and files equally?

Currently sort by modification date seems to only apply to files. Is it possible to also sort folders by modification date?

The modification date of a folder can be defined as the latest modification date of all the files in the folder. So if the folder contains 3 files, modified on Sep 1, Sep 2, and Sep 3 respectively, then the modification date of the folder is Sep 3.

[Feature Request] Reload sortspec command

Not really a big issue, but while I'm here I'll mention it:

While I was designing my vault and making sort adjustments, I had to press a lot of keys to reload my sortspec. I improved this by making a Commander macro with sort off and sort on.

It would be a mild improvement to have a single command to turn it off and on again in this scenario.

Auto-reload watching sortspec came to mind also, but Obsidian seems to save/update notes quite frequently and I could imagine this might be get the plugin's knickers in a twist...

Feature Request: Add option to pin folder notes

I have a folder note for each of my projects under each project directory. It would be nice if, instead of specifying target folder for each project, there's an option for pinning folder note, or even better, a variable such as {%foldername%} for sorting spec.

For example,

---
target-folder: /*
... GTD
{%foldername%}
---

would put foldernotes after all notes that ends with GTD.

[Feature Request] Separators

This plugin works great, especially having a single sortspec to deal with manual sorting of the main navigation and pinning important notes to the top of lists.

I would love to be able to add in a UI separator to the file explorer view in my sortspec, something like this, using a simple --- delimiter:

---
sorting-spec: |
    target-folder: Daily
    Tracker
    > a-z
    target-folder: /
    Home
    ---
    Daily
    Weekly
    Projects
    Notes
    ---
    Journal
    Dreams
    Thoughts
    Writing
    ---
    Assets
    Temporary
    ...
    z-a
---

This would create a separator in the workspace which would have markup like:

<div class="nav-folder is-collapsed"/>
<div class="nav-separator">
    <div class="nav-separator-inner"></div>
 </div>

And CSS like:

.nav-folder-separator {
display:block;
width:100%:
padding: var(--some-var) var(--some-var)
}
.nav-folder-separator-inner {
/* you get the idea*/
}

I could help with the markup/CSS part if this sounds like a good idea.

[Feature Request]: support sorting rule with RegExp

Hi, Hopes it can support sorting rule with RegExp

for example:
I have monthly, weekly and daily notes and other note in the same folder:

/daily-notes
    2022-11.md     # monthly note
    2022-W46.md    # weekly note
    2022-11-11.md  # daily note
    2022-11-11-122313-note-something.md # date: YYYY-MM-DD-HHmmss-...
    2022-11-11-173513-another-note.md
    2022-11-12.md  # daily note    
    2022-11-12-135312-first-note.md
    2022-11-12-182112-second-note.md
    2022-11-13.md  # daily note    

I want to sort the notes in following order:

  1. monthly notes
  2. weekly notes
  3. daily notes
  4. other notes

The sort result I want:

/daily-notes
    2022-11.md     # monthly note
    2022-W46.md    # weekly note
    2022-11-11.md  # daily note
    2022-11-12.md  # daily note    
    2022-11-13.md  # daily note   
    2022-11-11-122313-note-something.md # date: YYYY-MM-DD-HHmmss-...
    2022-11-11-173513-another-note.md
    2022-11-12-135312-first-note.md
    2022-11-12-182112-second-note.md

If the sorting rule support RegExp will be better, for example:

---
sorting-sepc: |
    target-folder: /*
    // monthly notes: YYYY-MM.md
    /:files regexp: [0-9][0-9][0-9][0-9]-[0-9][0-9]\.md
        < a-z
    // weekly notes: YYYY-[W]WW.md
    /:files regexp: [0-9][0-9][0-9][0-9]-W[0-9][0-9]\.md
        < a-z
    // daily notes: YYYY-MM-DD.md
    /:files regexp: [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-3][0-9]\.md
        < a-z
    // other notes
    ...
        <a-z
---

thanks.

[Technical] Aug '23 refactorings

TODO: extract from the complex branch / PR of #74 some refactorings and fixes which can be isolated and merged separately, thus simplifying the PR of #74

e.g.:

  • detection and application of current Obsidian-UI selected sorting as the default
  • ...

How to use target-folder with folders matching a patern?

Let's say I have several folders named "I am everywhere." Is there a target-folder:... entry I can use to match every instance of "I am everywhere"

Example file structure:

/
  I am everywhere/
    I am everywhere/
      subfolder/
         I am everywhere/
  subfolder/
    I am everywhere/
      subfolder
  subfolder/
    subfolder/
      subfolder/
      subfolder2/
        subfolder/
          I am everywhere/

or say I have folders with a date suffix, how do I apply sorting rules to all subfolders matching "subfolder [moment.js-formatted-date-string]"?:

/
  subfolder - 01.01.0001/
    jesus christ was born I think.md
    ...
  subfolder - 01.01.0002/
    idk something biblical.md
    ...
  subfolder - 01.01.0003/
    and on this day Mary breathed I think.md
    ...
  subfolder - 01.01.0004/
    Baby jesus moment.md
    ...
  subfolder - 01.01.0005/
    Baby jesus moment2.md
    ...

Cannot download sourcespec.md

The documentation for this plugin states that one should download the sourcespec.md and place it in the folder to be sorted. But when clicking on the link, nothing happens. I am not sure what needs to be in the frontmatter of that note and so I am unable to use this plugin.

[Bug][minor] The status indicator in some scenarios remains orange while the custom sorting is actually applied

(Self entered to take a look when time permits)
After (re)start of Obsidian or (forced)(re)load of the vault the ribbon status is orange while the custom sorting is actually active
It looks like some race condition on start up which prevents the ribbon state to be updated.
Subsequent clicking the ribbon icon works correctly and then the state is reflected visually
Observable:

  • desktop
  • large mobile (iPadOS)
  • small mobile (iPhone), with the remark below:
    • clicking on the ribbon icon, while changing the plugin state correctly and enabling/disabling custom sort, doesn't update the ribbon icon shape/color. Looks like the code is losing handle to the icon because of small-mobile-specific UI arrangement/structure

How to apply settings to all folders and files except root folder?

hello I finally achieved what I wanted ! im using

---
sorting-spec: |
 target-folder: //*
 /:files
  > a-z
 /folders
  > a-z
---

but I don't want my root files to be affected by the sorting. how do I have the root files ignored but not the children folders and the content in them

Plugin closes most recent tab

With the plugin enabled, upon opening Obsidian, the most recent tab gets closed automatically.
With the plugin disabled, I have no issues.

I am able to repeat this behaviour by opening or closing Obsidian.,
I am also able to repeat this behaviour by disabling and re-enabling the plugin without closing Obsidian.

I am not unable to repeat this by just suspending or re-enabling the custom sort function. It seem like it's really on that "first load".

Supply additional sort rules when initial criteria don't fully specify order

I have tried everything I can find/think of to get this to work, but in lieu of that awful title, lemme give my concrete example:

I've got a folder of journal entries labelled with human-redabnle rough date-times (oh, and some of the times are missing smh):

  • 28 August 12021 - 1
  • 28 August 12021 - 2
  • Afternoon 24 August 12021
  • Evening 24 August 12021
  • Evening 28th August 12021

I'd like to sort these descending by date, but ascending by time/sequence number.
I've added date and time metadata fields (perhaps someday I'll be able to do this from the filename but for now I'm going for easy mode first).
Sorting by only one or the other does give the expected results, but when I try to combine them, everything goes wonky.

    target-folder: Journal
    > a-z by-metadata: date, < a-z by-metadata: time

gives

  • Evening 28th August 12021 date: 2021-08-28 time: 5
  • Evening 24 August 12021 date: 2021-08-24 time: 5
  • Afternoon 24 August 12021 date: 2021-08-24 time: 4
  • 28 August 12021 - 2 date: 2021-08-28 time: 0.2
  • 28 August 12021 - 1 date: 2021-08-28 time: 0.1

which looks like descending time, then descending date within those groups.
Oddly, > a-z by-metadata: time, < a-z by-metadata: date does not change the order.
To be fair, I can't really tell what comma is supposed to be doing anyway.

    target-folder: Journal
    > a-z by-metadata: date
     < a-z by-metadata: time

gives

  • Evening 28th August 12021 date: 2021-08-28 time: 5
  • 28 August 12021 - 2 date: 2021-08-28 time: 0.2
  • 28 August 12021 - 1 date: 2021-08-28 time: 0.1
  • Evening 24 August 12021 date: 2021-08-24 time: 5
  • Afternoon 24 August 12021 date: 2021-08-24 time: 4
    which appears to be doing what I want, except that it's sorting time in the reverse of how I want it.
    Interestingly, if I swap the time to descending, the order is unchanged, and likewise if I delete the line mentioning time!
    The syntax reference seems to tell my I'm barking up the wrong tree with this syntax, but I'm not sure.

I did try /! operators at one point, but it didn't work, and the docs suggest that's not right either.

At this point, anything is helpful! I'm not even convinced this capability exists (yet!).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.