Commit Graph

62 Commits

Author SHA1 Message Date
SebastianMC 2670cdb613 Fix for head tail regex match logic, when both regexp produce matching groups
- unit tests
2023-08-25 14:43:43 +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 16f5d61818 Merge branch 'master' into 88-technical-aug-23-refactorings 2023-08-24 00:46:11 +02:00
SebastianMC 24355ff0a4 Bugfix in sorterByMetadataField - reverse order working correctly now
- fix in unit tests
2023-08-24 00:35:19 +02:00
SebastianMC b1f36156d1 Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:28:24 +02:00
SebastianMC f48bc4d11f Simplification of this.app ==> app - this is a globally exposed object 2023-08-24 00:16:10 +02:00
SebastianMC 949b58b5ff Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:15:32 +02:00
SebastianMC 24b37eb87c Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:09:04 +02:00
SebastianMC e811d6d7e4 Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 23:47:41 +02:00
SebastianMC 2d34813a3f Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 23:45:30 +02:00
SebastianMC b752662d82 Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 18:55:29 +02:00
SebastianMC 037ada5a88
79 foldername variable support (#81)
* #79 - parent-folder-name variable support

- introductions of simplistic macros / templating support
- initially only one macro supported: {:%parent-folder-name%:}
  - macro expanded only for plain-text matching rules, ignored for regexp-based rules
  - for children of the root folder the macro is ignored
- unit tests for the new macros.ts
- unit tests for the testable part of updated custom-sort.ts
2023-06-30 19:05:29 +02:00
SebastianMC aa31bee80c #72 - Advanced sorting by creation date doesn't work correctly
- bug fixed, the behavior of `< advanced created` sorting method corrected
- new unit tests to cover the scenario
2023-04-03 19:05:13 +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 01af14b174 #60 - Simplified integration with obsidian-icon-folder plugin
- the plugin integration and matching part completed
- unit tests
2023-02-28 23:57:08 +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 1cb8b2b05b Mobile-specific tweaks, e.g. new ribbon icon and documentation updates 2023-02-11 17:40:31 +01:00
SebastianMC 56e23bc5ea #53 - Allow for different folder note naming scheme
- updated settings description for clarity
- minor extension of the code to allow both _about_ and _about_.md in the settings
- Version bump before release
2023-02-10 13:39:52 +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 ea018db574 #50 - regexp and by-name matching support for target-folder
- removed unused code
2023-02-06 23:42:56 +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 8e397797fc Merged from upstream 2023-02-02 17:32:57 +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 91859cd0fa Comments clean up around the logic of determining which files to scan for sorting specs.
Added yarn.lock to support deterministic build
2022-12-05 17:38:13 +01:00
Sam Kvale 4c39f277c0
feat: Allow sortspec.md.md in addition to sortspec.md files (#38) 2022-12-05 16:05:42 +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 b9592920b7 #22 - bugfix of the status indicator in ribbon icon sometimes not updated
- plus version bump for release
2022-11-03 10:23:11 +01:00
SebastianMC 4cfe62afe8 19 - Less confusing description and handling of the `designated note` settings
- added comments for clarity
2022-10-13 09:29:18 +02:00
SebastianMC 426eb789da 19 - Less confusing description and handling of the `designated note` settings
- the path to note entered in setting is treated as (all at once):
  - path to the note file, OR
  - path to the note, OR
  - name of the note
2022-10-13 09:10:40 +02:00
SebastianMC 29f3a16dce Removed the default value from designated note setting (as per remark from review https://github.com/obsidianmd/obsidian-releases/pull/1173#issuecomment-1273788109) 2022-10-10 23:33:32 +02: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 6e54db9f1c Introduced `normalizePath(...)` for consuming a path to note from plugin settings 2022-09-30 15:49:07 +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 13f76cc623 Unified the way of accessing the FileExplorerView and added a bit more defensive programming in this area. Also added support for deferred monkey-patching of FileExplorerView in case it doesn't succeeds in the initialization sequence 2022-09-29 19:05:06 +02:00
SebastianMC 57b1cd8ae2 Bugfix for #17 - plugin closes most recent tab
Version bump for release
2022-09-29 10:01:10 +02:00
SebastianMC 72550fc01d 13 - Feature request: Sort by modification date, treating folder and files equally
- added unit tests coverage the logic of determining dates for folders
2022-09-26 19:00:23 +02:00
SebastianMC bfd093bbf2 13 - Feature request: Sort by modification date, treating folder and files equally
- added unit tests coverage for the extended sorting methods in sorting specification processor
2022-09-26 16:40:24 +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 4e64925b2d Merge remote-tracking branch 'origin/master' into 13-feature-support-modified-date-sort-for-folders 2022-09-26 15:18:03 +02:00
SebastianMC 65b452ef3f 14 - Disable notification option
- finetune the description of the newly introduced setting
2022-09-26 15:06:29 +02:00
SebastianMC c12db12d37 14 - Disable notification option
- added plugin setting to enable/disable notifications
2022-09-26 15:03:00 +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