Commit Graph

48 Commits

Author SHA1 Message Date
SebastianMC eeb581120d Major refactoring of sorting structures. Refactored the code. Unit tests not touched, broken. 2024-11-06 11:23:23 +01:00
SebastianMC 9e2e12046d #171 - a PoC of the idea of metadata value extractors. Extended syntax, unit tests, error handling 2024-11-05 20:12:47 +01:00
SebastianMC f210a412d3 #171 - a PoC of the idea of metadata value extractors. Working version, missing errors detection for new scenarios 2024-11-04 14:30:49 +01:00
SebastianMC d82a80c063 #171 - a PoC of the idea of metadata value extractors. Completed the sorting spec parser part. 2024-11-03 23:16:57 +01:00
SebastianMC 42a5f1feb2 #171 - started creation of a PoC of the idea of metadata value extractors. At a glance a low hanging fruit turned out to be far too complex to be worth it. 2024-11-03 22:56:55 +01:00
SebastianMC 92a33215cc #150 - Sort notes in dd-Mmm-yyyy format
- additional unit tests
- fixes detected by unit tests

Next step: manual local testing of real scenarios
2024-07-08 23:49:24 +02:00
SebastianMC a7b807d5f5 #150 - Sort notes in dd-Mmm-yyyy format 2024-07-08 21:36:26 +02:00
SebastianMC ba54e63a48 #132 - new orders: `advanced recursive modified` and `advanced recursive created` 2024-02-19 08:53:43 +01:00
SebastianMC 5ac915547c Introduced alias sorting name `unicode-charcode` for the `vsc-unicode`, for clarity for non-VSC users. 2024-02-13 16:30:54 +01:00
SebastianMC 424e56c962 Removed support for the experimental sorting methods: `aaa-z` and `a-zzz`. They weren't working correctly. 2024-02-13 16:24:15 +01:00
SebastianMC a2a808e78b Two experimental features + version bump before release
- `aaa-z` and `a-zzz` sort orders (uppercase first, alphanumeric order and lowercase  first, alphanumeric)
- `vsc-unicode` sort order, which is equivalent to what VS Code refers to as 'unicode' sorting (which name is arbitrary and confusing, yet familar to VS Code users)
2024-01-27 23:25:59 +01:00
SebastianMC 9cf01e9591 Merge branch 'master' into 127-folder-and-file-with-the-same-basename-sorting
# Conflicts:
#	src/custom-sort/sorting-spec-processor.spec.ts
2024-01-25 21:23:54 +01:00
SebastianMC e0208e2793 #126 - Allow escaping the . (dot) character to remove ambiguity with the ... wildcard
- simplistic implementation - use `./...` syntax to remove ambiguity of `....`
2024-01-25 20:54:15 +01:00
SebastianMC 958a9b017c #127 - folder and file with the same (base) name advanced sorting support:
- the last-resort default fallback sorting method (which was alphabetical) is extended to give preference to files. In other words, if all the specified sorting levels don't sort two items, the file goes first (if the other item is a folder)
- added explicit syntax to specify `files-first` or `folders-first`
2024-01-25 18:10:36 +01:00
SebastianMC f5fafc184f #126 - Allow escaping the . (dot) character to remove ambiguity with the ... wildcard
- naive implementation, the escape lexeme is \\DOT (problematic long term because of overlaps)
- naive implementation, the escape is transformed to simple-regexp (technically this is not needed at all)
2024-01-25 17:09:30 +01:00
SebastianMC 11d6623191 #123 - sorting by file basename by default (instead of fullname with ext)
- new syntax `a-z.` and `true a-z.` introduced to allow explicitly sorting by filename with ext
2024-01-25 10:47:05 +01:00
SebastianMC 88327f6314 #115 - Add inline regex support to match capital letters and lowercase letters explicitly 2023-11-24 18:52:26 +01:00
SebastianMC d8874629ba Merge branch 'master' into 74-integration-with-bookmarks-core-plugin
# Conflicts:
#	src/custom-sort/custom-sort.ts
#	src/custom-sort/sorting-spec-processor.ts
2023-09-26 19:26:00 +02:00
SebastianMC 1f0baebc41 #89 - Support for multi-level sorting
- full runtime processor extension plus necessary syntax adjustments
- backward compatibility with semi-two-levels
- extended meaning of sorting: lexeme
- extended and more fine-grained error messages for sorting order specifications
2023-09-26 18:56:44 +02:00
SebastianMC 9f537f34c7 Merge branch 'master' into 74-integration-with-bookmarks-core-plugin 2023-09-18 14:17:19 +02:00
SebastianMC 24af493734 Support for implicit sorting specs - refined priorities of implicit vs explicit rules
- new unit tests cover the changes
2023-09-18 14:04:33 +02:00
SebastianMC 3cc58f69b9 Refactoring of internal processing context plus support for implicit sorting specs
- !!! NO UNIT TESTS ADDED - remember to do it
2023-08-24 11:18:22 +02:00
SebastianMC 45f5918598 Major improvement: added support for determining and applying sort order currently selected in Obsidian UI
- the meaning of CustomSortOrder.standardObsidian changes from a fixed one to what is actually selected in Obsidian UI
- the CustomSortOrder.standardObsidian can be applied at a folder level (as the default for folder) and at a group level (this is a major addition)
- added a mapping of Obsidian UI sorting methods onto internal plugin sorting methods, plus addition of the Obsidian UI logic to push folders to the top unconditionally
- !!! NO NEW UNIT TESTS FOR THIS FEATURE - must add later
- not tested manually, as the commits extraction and pushing is done as part of #88 github issue
2023-08-24 01:11:22 +02:00
SebastianMC 71ab76652c #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement
Tons of updates:
- full integration with standard sorting at folder level and at sorting group level
- refined support for implicit sorting for bookmarks plugin integration
- documentation update (partial, sketchy)
2023-04-18 11:35:10 +02:00
SebastianMC 56348006ce #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement
- feature code complete
- not reviewed
- not tested
- no unit tests coverage
2023-04-07 18:40:35 +02:00
SebastianMC e788c92543 #67 - feature alphabetic wildcard
- sorting symbol \a+ for ASCII word
- sorting symbol \A+ for any modern language word (involved advanced unicode regexp)
2023-03-07 19:01:44 +01:00
SebastianMC bd875fa804 #60 - Simplified integration with obsidian-icon-folder plugin
- extended the parser with support of new lexeme with-icon:, with or w/o parameter
- unit tests
2023-03-01 10:42:35 +01:00
SebastianMC f444614ddc #58 - Some target-folder: get ignored when sorting specs are read from two or more notes
- fixed the bug
2023-02-15 22:27:57 +01:00
SebastianMC 51733476e7 #50 - regexp and by-name matching support for target-folder
- more flexible syntax for target-folder modifiers: allow them in any order and also allow duplicates
2023-02-07 14:11:50 +01:00
SebastianMC afcb505633 #50 - regexp and by-name matching support for target-folder
- code readability (implicit structure turned into explicit interface)
2023-02-06 23:59:14 +01:00
SebastianMC 8512f1b4cb #50 - regexp and by-name matching support for target-folder
- complete implementation
- full unit tests coverage
- NO update to documentation (yet to be done)
2023-02-06 23:38:27 +01:00
SebastianMC 0ba423ce4b #45 - Feature: explicit matching of 'starred' items
- new keyword added to support items starred with Obsidian core plugin 'Starred'
  - the keyword is `starred:`
- detection and more user friendly handling of the general error condition when the File Explorer is not available
  - new ribbon status icon shape to indicate the general error plus detailed error logged to the console
2023-01-03 19:09:37 +01:00
SebastianMC ec0049302b
32 feature: wider support of controlled regexp (#41)
#32 - Implementation completed with rich unit tests coverage.

- manual.md contains a simple example of the new feature
- support for undocumented `\[0-3]` for the requester of the feature ;-)
2022-12-18 19:59:58 +01:00
SebastianMC 84a5238814
#35 - Feature: combining of sorting rules (#36)
- full unit tests coverage of the new functionality
- refactor of the parser to allow more flexible syntax and be able to detect more errors
- introduced many new errors recognized by the parser
2022-11-29 11:17:02 +01:00
SebastianMC 581f5e9f36
#29 - Feature: priorities of sorting rules (#31)
- Implementation with full coverage of unit tests
- Documentation update with details about priorities (as an advanced feature, only in manual.md, not in README.md)
2022-11-29 10:17:15 +01:00
SebastianMC fabd586348
#23 feature request sorting notes with metadata (#26)
* #23 - support for sorting by metadata

- added support for grouping items by the presence of specified metadata
  - new keyword `with-metadata:` introduced for that purpose in lexer
  - if metadata field name is omitted, the default `sort-index-value` is used
- added support for sorting items by notes and folders metadata
  - new keyword 'by-metadata:' introduced for that purpose
  - if metadata field name is omitted, the default `sort-index-value` is used (or metadata name inheritance is used)
- unit tests of sorting spec processor extended accordingly
- documentation and code example in README.md 
- extended to also support true alphabetical on metadata fields
- release unnecessary references after sorting completed
2022-11-12 16:18:18 +01:00
SebastianMC 742bdf1b80 #27 - support for true alphabetical order
- added new token 'true a-z'
- unit tests coverage of the extended logic
- added example in README.md
2022-11-10 00:10:16 +01:00
SebastianMC 1915d59cf9 Sorting spec syntax refinement to allow one-liners like: sorting-spec: \< a-z 2022-10-07 12:02:16 +02:00
SebastianMC 4f0937c925 Removed the parser method prefixes like _l1s3_.... which were a residue of early development stage naming allowing clear ordering of these functions in the code. No longer needed 2022-09-29 19:18:52 +02:00
SebastianMC 1b8e0878af 13 - Feature request: Sort by modification date, treating folder and files equally
- extended the advanced folder date handling also on the creation date
2022-09-26 16:18:35 +02:00
SebastianMC 2b77ce058d 13 - Feature request: Sort by modification date, treating folder and files equally
- finetuned the 'modified' sorting method - not the folders are ordered alphabetically, as the standard Obsidiand sort by 'modified date' does
- finetuned the 'created' sorting method in the same way as 'modified'
- added some initial content to syntax-reference.md ;-)
- extended the 'advanced modified' sorting method to also support the edge-case secondary sorting methods for groups
2022-09-25 22:50:27 +02:00
SebastianMC 5aed85c0bd 13 - Feature request: Sort by modification date, treating folder and files equally
- working solution - added new explicitly named sort method 'advanced modified' on top of 'modified'
- unit tests to be added before merge and release
2022-09-23 20:10:31 +02:00
SebastianMC c01d069829 Merge from upstream git@github.com:obsidianmd/obsidian-sample-plugin.git
- because of strict null check adjusted the code where necessary
2022-09-13 18:47:39 +02:00
SebastianMC 9962d9e76e Ticket #4: Feature Request: Activate / Deactivate Custom Sort through command
- added two new commands to enable/suspend the plugin
- intentionally put in the description convenient names: sort-on and sort-off
- code area was not covered by unit tests, not adding new one at this point (simple logic, fresh mind ;-)
2022-09-07 22:47:16 +02:00
SebastianMC d3e11708a4 Bug fix: when only files outsiders group was present, no catch-all outsiders group was added automatically. Same for folders-only outsiders group.
Cosmetics: wildcard patters for root like '/*' or '/...' produced a non matchable sort spec in the main sorting spec. The sort spec in wildcards tree was ok.
2022-09-05 10:52:02 +02:00
SebastianMC 5838a81b9c Ticket #1: added support for imposed sorting rules inheritance by subfolders
- bugfix: detection of duplicate specifications for the same folder across multiple (yaml) source files
2022-08-30 23:25:39 +02:00
SebastianMC e972bce007 Ticket #1: added support for imposed sorting rules inheritance by subfolders
- new syntax: target-folder: Reviews/*  <-- applies to folder, subfolders and all descendant folders
- new syntax: target-folder: Reviews/...  <-- applies to folder and subfolders
- special case: target-folder: /*  tells the plugin to apply the specified sorting to entire vault
- enhanced syntax for '.' - can be used to specify relative path now (e.g. target-folder: ./daily)
- added new sorting attribute (sorting: standard) to actually give back the sorting into the hands of standard Obsidian mechanisms
- fixed a minor bug: some of error messages were displayed only in console, not in the ballons
- unit tests for all new and changed functionality
- pending README.md update
2022-08-30 18:53:58 +02:00
SebastianMC 93daf529d3 First public release of the Obsidian custom sort plugin 2022-08-06 03:15:44 +02:00