How to test filesystempath easily

Sometimes it works, sometimes it don’t.

I have to test it in the console like

$tw.wiki.filterTiddlers('[[APrivateContent]taggingtree[]search-replace:g[/],[_]search-replace:g[:],[_]addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]',
  null,
  $tw.wiki.makeTiddlerIterator(
    ['TitleOfAPrivateTiddler']
  )
);

// one-liner for copy&paste for test
// $tw.wiki.filterTiddlers('[[APrivateContent]taggingtree[]search-replace:g[/],[_]search-replace:g[:],[_]addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]', null, $tw.wiki.makeTiddlerIterator(['TitleOfAPrivateTiddler']))

I found some filter works, like this works perfectly but slowly:

(add \n only for readability, in reality they don’t change line)

[!is[system]kin::to[APrivateContent]
addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]

This only count for two levels, but is fast

[tag[APrivateContent]tagging[]]
:or[tag[APrivateContent]]
:and[search-replace:g[/],[_]search-replace:g[:],[_]
addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]

And this doesn’t work

[[APrivateContent]taggingtree[]
search-replace:g[/],[_]search-replace:g[:],[_]
addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]

This doesn’t work too, the input tiddler title is lost, output will always be 'subwiki/private-wiki/APrivateContent'

[tagstree[]match[APrivateContent]
search-replace:g[/],[_]search-replace:g[:],[_]
addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]

I hope there can be a GUI config for this, and I hope only by writing an intuitive filter expression can I put tiddler with filter condition to a folder I assigned.


The first part of file FileSystemPaths filter

How to use Selection Constructors in filesystempath is an unsolved problem.

I am on the move so unable to answer at length, however see the following links for some ideas:

The path filters mechanism has the same logic and is the inspiration for the :cascade filter run prefix.

1 Like

Thanks, this explains why I didn’t get how cascade work at first glance, thay also have provided input. Not like other filter expression written by ourself, can use all[cureent]

Resove Too slow! · Issue #1 · bimlas/tw5-kin-filter · GitHub

By creating

https://tiddly-gittly.github.io/in-tagtree-of/

Available in CPL.

Here is my $:/config/FileSystemPaths that works.

[in-tagtree-of[APrivateContent]]:and[search-replace:g[/],[_]search-replace:g[:],[_]addprefix[/]addprefix[private-wiki]addprefix[/]addprefix[subwiki]]
[in-tagtree-of[Calendar]]:and[search-replace:g[/],[_]search-replace:g[:],[_]addprefix[/]addprefix[calendar]addprefix[/]addprefix[subwiki]]
[in-tagtree-of[书籍文件]]:and[search-replace:g[/],[_]search-replace:g[:],[_]addprefix[/]addprefix[books]addprefix[/]addprefix[subwiki]]