kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Document splitbefore and storyviews operators
rodzic
89163e0e85
commit
baceb21fbb
|
@ -0,0 +1,8 @@
|
|||
created: 20150126143216000
|
||||
modified: 20150126143901000
|
||||
tags: [[splitbefore Operator]] [[Operator Examples]]
|
||||
title: splitbefore Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$macrocall $name=".operator-example" n="1" eg="2015-01-26 2014-07-19 2013 +[splitbefore[-]]"/>
|
||||
<$macrocall $name=".operator-example" n="2" eg="[[green trees]splitbefore[ee]]"/>
|
|
@ -0,0 +1,7 @@
|
|||
created: 20150126142047000
|
||||
modified: 20150126142124000
|
||||
tags: [[storyviews Operator]] [[Operator Examples]]
|
||||
title: storyviews Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[storyviews[]]">>
|
|
@ -0,0 +1,25 @@
|
|||
created: 20150126142522000
|
||||
modified: 20150126143945000
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: splitbefore Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: splitbefore
|
||||
purpose: select a delimited prefix from each input title
|
||||
|
||||
<$macrocall $name=".operator-def"
|
||||
input="a [[selection of titles|Title Selection]]"
|
||||
parameter="a string of characters marking the end of the prefix"
|
||||
paramName="s"
|
||||
output="the prefix, up to and including <<.place S>>, of each input title"
|
||||
/>
|
||||
|
||||
Each input title is processed in turn.
|
||||
|
||||
* A title that contains <<.place s>> contributes everything up to and including <<.place s>>.
|
||||
* A title that doesn't contain <<.place s>> simply contributes itself to the output.
|
||||
|
||||
Contributions are [[dominantly appended|Dominant Append]] to the output.
|
||||
|
||||
The <<.clink "`toc`" TableOfContentsMacro>> macros use this operator with `/` as the parameter.
|
||||
|
||||
<<.operator-examples "splitbefore">>
|
|
@ -0,0 +1,17 @@
|
|||
created: 20150126141718000
|
||||
modified: 20150126142035000
|
||||
tags: [[Filter Operators]] [[Special Operators]]
|
||||
title: storyviews Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: storyviews
|
||||
purpose: select the names of all the story views
|
||||
|
||||
<$macrocall $name=".operator-def"
|
||||
input="ignored"
|
||||
parameter="none"
|
||||
output="the name of each story view"
|
||||
/>
|
||||
|
||||
The names are those exported by [[modules|Modules]] whose <<.field module-type>> is <<.value storyview>>.
|
||||
|
||||
<<.operator-examples "storyviews">>
|
|
@ -1,5 +1,5 @@
|
|||
created: 20150117152607000
|
||||
modified: 20150126092438000
|
||||
modified: 20150126144131000
|
||||
title: $:/editions/tw5.com/operator-macros
|
||||
tags: $:/tags/Macro
|
||||
|
||||
|
@ -11,9 +11,9 @@ tags: $:/tags/Macro
|
|||
then="""<tr><th align="left">`!` input</th><td>$negationInput$</td></tr>"""
|
||||
else=""/>
|
||||
<$macrocall $name=".if" cond="""$suffix$"""
|
||||
then="""<tr><th align="left">[[suffix|Filter Step]]</th><td><<.place "$suffixName$:">> $suffix$</td></tr>"""
|
||||
then="""<tr><th align="left">[[suffix|Filter Step]]</th><td><<.place "$suffixName$">> = $suffix$</td></tr>"""
|
||||
else=""/>
|
||||
<tr><th align="left">[[parameter|Filter Parameter]]</th><td><$macrocall $name=".if" cond="""$paramName$""" then="<<.place '$paramName$:'>>" else=""/>$parameter$</td></tr>
|
||||
<tr><th align="left">[[parameter|Filter Parameter]]</th><td><$macrocall $name=".if" cond="""$paramName$""" then="<<.place '$paramName$'>> = " else=""/>$parameter$</td></tr>
|
||||
<tr><th align="left">output</th><td>$output$</td></tr>
|
||||
<$macrocall $name=".if" cond="""$negationOutput$"""
|
||||
then="""<tr><th align="left">`!` output</th><td>$negationOutput$</td></tr>"""
|
||||
|
|
Ładowanie…
Reference in New Issue