Hi Jed,

the use case from which this emerged was cut and pasting a comma separated
list from a PDF then wanting to create tiddlers for each in the list. Part
of a process of convering a PDF into an extensible document and
orgnaisational model.

I cut and paste the text into one side of the edit template, then use the
right hand side to crreate tiddlers.

I thought of an input resempling something like this

<<.macroName "music, food, art, gardening, performance" >>

It could be used to turn a sentence from a static text into an interface
for creating a model.

The marco could create tag pills, there could be a new here button at the
top.

The process would be taking annotation of a text one step further: the
annotation adds the capacity to build on lists within the existing text.

Alex

On 29 November 2017 at 12:45, Jed Carty <[email protected]> wrote:

> The first response is: Do you have to use comma separated lists for the
> input instead of using the native tiddlywiki list format? Because if you
> use the native format than you can just use normal filter operators.
>
> The actual answer to your question is to put this in a tiddler with the
> tag $:/tags/Macro then you can use the macro SplitCommaList:
>
> \define InnerSplitCommaList()
> <$list filter="""[<CurrentList>splitbefore[,]removesuffix[,]]"""
> variable=CurrentItem emptyMessage="""<$link to=<<CurrentList>>><<
> currentList>></$link>""">
> <$link to=<<CurrentItem>>><<CurrentItem>></$link>
> <$set name=CurrentList 
> filter='[<CurrentList>removeprefix<CurrentItem>removeprefix[,]]'
> emptyValue=<<CurrentList>>>
> <<InnerSplitCommaList>>
> </$set>
> </$list>
> \end
>
> \define SplitCommaList(list)
> <$set name=CurrentList value="""$list$""">
> <$set name=CurrentList filter='[<CurrentList>addsuffix[,]]'>
> <<InnerSplitCommaList>>
> </$set>
> </$set>
> \end
>
> Usage:
>
> Directly give the list:
>
> `<<SplitCommaList """a,b,c""">>`
>
> <<SplitCommaList """a,b,c""">>
>
> Using a text reference:
>
> `<<SplitCommaList {{!!field_with_comma_list}}>>`
>
> <<SplitCommaList {{!!field_with_comma_list}}>>
>
> the second set widget adds a comma to the end of the list because checking
> to see if you are on the last item and there is no trailing comma is a pain
> otherwise. This works with lists with and without trailing commas.
>
> --
> 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/8179a850-9024-4125-a6d7-96eeddf17a3f%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/8179a850-9024-4125-a6d7-96eeddf17a3f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CALc1hYeMuTMO7C3EL2S8ouq0U7xmk9hijyLhHJCqg-zMJ9pnvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to