To wrap this thread up, while I love TiddlyWiki and don't see myself
changing due to its elegance and flexibility, I also at times find aspects
of it (several underlying this thread) frustrating:
- Hard-to-Intuit / Understand Syntax / Parsing Rules: Do I reference
something in a given context with double braces ({{}})? Single braces ({})?
Double angle brackets (<<>>)? Single angle brackets (<>)? Dollar signs?
Parens and dollar signs? Or will the kind of reference I'm trying to make
not work at all in my current context? And how will some given wikitext /
macro call / string be mangled by TW? Who knows? I haven't really developed
a predictive mental model of TW's behavior in 6+ months of working with it.
- Lack of String Manipulation: I expect built-in ways to do string
concatenation, searching, and splitting that nest and work in most contexts
(e.g., not hand-crafted and unreliable macros).
- Limitations of Fields: It's hard to leverage the elegant database
structure of TW when field names are constrained by some arcane naming
constraints. (I realize not entirely TW's fault.)
- Lack of JSON Index Operator Parity with Fields: And, to wit, it's not
possible to fully move to JSON data-driven Tiddlers (instead of fields)
when filters have so much built-in field searching and sorting operator
support that isn't supported for indexes.
- Documentation and examples at https://tiddlywiki.com/ are often too
simple (e.g., operator examples rarely show complex / dynamic values
populated by fields and variables like we see in this thread, which is
where I usually need help) or too terse, i.e., the non-example doc pages
often have sentence-fragment like descriptions of an operator's purpose or
behavior.
That said, after all the help from Mark, I suspected that my filter string
concatenation might work better if I weren't trying to assemble it from
string literals in the wikitext (which is a bit counterintuitive from
traditional programming), so I made my filter string components into fields
that I could reference in my concat macro. This helped, although ultimately
TW would only process the first 2 of these and the oddly the last one had
to go back to being a literal:
<$wikify name=search text=<<concat {{'Basics Template'!!search_prefix}}
{{!!parent_page}} {{'Basics Template'!!search_middle}} {{!!parent_page}}
'"]]+[sort[]nsort[birth_date]]' >> >
<$list filter=<<search>> >
In which search_prefix = [tag[data_page]search:text:literal["father": "
And search_middle = "]][tag[data_page]search:text:literal["mother": "
By the way, a more compact (although I suspect less performant) way to
accomplish this filter / search is via a regex search filter similar to
this:
[tag[data_page]search:text:regexp[(\"mother\")|(\"father\"): \"
{{!!parent_page}} \"]]
Ultimately, however, even though I have mostly solved the search problem in
this thread, I am finding JSON data tiddlers filter operators too limited
(e.g., no sorting) relative to the fairly robust field filter operators in
TW, so I'm changing back to a mostly field-driven data model (with the
exception of complex field names that refer to other Tiddlers, e.g., those
that must contain capital letters and spaces, which TW cannot persist as
field names).
However, the help has been much appreciated!
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/e7d90cb6-1078-4f1f-bf7f-e2cf29434f32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.