[TW5] Updated plugin: tobibeer/split 0.7.0

33 views
Skip to first unread message

Tobias Beer

unread,
Dec 30, 2015, 6:11:24 AM12/30/15
to tiddl...@googlegroups.com
Hi everyone,

I made some changes to tobibeer/split:
  1. It can now retrieve titles by parsing any stringified list or list fields.
    • a "stringified list" would be how titles are saved to the list or tags field 
  2. I modified the prefix and suffix syntax in a non-backwards-compatible way.
    • I only decided to do that, because split has not been around for very long yet. 
      • So, please excuse my being this blunt!
Compatibility

Should you be using tobibeer/split by now,
please check if you need to fix the (introduced) compatibility issue
by updating any occurrences using a prefix or suffix like so:
  • +(prefix)to:
    +\prefix\
  • (suffix)+ to:
    \suffix\+
I did this so as to keep round brackets out of the operand suffix and make room for this issue:

#2122 Allow Operand Listings to Include 'Titles With Spaces'

Lists

I decided to add list parsing capabilities to the split filter,
since it already implements a lot of goodies to further do something with retrieved titles.

So, the split filter can now...
  1. interpret the operand, especially "soft" operands, as a stringified list and split that into listed titles
  2. retrieve and operate on titles from the list field of any input titles
  3. retrieve and operate on titles from any list field of given input titles
Examples:
  • [split:list{SomeTiddler!!some-field}]
    • interprets some-field of SomeTiddler as a list field (comparable to the list or tags field) and splits that into titles
  • [split:list<some-variable>]
    • splits some-variable into titles, likewise interpreting its contents as a stringified list
  • [split:list{MyData##some-index}]
    • splits some-index in the data tiddler MyData into titles, again interpreting the contents as a stringified list
  • [tag[Foo]split:list[]]
    • retrieves the list field of all tiddlers tagged Foo, however allowing duplicates
      • use the suffix unique to enforce uniqueness: [tag[Foo]split:list unique[]]
  • [tag[Foo]split:list=bar[]]
    • retrieves list field bar of all tiddlers tagged Foo
    • you can combine this with other split options, e.g.:
      • [tag[Foo]split:list=bar first[]]
        • retrieves only the first item in the list field bar of each tiddler tagged Foo
In other words, using the split filter with the list suffix possibly is
how you may have wanted the core list[] filter to behave.

For more details on using lists, see...
Best wishes,

Tobias.
Reply all
Reply to author
Forward
0 new messages