diff --git a/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid b/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid new file mode 100644 index 000000000..d8dbda9c1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid @@ -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]]"/> diff --git a/editions/tw5.com/tiddlers/filters/examples/storyviews.tid b/editions/tw5.com/tiddlers/filters/examples/storyviews.tid new file mode 100644 index 000000000..c824a6fd2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/storyviews.tid @@ -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[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/tag - Copy.tid b/editions/tw5.com/tiddlers/filters/examples/untagged.tid similarity index 100% rename from editions/tw5.com/tiddlers/filters/examples/tag - Copy.tid rename to editions/tw5.com/tiddlers/filters/examples/untagged.tid diff --git a/editions/tw5.com/tiddlers/filters/splitbefore.tid b/editions/tw5.com/tiddlers/filters/splitbefore.tid new file mode 100644 index 000000000..1178ddeaa --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/splitbefore.tid @@ -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">> diff --git a/editions/tw5.com/tiddlers/filters/storyviews.tid b/editions/tw5.com/tiddlers/filters/storyviews.tid new file mode 100644 index 000000000..071f4fe48 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/storyviews.tid @@ -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">> diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid index 8f36a4337..b56c48cd3 100644 --- a/editions/tw5.com/tiddlers/system/operator-macros.tid +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -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="""`!` input$negationInput$""" else=""/> <$macrocall $name=".if" cond="""$suffix$""" -then="""[[suffix|Filter Step]]<<.place "$suffixName$:">> $suffix$""" +then="""[[suffix|Filter Step]]<<.place "$suffixName$">> = $suffix$""" else=""/> -[[parameter|Filter Parameter]]<$macrocall $name=".if" cond="""$paramName$""" then="<<.place '$paramName$:'>>" else=""/>$parameter$ +[[parameter|Filter Parameter]]<$macrocall $name=".if" cond="""$paramName$""" then="<<.place '$paramName$'>> = " else=""/>$parameter$ output$output$ <$macrocall $name=".if" cond="""$negationOutput$""" then="""`!` output$negationOutput$"""