Thanks for sharing and its a very useful set of tools.
I do want to point out however; you say in the readme for tagging tree filter
Infinite (or recursive) filters cannot be defined in TiddlyWiki
- This may be technically true but it is important to note this is only if one restricts oneself to a single filter.
It is true to say;
Infinite (or recursive) code can be defined in TiddlyWiki
- It is quite easy easy in TiddlyWiki to implement recursive processes using a macro that calls itself.
- one one hand you may need to add a little code to detect loops if the data is not hierarchical.
- But on the other hand recursive macros present more possibilities to use and display intermediate values. Including but not limited to
- counts, totals and calculations for each subtree
- Separating the nodes (leaves) from branches (folders) and treating each differently
- Visually representing the hierarchy
- I have not yet investigated but the MAP filter/filter run, may be also helpful with fixed depth recursion.
It is important to recognise that obtaining a list of tiddlers in a hierarchy from a filter only returns the list of tiddlers in that hierarchy and that intermediate and accumulation of values associated with those tiddlers may very well need to iterate this list of titles one or more times, to extract information that someone is after.
- Macro based recursive functions can collect this information in a single iteration of the hierarchy.
This is an important distinction to make when designing solutions because along with using two filters and nesting list widgets, it is not always as efficient to cram all functionality into a single filter, when when have other structures that can often provide more efficient solutions depending on the use case.
Not withstanding the above it is true there is a whole class of problems where your traggingtree and tagstree filters are very easy to use and efficient.
- These filters is perfect for Identifying a list of tiddlers on which to apply a common action or calculation which can only be found “walking a tree”.
What to look for?
- There is a class of coding cases where if you find yourself using one of your new operators multiple times, or the list of titles so generated by those filters multiple times it may be better to look at this alternative approaches.
- Designers may consider the kin filter for more complex and non-tag tree filtering or using nested lists and self calling macros for other cases.