From 172c7ef7ddc6ccdc78f1fa37bd82660f60e8b253 Mon Sep 17 00:00:00 2001 From: Astrid Elocson Date: Sun, 18 Jan 2015 18:39:00 +0000 Subject: [PATCH] Overhaul the filter operator documentation: part 1 --- .../tw5.com/tiddlers/commands/Commands.tid | 6 +- .../tiddlers/concepts/AbsoluteOperators.tid | 11 + .../tw5.com/tiddlers/concepts/DateFields.tid | 28 +++ .../tiddlers/concepts/DominantAppend.tid | 11 + .../tiddlers/concepts/FilterParameters.tid | 20 ++ .../tw5.com/tiddlers/concepts/Filters.tid | 12 +- .../tiddlers/concepts/ObservableLinks.tid | 20 ++ .../tw5.com/tiddlers/concepts/TiddlerSets.tid | 10 + .../tw5.com/tiddlers/concepts/TitleList.tid | 10 +- .../tw5.com/tiddlers/fields/ListField.tid | 5 +- .../filters/FilterOperator addprefix.tid | 23 ++- .../filters/FilterOperator addsuffix.tid | 23 ++- .../tiddlers/filters/FilterOperator after.tid | 29 ++- .../tiddlers/filters/FilterOperator all.tid | 41 ++-- .../filters/FilterOperator backlinks.tid | 23 ++- .../filters/FilterOperator before.tid | 27 ++- .../tiddlers/filters/FilterOperator bf.tid | 11 +- .../filters/FilterOperator butfirst.tid | 11 +- .../filters/FilterOperator butlast.tid | 22 +- .../filters/FilterOperator commands.tid | 20 +- .../tiddlers/filters/FilterOperator each.tid | 35 ++-- .../filters/FilterOperator eachday.tid | 29 ++- .../FilterOperator editiondescription.tid | 17 +- .../filters/FilterOperator editions.tid | 17 +- .../tiddlers/filters/FilterOperator field.tid | 32 ++- .../filters/FilterOperator fields.tid | 20 +- .../tiddlers/filters/FilterOperator first.tid | 22 +- .../tiddlers/filters/FilterOperator get.tid | 23 ++- .../tiddlers/filters/FilterOperator has.tid | 27 ++- .../tiddlers/filters/FilterOperator is.tid | 4 +- .../filters/FilterOperator modules.tid | 2 +- .../tiddlers/filters/FilterOperators.tid | 29 ++- .../tw5.com/tiddlers/filters/FilterSyntax.tid | 58 +++--- .../filters/Introduction to Filters.tid | 36 ++-- .../filters/dummies/Days of the Week.tid | 11 + .../tiddlers/filters/dummies/Friday.tid | 6 + .../tiddlers/filters/dummies/Monday.tid | 6 + .../tiddlers/filters/dummies/Saturday.tid | 6 + .../tiddlers/filters/dummies/Sunday.tid | 6 + .../tiddlers/filters/dummies/Thursday.tid | 13 ++ .../tiddlers/filters/dummies/Tuesday.tid | 6 + .../tiddlers/filters/dummies/Wednesday.tid | 6 + .../tiddlers/filters/examples/addprefix.tid | 7 + .../tiddlers/filters/examples/addsuffix.tid | 7 + .../tiddlers/filters/examples/after.tid | 10 + .../tw5.com/tiddlers/filters/examples/all.tid | 14 ++ .../tiddlers/filters/examples/backlinks.tid | 9 + .../tiddlers/filters/examples/before.tid | 10 + .../tiddlers/filters/examples/butlast.tid | 11 + .../tiddlers/filters/examples/commands.tid | 7 + .../tiddlers/filters/examples/each.tid | 10 + .../tiddlers/filters/examples/eachday.tid | 9 + .../tiddlers/filters/examples/field.tid | 8 + .../tiddlers/filters/examples/fields.tid | 8 + .../tiddlers/filters/examples/first.tid | 11 + .../tw5.com/tiddlers/filters/examples/get.tid | 8 + .../tw5.com/tiddlers/filters/examples/has.tid | 9 + editions/tw5.com/tiddlers/howtos/Tagging.tid | 4 +- .../tiddlers/releasenotes/Release 5.1.3.tid | 6 +- .../tiddlers/releasenotes/Release 5.1.5.tid | 4 +- .../tiddlers/releasenotes/Release 5.1.6.tid | 4 +- .../releasenotes/beta/Release 5.0.10beta.tid | 4 +- .../releasenotes/beta/Release 5.0.11beta.tid | 6 +- .../releasenotes/beta/Release 5.0.13beta.tid | 4 +- .../releasenotes/beta/Release 5.0.16beta.tid | 6 +- .../releasenotes/beta/Release 5.0.17beta.tid | 4 +- .../styleguide/Documentation Macros.tid | 191 +++++++++--------- .../styleguide/Documentation Style Guide.tid | 4 +- .../styleguide/Instruction Tiddlers.tid | 10 +- .../styleguide/Reference Tiddlers.tid | 12 +- .../tw5.com/tiddlers/styleguide/Spelling.tid | 5 +- .../styleguide/Technical Prose Style.tid | 5 +- .../tiddlers/styleguide/Tiddler Structure.tid | 1 + .../styleguide/Tiddler Title Policy.tid | 20 +- .../tiddlers/styleguide/Typography.tid | 3 +- .../tw5.com/tiddlers/system/doc-macros.tid | 66 +++--- .../tw5.com/tiddlers/system/doc-styles.tid | 50 ++++- .../tiddlers/system/operator-macros.tid | 60 ++++++ .../tiddlers/system/wikitext-macros.tid | 16 +- .../wikitext/Variables in WikiText.tid | 6 +- 80 files changed, 941 insertions(+), 462 deletions(-) create mode 100644 editions/tw5.com/tiddlers/concepts/AbsoluteOperators.tid create mode 100644 editions/tw5.com/tiddlers/concepts/DateFields.tid create mode 100644 editions/tw5.com/tiddlers/concepts/DominantAppend.tid create mode 100644 editions/tw5.com/tiddlers/concepts/FilterParameters.tid create mode 100644 editions/tw5.com/tiddlers/concepts/ObservableLinks.tid create mode 100644 editions/tw5.com/tiddlers/concepts/TiddlerSets.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Days of the Week.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Friday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Monday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Saturday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Sunday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Thursday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Tuesday.tid create mode 100644 editions/tw5.com/tiddlers/filters/dummies/Wednesday.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/addprefix.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/addsuffix.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/after.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/all.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/backlinks.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/before.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/butlast.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/commands.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/each.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/eachday.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/field.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/fields.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/first.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/get.tid create mode 100644 editions/tw5.com/tiddlers/filters/examples/has.tid create mode 100644 editions/tw5.com/tiddlers/system/operator-macros.tid diff --git a/editions/tw5.com/tiddlers/commands/Commands.tid b/editions/tw5.com/tiddlers/commands/Commands.tid index 4d79cb88e..fc95297db 100644 --- a/editions/tw5.com/tiddlers/commands/Commands.tid +++ b/editions/tw5.com/tiddlers/commands/Commands.tid @@ -1,6 +1,8 @@ +created: 20150117174359000 +modified: 20150117205257000 title: Commands -tags: Reference +tags: Concepts Reference -Commands are used with [[TiddlyWiki on Node.js|Using TiddlyWiki on Node.js]]. +A <<.def command>> is one of the following words, written with a `--` prefix and used as a command-line option to [[TiddlyWiki on Node.js]], indicating which action is desired. <> diff --git a/editions/tw5.com/tiddlers/concepts/AbsoluteOperators.tid b/editions/tw5.com/tiddlers/concepts/AbsoluteOperators.tid new file mode 100644 index 000000000..4c097d8f4 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/AbsoluteOperators.tid @@ -0,0 +1,11 @@ +created: 20150117204109000 +modified: 20150117204242000 +tags: Concepts +title: Absolute Operators +type: text/vnd.tiddlywiki + +The output of a filter step depends on its [[operator|Filter Operators]]: + +* Most operators perform <<.def relative>> to their input. They examine each input string in turn and filter out any that don't match. Such steps narrow down the output of a run. + +* <<.def Absolute>> operators ignore their input and generate an independent output instead. <<.olink title>> is an example: the result of `[title[A]title[B]]` is `B`. But the <<.olink field>> operator is relative, so the result of `[title[A]field:title[B]` is empty. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/DateFields.tid b/editions/tw5.com/tiddlers/concepts/DateFields.tid new file mode 100644 index 000000000..33eb37cb9 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/DateFields.tid @@ -0,0 +1,28 @@ +created: 20150117190213631 +modified: 20150117191804000 +tags: Concepts +title: Date Fields +type: text/vnd.tiddlywiki + +Certain [[fields|TiddlerFields]] of a tiddler are used to store dates and times. + +The two standard date fields are <<.field created>> and <<.field modified>>. + +Values of date fields are 17-character strings: + +* 4 digits for the year +* 2 digits for the month +* 2 digits for the day +* 2 digits for the hour +* 2 digits for the minute +* 2 digits for the second +* 3 digits for the millisecond + +To avoid problems arising from differences of time zone, TiddlyWiki always uses [[UTC|http://en.wikipedia.org/wiki/Coordinated_Universal_Time]]. + +As an example, the <<.field created>> field of this tiddler has the value <<.value """<$view field="created"/>""">>. + +Dates can be [[converted to other formats|DateFormat]] for display: + +<$macrocall $name="wikitext-example-without-html" +src="""<$view field="created" format="date" template="DDD DDth MMM YYYY"/>"""> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/DominantAppend.tid b/editions/tw5.com/tiddlers/concepts/DominantAppend.tid new file mode 100644 index 000000000..4b4bb9e3b --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/DominantAppend.tid @@ -0,0 +1,11 @@ +created: 20151714300000000 +modified: 20150117172438000 +tags: Concepts +title: Dominant Append +type: text/vnd.tiddlywiki + +A <<.def "dominant append">> is a frequent occurrence in [[filter|Filters]] processing. + +Filters manipulate sets of items in which no item can appear more than once, and they often append one such set to another. + +This is done in such a way that if the result would contain two copies of the same item, the <<.em earlier>> one is removed. The appended items thus dominate over any earlier duplicates. diff --git a/editions/tw5.com/tiddlers/concepts/FilterParameters.tid b/editions/tw5.com/tiddlers/concepts/FilterParameters.tid new file mode 100644 index 000000000..f6e08ef4b --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/FilterParameters.tid @@ -0,0 +1,20 @@ +created: 20151714300000000 +modified: 20150117193508000 +tags: Concepts +title: Filter Parameters +type: text/vnd.tiddlywiki + +The parameter to a [[filter operator|Filter Operators]] can be: + +;<<.def direct>> +: `[like this]` +: Literal, treated at face value +;<<.def indirect>> +:<<.def transcluded>> +:: `{like this}` +:: The value of a field of a specified tiddler, or the value of an index of a specified [[data tiddler|DataTiddlers]] +:<<.def variable>> +::`` +:: The value of the specified [[variable|Variables]] + +See [[Filter Syntax]]. diff --git a/editions/tw5.com/tiddlers/concepts/Filters.tid b/editions/tw5.com/tiddlers/concepts/Filters.tid index a380c49b9..988ad840d 100644 --- a/editions/tw5.com/tiddlers/concepts/Filters.tid +++ b/editions/tw5.com/tiddlers/concepts/Filters.tid @@ -1,5 +1,5 @@ -created: 20130827080000000= -modified: 20140912145347313 +created: 20130827080000000 +modified: 20150117193502000 tags: Reference Concepts title: Filters type: text/vnd.tiddlywiki @@ -7,7 +7,7 @@ list: [[Introduction to filter notation]] [[Filter Syntax]] You can think of TiddlyWiki as a database in which the records are tiddlers. A database typically provides a way of discovering which records match a given pattern, and in ~TiddlyWiki this is done with filters. -A <> is a concise notation for selecting a particular set of tiddlers, known as its <>. Whenever ~TiddlyWiki encounters a filter, it calculates the result. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them. +A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Tiddler Sets]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them. The following example passes a filter to the [[list-links macro|ListMacro]] to display a list of all tiddlers whose titles start with the letter H: @@ -15,11 +15,11 @@ The following example passes a filter to the [[list-links macro|ListMacro]] to d <> ``` -The result of a filter can change as tiddlers are added and deleted in the wiki. ~TiddlyWiki recalculates the results on the fly, automatically updating any filter-based counts or lists as well. +A filter's output can change as tiddlers are added and deleted in the wiki. ~TiddlyWiki recalculates on the fly, automatically updating any filter-based counts or lists as well. -[[Advanced Search|$:/AdvancedSearch]] has a <> tab that makes it easy to experiment with filters. +[[Advanced Search|$:/AdvancedSearch]] has a <<.advancedsearch-tab Filter>> tab that makes it easy to experiment with filters. ;Find out more: * [[Introduction to filter notation]] -- a step-by-step walkthrough * [[Filter Syntax]] -- the exact rules of the notation -* [[FilterOperators]] -- the available methods of filtering \ No newline at end of file +* [[Filter Operators]] -- the available methods of filtering diff --git a/editions/tw5.com/tiddlers/concepts/ObservableLinks.tid b/editions/tw5.com/tiddlers/concepts/ObservableLinks.tid new file mode 100644 index 000000000..076deeb2d --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/ObservableLinks.tid @@ -0,0 +1,20 @@ +created: 20130825202900000 +modified: 20150117152438000 +tags: Concepts +title: Observable Links +type: text/vnd.tiddlywiki + +An <<.def "observable link">> is a [[link|TiddlerLinks]] whose presence can be detected by a superficial examination of WikiText. + +A link is <<.em not>> observable if it is: + +* contained in text [[transcluded|Transclusion]] from elsewhere +* supplied via [[Macros]] or [[Variables]] +* generated by a <<.wlink LinkWidget>> widget whose `to` attribute is a transclusion, macro or variable + +Unobservable links are <<.em ignored>> by the link-related [[Filter Operators]]: + +* <<.olink backlinks>> +* <<.olink links>> +* <<.olink2 "all[missing]" all>> +* <<.olink2 "all[orphans]" all>> diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerSets.tid b/editions/tw5.com/tiddlers/concepts/TiddlerSets.tid new file mode 100644 index 000000000..bac6c370f --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/TiddlerSets.tid @@ -0,0 +1,10 @@ +created: 20150117152418000 +modified: 20150117165517000 +tags: Concepts +title: Tiddler Sets + +A <<.def "tiddler set">> is a data structure. It is an ordered collection of strings, usually tiddler titles, containing no duplicates. + +Tiddler sets are important in [[filter|Filters]] processing. + +The simplest way to generate one is to use the TitleList syntax. diff --git a/editions/tw5.com/tiddlers/concepts/TitleList.tid b/editions/tw5.com/tiddlers/concepts/TitleList.tid index 72d06900d..7c595da47 100644 --- a/editions/tw5.com/tiddlers/concepts/TitleList.tid +++ b/editions/tw5.com/tiddlers/concepts/TitleList.tid @@ -1,12 +1,14 @@ +created: 20150117152418000 +modified: 20150117163928000 tags: Concepts title: TitleList -A title list is a line of text that presents one or more tiddler titles, strung together with a space between each one and the next. +A <<.def "title list">> is a line of text that presents one or more tiddler titles, strung together with a space between each one and the next. -If a title //contains// a space, it needs double square brackets around it. - -Example: +If a title <<.em contains>> a space, it needs double square brackets around it: `GettingStarted [[Discover TiddlyWiki]] Upgrading` Title lists are used in various places, including PermaLinks and the ListField. + +They are in fact the simplest case of a [[filter|Filters]]. diff --git a/editions/tw5.com/tiddlers/fields/ListField.tid b/editions/tw5.com/tiddlers/fields/ListField.tid index 43d4a6d76..511f83e0a 100644 --- a/editions/tw5.com/tiddlers/fields/ListField.tid +++ b/editions/tw5.com/tiddlers/fields/ListField.tid @@ -1,10 +1,11 @@ created: 20130830092500000 -modified: 20140919155816993 +modified: 20150117163423000 tags: Fields title: ListField +caption: list type: text/vnd.tiddlywiki -The `list` [[field of a tiddler|TiddlerFields]] is an optional feature that can be used to help structure your content. It is defined as an ordered sequence of tiddler titles, and it can be used in several ways: +The `list` [[field of a tiddler|TiddlerFields]] is an optional feature that can be used to help structure your content. It is defined as an [[ordered sequence of tiddler titles|TitleList]], and it can be used in several ways: * The `list` field of a tiddler that is being used as a tag determines the ordering of the tiddlers that carry that tag - see [[Tagging]] for details * The `list` [[filter|Filters]] selects the entries from a list diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid index 48ac8129d..5b692b951 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid @@ -1,15 +1,16 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: addprefix -title: FilterOperator: addprefix +modified: 20150118182915000 +tags: [[Filter Operators]] [[String Operators]] +title: addprefix Operator type: text/vnd.tiddlywiki +caption: addprefix +purpose: extend each input item with a prefix -The ''addprefix'' filter operator add a prefix to all titles in the current list. +<<.operator-def +input:"a [[set|Tiddler Sets]] of strings" +parameter:"a prefix to be added" +paramName:"p" +output:"a copy of the input, but with the prefix added to the start of each string" +>> -For example: - -|!Filter String |!Description | -|`one two three +[addprefix[tid-]]` |Returns `tid-one`, `tid-two`, `tid-three` | - -See also [[FilterOperator: prefix]], [[FilterOperator: suffix]], [[FilterOperator: addsuffix]], [[FilterOperator: removeprefix]] and [[FilterOperator: removesuffix]]. +<<.operator-examples "addprefix">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid index ecd3748b7..24a11c26b 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid @@ -1,15 +1,16 @@ created: 20140828133830424 -modified: 20140902145613329 -tags: Filters -caption: addsuffix -title: FilterOperator: addsuffix +modified: 20150118182957000 +tags: [[Filter Operators]] [[String Operators]] +title: addsuffix Operator type: text/vnd.tiddlywiki +caption: addsuffix +purpose: extend each input item with a suffix -The ''addsuffix'' filter operator adds a suffix to all titles in the current list. +<<.operator-def +input:"a [[set|Tiddler Sets]] of strings" +parameter:"a suffix to be added" +paramName:"p" +output:"a copy of the input, but with the suffix added to the end of each string" +>> -For example: - -|!Filter String |!Description | -|`one two three +[addsuffix[-tid]]` |Returns `one-tid`, `two-tid`, `three-tid` | - -See also [[FilterOperator: suffix]], [[FilterOperator: prefix]], [[FilterOperator: addprefix]], [[FilterOperator: removesuffix]], and [[FilterOperator: removeprefix]]. +<<.operator-examples "addsuffix">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator after.tid b/editions/tw5.com/tiddlers/filters/FilterOperator after.tid index 76b37debb..0ac8a6a42 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator after.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator after.tid @@ -1,21 +1,18 @@ created: 20140512103123179 -modified: 20140512103123179 -tags: Filters -title: FilterOperator: after -caption: after +modified: 20150118183000000 +tags: [[Filter Operators]] [[List Operators]] +title: after Operator type: text/vnd.tiddlywiki +caption: after +purpose: get the successor of an input item -The ''after'' filter operator returns the tiddler from the current list that is after the tiddler named in the operand. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of strings" +parameter="one of those strings" +paramName="p" +output="the string that immediately follows <<.place p>> in the input set" +/> -The following examples assume a tiddler called `MyList` with a `list` field containing: +If <<.place p>> is not present in the input set, or is the last item, then the output is empty. -``` -one two three four five -``` - -|!Filter String |!Description | -|`[list[MyList]after[two]]` |Returns `three` | -|`[list[MyList]after[five]]` |Returns an empty list | -|`[list[MyList]after{!!title}]` |Returns `five` if the current tiddler is `four` | - -See also [[FilterOperator: before]], [[FilterOperator: previous]] and [[FilterOperator: next]]. +<<.operator-examples "after">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid index b1781aede..327e179eb 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid @@ -1,22 +1,33 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -title: FilterOperator: all -caption: all +modified: 20150118183004000 +tags: [[Filter Operators]] [[Common Operators]] [[Absolute Operators]] [[Link Operators]] +title: all Operator type: text/vnd.tiddlywiki +caption: all +purpose: get all tiddlers of a basic category -The ''all'' filter operator is used to select combinations of lists of tiddlers for subsequent operations. +<$macrocall $name=".operator-def" +input="ignored, unless <<.place p>> is empty" +parameter="see below" +paramName="p" +output="the [[set|Tiddler Sets]] of tiddler titles that belong to one or more basic categories" +/> -The operand of the ''all'' operator is a list of names of tiddler sources joined with `+`. +The parameter specifies categories using the following syntax: -For example: +<$railroad text=""" +[{: ("current" | "missing" |: "orphans" | "shadows" | "tiddlers" ) +"+" }] +"""/> -|!Filter String |!Description | -|`[all[tiddlers]]` |Selects all 'real' tiddlers (both system and non-system), excluding shadow tiddlers | -|`[all[shadows]]` |Selects all ShadowTiddlers, including those that have been overridden with real tiddlers | -|`[all[shadows+tiddlers]]` |Selects all ShadowTiddlers and all 'real' tiddlers together | -|`[all[current]]` |Selects the current tiddler | -|`[all[missing]]` |Selects all MissingTiddlers | -|`[all[orphans]]` |Selects all OrphanTiddlers | -|`[all[]]` |Selects all the source tiddlers available to the filter | +|!Category |!Members |!Sorted | +|^`current`|just the [[current tiddler|CurrentTiddler]]|^--| +|^`missing`|all non-existent tiddlers to which there is at least one [[observable link|Observable Links]]|^no| +|^`orphans`|all tiddlers to which there are <<.em no>> observable links|^by title| +|^`shadows`|all the [[shadow tiddlers|ShadowTiddlers]] that exist, including any that have been overridden with non-shadow tiddlers|^no| +|^`tiddlers`|all the non-shadow tiddlers that exist|no| +If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each parameter's output is [[dominantly appended|Dominant Append]] to it in turn. + +As a special case, if there is no parameter, the output is simply a copy of the input. This can be useful when the parameter is [[supplied indirectly|Filter Parameters]]. + +<<.operator-examples "all">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid b/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid index 39141fc06..7e47e73ef 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid @@ -1,16 +1,17 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: backlinks -title: FilterOperator: backlinks +modified: 20150118183008000 +tags: [[Filter Operators]] [[Link Operators]] +title: backlinks Operator type: text/vnd.tiddlywiki +caption: backlinks +purpose: get the tiddlers that link to each input tiddler -The ''backlinks'' filter operator replaces the current list with a list of the non-system tiddlers that link to them. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="none" +output="the titles of any non-system tiddlers that contain [[Observable Links]] to the input tiddlers" +/> -For example: - -|!Filter String |!Description | -|`[[HelloThere]backlinks[]]` |Selects all tiddlers that contain links to the tiddler `HelloThere` | -|`[tag[Personal]backlinks[]]` |Selects all tiddlers that contain links to tiddlers tagged `Personal` | -|`[all[current]backlinks[]]` |Selects all tiddlers that contain links to the current tiddler | +Each input tiddler is processed in turn. Its corresponding set of backlinks is generated, sorted by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output. +<<.operator-examples "backlinks">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator before.tid b/editions/tw5.com/tiddlers/filters/FilterOperator before.tid index aa6fc4888..5c8016779 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator before.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator before.tid @@ -1,21 +1,18 @@ created: 20140512103123179 -modified: 20140512103123179 -tags: Filters +modified: 20150118183011000 +tags: [[Filter Operators]] [[List Operators]] caption: before -title: FilterOperator: before +title: before Operator type: text/vnd.tiddlywiki +purpose: get the predecessor of an input item -The ''before'' filter operator returns the tiddler from the current list that is before the tiddler named in the operand. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of strings" +parameter="one of those strings" +paramName="p" +output="the string that immediately precedes <<.place p>> in the input set" +/> -The following examples assume a tiddler called `MyList` with a `list` field containing: +If <<.place p>> is not present in the input set, or is the first item, then the output is empty. -``` -one two three four five -``` - -|!Filter String |!Description | -|`[list[MyList]before[two]]` |Returns `one` | -|`[list[MyList]before[one]]` |Returns an empty list | -|`[list[MyList]before{!!title}]` |Returns `three` if the current tiddler is `four` | - -See also [[FilterOperator: after]], [[FilterOperator: previous]] and [[FilterOperator: next]]. +<<.operator-examples "before">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid b/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid index 17056f1b2..e2a40de87 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid @@ -1,8 +1,9 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: bf -title: FilterOperator: bf +modified: 20150118182927000 +tags: [[Filter Operators]] [[List Operators]] +title: bf Operator type: text/vnd.tiddlywiki +caption: bf +purpose: same as <<.op rest>> -The ''bf'' filter operator is a synonym for [[FilterOperator: rest]]. +<<.op bf>> is a synonym for <<.olink rest>>, also known as <<.olink butfirst>>. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid b/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid index f4d356f1c..e4544fb01 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid @@ -1,8 +1,9 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: butfirst -title: FilterOperator: butfirst +modified: 20150118183016000 +tags: [[Filter Operators]] [[Sequence Operators]] +title: butfirst Operator type: text/vnd.tiddlywiki +caption: butfirst +purpose: same as <<.op rest>> -The ''butfirst'' filter operator is a synonym for [[FilterOperator: rest]]. +<<.op butfirst>> is a synonym for <<.olink rest>>, also known as <<.olink bf>>. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid b/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid index 8e438c9b2..e4b297642 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid @@ -1,14 +1,16 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: butlast -title: FilterOperator: butlast +modified: 20150118183022000 +tags: [[Filter Operators]] [[Sequence Operators]] +title: butlast Operator type: text/vnd.tiddlywiki +caption: butlast +purpose: get all the but last <<.place n>> input items -Without an operand, the ''butlast'' filter operator returns all but the last entry in the current list. The optional operand specifies the number of entries to omit. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of strings" +parameter="an integer, defaulting to 1" +paramName="n" +output="all but the last <<.place n>> strings from the input set" +/> -For example: - -|!Filter String |!Description | -|`one two three four five +[butlast[]]` |Returns `one`, `two`, `three`, `four` | -|`one two three four five +[butlast[2]]` |Returns `one`, `two`, `three` | +<<.operator-examples "butlast">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid b/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid index cc40f17a1..ae55ecbbe 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid @@ -1,14 +1,16 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: commands -title: FilterOperator: commands +modified: 20150118183026000 +tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Absolute Operators]] +title: commands Operator type: text/vnd.tiddlywiki +caption: commands +purpose: get all the Node.js commands -The ''commands'' filter operator replaces the current list with a list of the available commands (see the HelpCommand for details). +<$macrocall $name=".operator-def" +input="ignored" +parameter="none" +output="the set of [[commands|Commands]] that can be given to [[TiddlyWiki on Node.js]]" +/> -For example: - -|!Filter String |!Description | -|`[commands[]]` |Returns a list of the available command names | +<<.operator-examples "commands">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator each.tid b/editions/tw5.com/tiddlers/filters/FilterOperator each.tid index 0645a1946..2dc69b024 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator each.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator each.tid @@ -1,27 +1,18 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: each -title: FilterOperator: each +modified: 20150118183030000 +tags: [[Filter Operators]] [[Group Operators]] +title: each Operator type: text/vnd.tiddlywiki +caption: each +purpose: get one of each group of input tiddlers by field value -The ''each'' filter operator filters the current list to leave only the first tiddler with each distinct value for a specified field. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="the name of a [[field|TiddlerFields]]" +paramName="f" +output="a set containing the first tiddler with each distinct value for field <<.place f>>" +/> -For example: +Each input tiddler is processed in turn. The value of field <<.place f>> in that tiddler is examined, and as long as the value has not been encountered before, the tiddler's title is appended to the output set. -|!Filter String |!Description | -|`[all[tiddlers]sort[title]each[type]]` |Returns a list of the first tiddler with each distinct ''type'' field | - -The ''each'' operator can be used to group tiddlers. For example, the following example creates a list of tiddlers split into types: - -<$list filter="[!is[system]has[type]!type[text/vnd.tiddlywiki]each[type]sort[type]]"> -
- -! <$view field="type"/> -<$list filter="[type{!!type}!is[system]sort[title]]"> -
-<$link to={{!!title}}><$view field="title"/> -
- -
- +<<.operator-examples "each">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid b/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid index f5002b5b7..4800f8b07 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid @@ -1,21 +1,18 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: eachday -title: FilterOperator: eachday +modified: 20150118183035000 +tags: [[Filter Operators]] [[Group Operators]] +title: eachday Operator type: text/vnd.tiddlywiki +caption: eachday +purpose: get one of each group of input tiddlers by date -The ''eachday'' filter operator filters the current list to leave only the first tiddler that has a distinct value for a specified date field. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="the name of a [[date field|DateFields]]" +paramName="f" +output="a set containing the first tiddler with each distinct value (ignoring time of day) for field <<.place f>>" +/> -For example: +Each input tiddler is processed in turn. The value of field <<.place f>> in that tiddler is examined, and as long as this indicates a day that has not been encountered before, the tiddler's title is appended to the output set. -|!Filter String |!Description | -|`[eachday[created]]` |Returns a list of the first tiddler created on each distinct day | - -The ''eachday'' operator can be used to group tiddlers. For example, the following wiki text creates a list of the number of tiddlers that were modified on each day: - -<$list filter="[!is[system]eachday[modified]!sort[modified]]"> - -<$view field="modified" format="date" template="DD MMM YYYY"/>: <$count filter="[sameday{!!modified}]"/> modifications - - +<<.operator-examples "eachday">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid b/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid index 686de3d28..55c0c6d05 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid @@ -1,10 +1,15 @@ created: 20150111145738451 -modified: 20150111145738451 -tags: Filters -caption: editiondescription -title: FilterOperator: editiondescription +modified: 20150118183039000 +tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Node.js Operators]] +title: editiondescription Operator type: text/vnd.tiddlywiki +caption: editiondescription +purpose: get the descriptions of the input ~TiddlyWiki editions -The ''editiondescription'' filter operator returns a description string for each edition name in the current results. It is only available under Node.js. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of ~TiddlyWiki edition names" +parameter="none" +output="the description string of each edition in the input" +/> -Also see [[FilterOperator: editions]]. +<<.node-only-operator>> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid b/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid index 5dfa3b7d0..455ea99be 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid @@ -1,8 +1,15 @@ created: 20150111145738451 -modified: 20150111145738451 -tags: Filters -caption: editions -title: FilterOperator: editions +modified: 20150118183042000 +tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Node.js Operators]] [[Absolute Operators]] +title: editions Operator type: text/vnd.tiddlywiki +caption: editions +purpose: get the names of all ~TiddlyWiki editions -The ''editions'' filter operator returns the names of all the available editions. It is only available under Node.js. +<$macrocall $name=".operator-def" +input="none" +parameter="none" +output="the name of each ~TiddlyWiki edition, in alphabetical order" +/> + +<<.node-only-operator>> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid index 3c80f59b9..8ac452321 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid @@ -1,16 +1,28 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: field -title: FilterOperator: field +modified: 20150118183046000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] +title: field Operator type: text/vnd.tiddlywiki +caption: field +purpose: filter the input tiddlers by field value -The ''field'' filter operator filters the current list according to whether a field matches a specified value. +<$macrocall $name=".operator-def-suffix" +input="a [[set|Tiddler Sets]] of tiddler titles" +suffix="the name of a field" +suffixName="f" +parameter="a potential value for field <<.place f>>" +paramName="p" +output="the subset of the input tiddlers in which field <<.place f>> has the value <<.place p>>" +/> -The operand is the value to match, and the suffix is used to identify the field. For example: +If <<.place p>> is empty, <<.op field>> will match both of the following: -|!Filter String |!Description | -|`[field:modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` | -|`[modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` | +* tiddlers that don't contain field <<.place f>> +* tiddlers in which field <<.place f>> exists but has an empty value -Note that if an unknown filter operator `[unknown[xxx]]` is encountered it is interpreted as `[field:unknown[xxx]]`. +;Negation +: `!field` outputs the subset of the input tiddlers in which field <<.place f>> does <<.em not>> have the value <<.place p>>. + +The [[Filter Syntax]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.olink field>> operator. See the second example below. + +<<.operator-examples "field">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid index 9434bf6f9..59854b39f 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid @@ -1,13 +1,17 @@ -caption: fields created: 20140924115616653 -modified: 20141002150019737 -tags: Filters -title: FilterOperator: fields +modified: 20150118183051000 +tags: [[Filter Operators]] [[Field Operators]] +title: fields Operator type: text/vnd.tiddlywiki +caption: fields +purpose: get all fields of the input tiddlers -The ''fields'' filter operator returns the names of all the fields used in the currently selected tiddlers. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="none" +output="the [[set|Tiddler Sets]] of all field names contained in the input tiddlers" +/> -|!Filter String |!Description | -|`[[HelloThere]fields[]]` |Returns the fields present in the tiddler `HelloThere` | -|`[tag[myTag]fields[]]` |Returns the aggregate of all the fields present on tiddlers that have the tag `myTag` | +Each input item is processed in turn. Its set of field names is retrieved (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output. +<<.operator-examples "fields">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator first.tid b/editions/tw5.com/tiddlers/filters/FilterOperator first.tid index 5d497cd69..01f18a989 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator first.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator first.tid @@ -1,14 +1,16 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: first -title: FilterOperator: first +modified: 20150118183055000 +tags: [[Filter Operators]] [[List Operators]] +title: first Operator type: text/vnd.tiddlywiki +caption: first +purpose: get the first <<.place n>> input items -The ''first'' filter operator returns the first entries in the current list. The optional operand specifies the number of entries to return. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of strings" +parameter="an integer, defaulting to 1" +paramName="n" +output="the first <<.place n>> items from the input set" +/> -For example: - -|!Filter String |!Description | -|`one two three +[first[]]` |Returns `one` | -|`one two three +[first[2]]` |Returns `one`, `two` | +<<.operator-examples "first">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator get.tid b/editions/tw5.com/tiddlers/filters/FilterOperator get.tid index 51a000efa..e7001bd62 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator get.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator get.tid @@ -1,13 +1,20 @@ created: 20140426183123179 -modified: 20140426183123179 -tags: Filters -caption: get -title: FilterOperator: get +modified: 20150118183058000 +tags: [[Filter Operators]] [[Field Operators]] +title: get Operator type: text/vnd.tiddlywiki +caption: get +purpose: get the values of a field from all input tiddlers -The ''get'' filter operator replaces the titles of the tiddlers in the current list with the values of the field specified by the operand. +<$macrocall $name=".operator-def" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="the name of a [[field|TiddlerFields]]" +paramName="f" +output="the values of field <<.place f>> in each of the input tiddlers" +/> -For example: +Each input tiddler is processed in turn. If the tiddler contains field <<.place f>>, and the value of this field is not empty, then its value is appended to the output. -|!Filter String |!Description | -|`[all[current]get[draft.of]]` |If the current tiddler is a draft, returns the original tiddler, otherwise returns an empty list | +Unlike most other [[Filter Operators]], the output of <<.op get>> can contain duplicates. + +<<.operator-examples "get">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator has.tid b/editions/tw5.com/tiddlers/filters/FilterOperator has.tid index 245f536b4..2c766cfa7 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator has.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator has.tid @@ -1,14 +1,25 @@ created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: has -title: FilterOperator: has +modified: 20150118183102000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] +title: has Operator type: text/vnd.tiddlywiki +caption: has +purpose: filter the input tiddlers by field existence -The ''has'' filter operator chooses tiddlers from the current list that have a non-empty value for the field specified in the operand. +<$macrocall $name=".operator-def" +syntax="has[f]" +input="a [[set|Tiddler Sets]] of tiddler titles" +parameter="the name of a field" +paramName="f" +output="the subset of the input tiddlers that have a value in field <<.place f>>" +/> -For example: +<<.op has>> filters out both of the following: -|!Filter String |!Description | -|`[has[modifier]]` |Returns tiddlers that have a `modifier` field | +* tiddlers that don't contain field <<.place f>> +* tiddlers in which field <<.place f>> exists but has an empty value +;Negation +: `!has` outputs the subset of the input tiddlers in which field <<.place f>> does <<.em not>> exist or does not have the value <<.place p>>. + +<<.operator-examples "has">> diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator is.tid b/editions/tw5.com/tiddlers/filters/FilterOperator is.tid index 19408c84b..2e9a21e15 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator is.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator is.tid @@ -1,8 +1,8 @@ created: 20140410103123179 -modified: 20140418103123179 +modified: 20150118182931000 tags: Filters CommonFilters caption: is -title: FilterOperator: is +title: is Operator type: text/vnd.tiddlywiki The ''is'' filter operator selects tiddlers from the current list according to their membership of the category specified in the operand: diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid b/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid index abc97a4d8..a54d1b2c0 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid @@ -1,5 +1,5 @@ created: 20140410103123179 -modified: 20140410103123179 +modified: 20150118182943000 tags: Filters caption: modules title: FilterOperator: modules diff --git a/editions/tw5.com/tiddlers/filters/FilterOperators.tid b/editions/tw5.com/tiddlers/filters/FilterOperators.tid index 800d635d5..b81cb949c 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperators.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperators.tid @@ -1,17 +1,24 @@ created: 20140410103123179 -modified: 20141007213204936 -tags: Concepts -title: FilterOperators +modified: 20150118180311000 +tags: Concepts Filters +title: Filter Operators type: text/vnd.tiddlywiki -A <> is a predefined name attached to an individual step in a [[filter|Filters]]. It defines how that step is to be performed. +A <<.def "filter operator">> is a predefined name attached to an individual step in a [[filter|Filters]]. It defines the particular action of that step. -A typical step is written as `[operator[parameter]]`, although not all of the operators need a parameter. + + + + + + +<$list filter="[tag[Filter Operators]]"> + + + + +
OperatorPurposeCommon
<$link to={{!!title}}>{{!!caption}}{{!!purpose}}<$list filter="[all[current]tag[Common Operators]]">{{$:/core/images/done-button}}
-Here are the most commonly used operators: +A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameters]]. -<> - -The complete list is: - -<> +Most steps operate on a set of input items. For the exact rules, see [[Filter Syntax]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterSyntax.tid b/editions/tw5.com/tiddlers/filters/FilterSyntax.tid index 9919467fd..09c3e1126 100644 --- a/editions/tw5.com/tiddlers/filters/FilterSyntax.tid +++ b/editions/tw5.com/tiddlers/filters/FilterSyntax.tid @@ -1,36 +1,36 @@ created: 20140210141217955 -modified: 20150102174633890 +modified: 20150117204215000 tags: Filters title: Filter Syntax type: text/vnd.tiddlywiki -:([[Filters]] follow a grammar that is presented here, using [[RailroadDiagrams]], for those who find formal syntax descriptions helpful. However, [[you can learn to write filters|Introduction to filter notation]] without needing to understand this tiddler.) +<<.preamble """[[Filters]] follow a grammar that is presented here, using [[RailroadDiagrams]], for those who find formal syntax descriptions helpful. However, you can [[learn to write filters|Introduction to filter notation]] without needing to understand this tiddler.""">> -A <> is an expression whose value is an ordered set of items known as its <>. No item can appear more than once in the result. The items are usually tiddler titles, but certain specialised filter steps produce other items, such as field names. +A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets|Tiddler Sets]] of strings, usually tiddler titles. -A filter is a sequence of zero or more ''runs'', and each run is a sequence of one or more ''steps''. Each step and each run produces its own intermediate result. +Filters are built from smaller pieces, called ''runs'' and ''steps'', each of which also transforms an input to an output. --- ;filter : <$railroad text=""" -[{ : [:whitespace] ("+" | :- | "-") run }] +[{: [:whitespace] ("+"|:-|"-") run }] """/> -A filter starts with an empty result. The runs are processed from left to right, progressively modifying the result. +A filter starts with an empty output. Its runs are processed from left to right, progressively modifying the output. -Each run receives a <> set from which to select items. This is normally the set of all tiddlers in the wiki, in the order they happen to be stored there, but it can be changed by prefixing a run with `+`. +A run's input is normally the set of all tiddler titles in the wiki (in no particular order), but the `+` prefix can change this. -* If the run has no `+` or `-` prefix, the items in its result are <> to the filter's result. If this leaves the filter's result containing two copies of the same item, the earlier one is removed. -* If the run has a `-` prefix, the items in its result are <> from the filter's result if they were present there. -* If the run has a `+` prefix, it receives the filter's current result as its source set. The filter's result is then completely <> by the run's result. Any subsequent run reverts to receiving all tiddlers as its source set, unless it too has a `+` prefix. +* If a run has no `+` or `-` prefix, its output strings are [[dominantly appended|Dominant Append]] to the filter's output. +* If a run has a `-` prefix, its output strings are <<.em removed>> from the filter's output (if they were present). +* If a run has a `+` prefix, it receives the filter's output so far as its input. The filter's output is then completely <<.em replaced>> by the run's output. Any subsequent run reverts to receiving all tiddler titles as its input, unless it too has a `+` prefix. In concise technical terms: -|!Run |!Interpretation |!Result | -|`run` |union of sets|result OR run | -|`+run` |intersection of sets |result AND run | -|`-run` |difference of sets|result AND NOT run | +|!Run |!Interpretation |!Output | +|`run` |union of sets |... OR run | +|`+run` |intersection of sets |... AND run | +|`-run` |difference of sets |... AND NOT run | --- @@ -46,34 +46,22 @@ In concise technical terms: ) """/> -The steps of a run are processed from left to right. Each step receives a source set. For the first step, this is the run's source set. For each subsequent step, the source is the result of the previous step. +The steps of a run are processed from left to right. The input to the first step is same as the input to the run. For each subsequent step, the input is the output of the previous step. -The result of a run depends on the operator involved: +{{Absolute Operators}} -* Most operators are <>. They examine each item in their source set and discard any that don't match. Such steps serve to narrow down the result of their run. -* A few operators, called <>, ignore the source they're given and generate an independent result instead. `title` is a good example. The result of `[title[A]title[B]]` is `B`. But `field` is a filterer, so the result of `[title[A]field:title[B]` is empty. - -The lower three options in the diagram match items like `HelloThere`, `"HelloThere"` and `'HelloThere'`, and are short for `[title[HelloThere]]`. The two quoted options exist to support titles that contain square brackets, such as `"An [[[[Unusual]]]] Tiddler"`. +The lower three options in the diagram match `HelloThere`, `"HelloThere"` and `'HelloThere'`, and are short for `[title[HelloThere]]`. The two quoted options exist to support titles that contain square brackets: `"An [[[[Unusual]]]] Tiddler"`. --- ;step : <$railroad text=""" -[:"!"] [:method] parameter +[:"!"] [:operator [:":" suffix] ] parameter """/> -If a step's method is omitted, it defaults to `title`. +The <<.def operator>> is drawn from a list of [[predefined names|Filter Operators]], which can be extended by plugins. Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator. If a step's operator is omitted altogether, it defaults to `title`. ---- - -;method -: <$railroad text=""" -operator [:":" suffix] -"""/> - -The operator is drawn from a list of [[predefined names|FilterOperators]]. If it can't be found in that list, it is instead treated as the suffix to the <> operator. - -The suffix is additional information, usually the name of a [[field|TiddlerFields]], that extends the meaning of certain operators. +The <<.def suffix>> is additional text, usually the name of a [[field|TiddlerFields]], that extends the meaning of certain operators. --- @@ -87,8 +75,8 @@ The suffix is additional information, usually the name of a [[field|TiddlerField ) """/> -* `[`...`]` encloses a literal parameter -* `{`...`}` encloses a TextReference parameter +* `[`...`]` encloses a direct parameter +* `{`...`}` encloses a transcluded parameter * `<`...`>` encloses a [[variable|Variables]] parameter --- @@ -96,4 +84,4 @@ The suffix is additional information, usually the name of a [[field|TiddlerField ;whitespace : <$railroad text=""" {( "space" | "tab" | "linefeed" | "return" | "vertical tab" | "formfeed" )} -"""/> \ No newline at end of file +"""/> diff --git a/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid index 2ebc691b9..532f9f6f5 100644 --- a/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid +++ b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid @@ -1,12 +1,12 @@ created: 20140410101941871 -modified: 20141009180223576 +modified: 20150117180519000 tags: Learning Filters title: Introduction to filter notation type: text/vnd.tiddlywiki -:(This explains the basics of writing a [[filter|Filters]] to select a set of tiddlers. For a more technical summary, see [[Filter Syntax]].) +<<.preamble """This explains the basics of writing a [[filter|Filters]] to select a set of tiddlers. For a more technical summary, see [[Filter Syntax]].)""">> -The simplest case is where you already know exactly which tiddlers you want. Type each title in double square brackets, with a space or linebreak between each one and the next: +The simplest case is where you already know exactly which tiddlers you want. Type each title in double square brackets, with a space between each one and the next: ``` [[Recipe book]] [[ScrambledEggs]] [[Mom's apple pie]] @@ -22,22 +22,22 @@ You can omit the square brackets when a title doesn't contain any spaces: The double square brackets are actually a shorthand for this: ``` -[title[Scrambled eggs]] +[title[ScrambledEggs]] ``` -… which gives us the <> for any filter: +... which gives us the <<.def "general model">> for any filter: ``` -[method[parameter]] +[operator[parameter]] ``` -For instance, here's how to select all the tiddlers that have been tagged <>: +For instance, here's how to select all the tiddlers that have been tagged <<.tag Recipe>>: ``` [tag[Recipe]] ``` -We can reverse the meaning by adding an exclamation mark `!` just before the method. For example, we can select any tiddlers that do <> have the <> tag: +We can reverse the meaning by adding an exclamation mark `!` just before the operator. For example, we can select any tiddlers that do <<.em not>> have the <<.tag Recipe>> tag: ``` [!tag[Recipe]] @@ -49,9 +49,9 @@ Tiddlers can be filtered by other fields than just title and tags: [field:serving[4]] ``` -That example will select any tiddlers that have <> in their <> field. +That example will select any tiddlers that have <<.value 4>> in their <<.field serving>> field. -As the word "serving" isn't a standard filter method (and isn't likely to become one), you can safely omit the `field:` prefix: +As the word "serving" isn't a standard filter operator (and isn't likely to become one), you can safely omit the `field:` prefix: ``` [serving[4]] @@ -59,7 +59,7 @@ As the word "serving" isn't a standard filter method (and isn't likely to become !Combinations -The filters we've looked at so far have involved just one step each. But you can <> several steps together like this: +The filters we've looked at so far have involved just one step each. But you can <<.def run>> several steps together like this: ``` [tag[Vegetarian]!tag[soup]serving[4]] @@ -67,9 +67,9 @@ The filters we've looked at so far have involved just one step each. But you can Notice how the entire run is contained in a single pair of square brackets. -A tiddler has to match <> of the steps in a run. So the example above retrieves vegetarian recipes (other than soups) for 4 people. +A tiddler has to match <<.em all>> of the steps in a run. So the example above retrieves vegetarian recipes (other than soups) for 4 people. -A <> of runs will select the tiddlers that match <> of the runs. We can use this to find recipes that serve either 3, 4 or 5 people: +A sequence of separate runs will select the tiddlers that match <<.em any>> of the runs. We can use this to find recipes that serve either 3, 4 or 5 people: ``` [serving[3]] [serving[4]] [serving[5]] @@ -87,9 +87,9 @@ By default, each run considers every tiddler in the wiki. But we can use a `+` s [serving[3]] [serving[4]] [serving[5]] +[tag[Vegetarian]] +[sort[title]] ``` -This selects recipes for 3, 4 or 5 people, then filters <> to remove the vegetarian ones, and finally sorts any that are left into alphabetical order of title. +This selects recipes for 3, 4 or 5 people, then filters <<.em those>> to remove the vegetarian ones, and finally sorts any that are left into alphabetical order of title. -In a similar way, we can use a `-` sign to <> a run's tiddlers from the result so far. Here we select all vegetarian recipes apart from two: +In a similar way, we can use a `-` sign to <<.em remove>> a run's tiddlers from the result so far. Here we select all vegetarian recipes apart from two: ``` [tag[Vegetarian]] -[title[ScrambledEggs]] -BeansOnToast @@ -99,7 +99,7 @@ In a similar way, we can use a `-` sign to <> a run's tiddlers fr The parameter of each step we've seen so far has been in square brackets, meaning that ~TiddlyWiki treats it literally. But two other kinds of bracket are possible: -<> `{}` mean that the parameter is a TextReference, and that its value is to be looked up in a specified tiddler. For example, if we have a tiddler called <> whose text happens to be the word <>, we can say +<<.def "Curly brackets">> `{}` mean that the parameter is a TextReference, and that its value is to be looked up in a specified tiddler. For example, if we have a tiddler called <<.tid Preference>> whose text happens to be the word <<.value Vegetarian>>, we can say ``` [tag{Preference}] @@ -107,8 +107,8 @@ The parameter of each step we've seen so far has been in square brackets, meanin as an alternative to `[tag[Vegetarian]]`. This allows the preference to change over time. -<> `<>` mean that the parameter is the name of a [[variable|Variables]] whose value is to be used instead. Here we use the built-in <> variable in a filter that selects any tiddlers whose text contains the title of the current one: +<<.def "Angle brackets">> `<>` mean that the parameter is the name of a [[variable|Variables]] whose value is to be used instead. Here we use the built-in <<.clink currentTiddler "WidgetVariable: currentTiddler">> variable in a filter that selects any tiddlers whose text contains the title of the current one: ``` [search] -``` \ No newline at end of file +``` diff --git a/editions/tw5.com/tiddlers/filters/dummies/Days of the Week.tid b/editions/tw5.com/tiddlers/filters/dummies/Days of the Week.tid new file mode 100644 index 000000000..edb5514b6 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Days of the Week.tid @@ -0,0 +1,11 @@ +created: 20150117192110000 +modified: 20150118132010000 +title: Days of the Week +type: text/vnd.tiddlywiki +list: Monday Tuesday Wednesday Thursday Friday Saturday Sunday + +<<.this-is-operator-example>> + +It has a <<.field list>> field containing the following items: + +<> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Friday.tid b/editions/tw5.com/tiddlers/filters/dummies/Friday.tid new file mode 100644 index 000000000..b9acc6a27 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Friday.tid @@ -0,0 +1,6 @@ +created: 20150117192111000 +modified: 20150118131534000 +title: Friday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Monday.tid b/editions/tw5.com/tiddlers/filters/dummies/Monday.tid new file mode 100644 index 000000000..3ee569c03 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Monday.tid @@ -0,0 +1,6 @@ +created: 20150117192113000 +modified: 20150118131645000 +title: Monday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Saturday.tid b/editions/tw5.com/tiddlers/filters/dummies/Saturday.tid new file mode 100644 index 000000000..a9c439903 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Saturday.tid @@ -0,0 +1,6 @@ +created: 20151620490000000 +modified: 20150118131537000 +title: Saturday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Sunday.tid b/editions/tw5.com/tiddlers/filters/dummies/Sunday.tid new file mode 100644 index 000000000..0817e2708 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Sunday.tid @@ -0,0 +1,6 @@ +created: 20150117192115000 +modified: 20150118131539000 +title: Sunday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Thursday.tid b/editions/tw5.com/tiddlers/filters/dummies/Thursday.tid new file mode 100644 index 000000000..ba051a8a8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Thursday.tid @@ -0,0 +1,13 @@ +created: 20150117192116000 +modified: 20150118131552000 +title: Thursday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> + +! <<.olink before>> and <<.olink after>> + +<<.using-days-of-week>> + +<<.operator-example "[list[Days of the Week]before{!!title}]">> +<<.operator-example "[list[Days of the Week]after{!!title}]">> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Tuesday.tid b/editions/tw5.com/tiddlers/filters/dummies/Tuesday.tid new file mode 100644 index 000000000..5d5fc90df --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Tuesday.tid @@ -0,0 +1,6 @@ +created: 20150117192118000 +modified: 20150118131558000 +title: Tuesday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/dummies/Wednesday.tid b/editions/tw5.com/tiddlers/filters/dummies/Wednesday.tid new file mode 100644 index 000000000..2fc54e6bd --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/dummies/Wednesday.tid @@ -0,0 +1,6 @@ +created: 20150117192119000 +modified: 20150118131707000 +title: Wednesday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> diff --git a/editions/tw5.com/tiddlers/filters/examples/addprefix.tid b/editions/tw5.com/tiddlers/filters/examples/addprefix.tid new file mode 100644 index 000000000..78d97d2c4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/addprefix.tid @@ -0,0 +1,7 @@ +created: 20150118132851000 +modified: 20150118183116000 +tags: [[addprefix Operator]] [[Operator Examples]] +title: addprefix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "Cat Garden [[Favourite Armchair]] +[addprefix[My ]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/addsuffix.tid b/editions/tw5.com/tiddlers/filters/examples/addsuffix.tid new file mode 100644 index 000000000..490ff945b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/addsuffix.tid @@ -0,0 +1,7 @@ +created: 20150118134542000 +modified: 20150118183121000 +tags: [[addsuffix Operator]] [[Operator Examples]] +title: addsuffix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[London]addsuffix[ Underground]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/after.tid b/editions/tw5.com/tiddlers/filters/examples/after.tid new file mode 100644 index 000000000..c594326df --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/after.tid @@ -0,0 +1,10 @@ +created: 20150118134611000 +modified: 20150118183126000 +tags: [[after Operator]] [[Operator Examples]] +title: after Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> The [[Thursday]] tiddler shows a further example. + +<<.operator-example 1 "[list[Days of the Week]after[Monday]]">> +<<.operator-example 2 "[list[Days of the Week]after[Sunday]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/all.tid b/editions/tw5.com/tiddlers/filters/examples/all.tid new file mode 100644 index 000000000..f2e079a52 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/all.tid @@ -0,0 +1,14 @@ +created: 20150118134646000 +modified: 20150118183130000 +tags: [[all Operator]] [[Operator Examples]] +title: all Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[all[shadows]]">> +<<.operator-example 2 "[all[shadows+tiddlers]]">> +<<.operator-example 3 "[all[tiddlers+shadows]]">> +<<.operator-example 4 "[all[orphans+missing+current]]">> +<<.operator-example 5 "[all[current]]">> +<<.operator-example 6 "[all[current]tag[Operator Examples]]">> +<<.operator-example 7 "[all[current]tag[Recipes]]">> +<<.operator-example 8 "Monday Thursday +[all[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/backlinks.tid b/editions/tw5.com/tiddlers/filters/examples/backlinks.tid new file mode 100644 index 000000000..f9366f595 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/backlinks.tid @@ -0,0 +1,9 @@ +created: 20150118134611000 +modified: 20150118183135000 +tags: [[backlinks Operator]] [[Operator Examples]] +title: backlinks Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[HelloThere]backlinks[]]">> +<<.operator-example 2 "[tag[TableOfContents]backlinks[]]" "tiddlers that link to tiddlers tagged [[TableOfContents]]">> +<<.operator-example 3 "[all[current]backlinks[]]" "tiddlers that link to this one">> diff --git a/editions/tw5.com/tiddlers/filters/examples/before.tid b/editions/tw5.com/tiddlers/filters/examples/before.tid new file mode 100644 index 000000000..5e25f3dab --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/before.tid @@ -0,0 +1,10 @@ +created: 20150118134611000 +modified: 20150118183139000 +tags: [[before Operator]] [[Operator Examples]] +title: before Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> The [[Thursday]] tiddler shows a further example. + +<<.operator-example 1 "[list[Days of the Week]before[Saturday]]">> +<<.operator-example 2 "[list[Days of the Week]before[Monday]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/butlast.tid b/editions/tw5.com/tiddlers/filters/examples/butlast.tid new file mode 100644 index 000000000..6a0e2b235 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/butlast.tid @@ -0,0 +1,11 @@ +created: 20150118134611000 +modified: 20150118183143000 +tags: [[butlast Operator]] [[Operator Examples]] +title: butlast Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]butlast[]]">> +<<.operator-example 2 "[list[Days of the Week]butlast[2]]">> +<<.operator-example 3 "A B C D E F G H I J K L M +[butlast[7]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/commands.tid b/editions/tw5.com/tiddlers/filters/examples/commands.tid new file mode 100644 index 000000000..328b207ac --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/commands.tid @@ -0,0 +1,7 @@ +created: 20150118134611000 +modified: 20150118183148000 +tags: [[commands Operator]] [[Operator Examples]] +title: commands Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[commands[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/each.tid b/editions/tw5.com/tiddlers/filters/examples/each.tid new file mode 100644 index 000000000..0b5017957 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/each.tid @@ -0,0 +1,10 @@ +created: 20150118134611000 +modified: 20150118183152000 +tags: [[each Operator]] [[Operator Examples]] +title: each Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[each[color]]">> +<<.operator-example 2 "[sort[title]each[type]]" "the alphabetically first tiddler of each type">> + +For an example of using the <<.op each>> operator to generate a two-tier list of groups and members, see [[GroupedLists]]. diff --git a/editions/tw5.com/tiddlers/filters/examples/eachday.tid b/editions/tw5.com/tiddlers/filters/examples/eachday.tid new file mode 100644 index 000000000..b195c83c7 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/eachday.tid @@ -0,0 +1,9 @@ +created: 20150118134611000 +modified: 20150118183156000 +tags: [[eachday Operator]] [[Operator Examples]] +title: eachday Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[eachday[created]]" "the first tiddler created on each day">> + +For an example of using the <<.op eachday>> operator to generate a two-tier list of groups and members, see [[GroupedLists]]. diff --git a/editions/tw5.com/tiddlers/filters/examples/field.tid b/editions/tw5.com/tiddlers/filters/examples/field.tid new file mode 100644 index 000000000..9192d4cc3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/field.tid @@ -0,0 +1,8 @@ +created: 20150118134611000 +modified: 20150118183202000 +tags: [[field Operator]] [[Operator Examples]] +title: field Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[field:author[JeremyRuston]]" "plugins authored by JeremyRuston">> +<<.operator-example 2 "[plugin-type[theme]author[JeremyRuston]]" "themes authored by JeremyRuston">> diff --git a/editions/tw5.com/tiddlers/filters/examples/fields.tid b/editions/tw5.com/tiddlers/filters/examples/fields.tid new file mode 100644 index 000000000..decfec7ca --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/fields.tid @@ -0,0 +1,8 @@ +created: 20150118134611000 +modified: 20150118183206000 +tags: [[fields Operator]] [[Operator Examples]] +title: fields Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[HelloThere]fields[]]" "fields of HelloThere">> +<<.operator-example 2 "[tag[Common Operators]fields[]]" "fields of all tiddlers tagged as [[Common Operators]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/first.tid b/editions/tw5.com/tiddlers/filters/examples/first.tid new file mode 100644 index 000000000..f11803057 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/first.tid @@ -0,0 +1,11 @@ +created: 20150118134611000 +modified: 20150118183210000 +tags: [[first Operator]] [[Operator Examples]] +title: first Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]first[]]">> +<<.operator-example 2 "[list[Days of the Week]first[5]]">> +<<.operator-example 3 "[tag[Filter Operators]!sort[title]first[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/get.tid b/editions/tw5.com/tiddlers/filters/examples/get.tid new file mode 100644 index 000000000..a1bae36e0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/get.tid @@ -0,0 +1,8 @@ +created: 20150118134611000 +modified: 20150118183215000 +tags: [[get Operator]] [[Operator Examples]] +title: get Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[all[current]get[draft.of]]" "the title of the tiddler of which the current tiddler is a draft">> +<<.operator-example 2 "[get[tags]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/has.tid b/editions/tw5.com/tiddlers/filters/examples/has.tid new file mode 100644 index 000000000..7691d9fc4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/has.tid @@ -0,0 +1,9 @@ +created: 20150118165921000 +modified: 20150118183219000 +tags: [[has Operator]] [[Operator Examples]] +title: has Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[has[color]]">> +<<.operator-example 2 "[tag[Concepts]!has[modified]]">> + diff --git a/editions/tw5.com/tiddlers/howtos/Tagging.tid b/editions/tw5.com/tiddlers/howtos/Tagging.tid index 5b6cf411d..12a6edb27 100644 --- a/editions/tw5.com/tiddlers/howtos/Tagging.tid +++ b/editions/tw5.com/tiddlers/howtos/Tagging.tid @@ -1,5 +1,5 @@ created: 20140904075400000 -modified: 20140919155913046 +modified: 20150118182337000 tags: [[Working with TiddlyWiki]] Concepts title: Tagging type: text/vnd.tiddlywiki @@ -33,7 +33,7 @@ You can use the [[tag manager|$:/TagManager]], found on the ''Tags'' tab under ' ! Change the order in which tags are listed -By default, tagged tiddlers are listed in the order they were added to the wiki. The [[sort operator|Filter operator: sort]] can change the order to alphabetical. +By default, tagged tiddlers are listed in the order they were added to the wiki. The <<.olink sort>> operator can change the order to alphabetical. If you want any other order, add a [[field called ''list''|ListField]] to the tag tiddler, and set its value to be a [[TitleList]] of the tiddlers in that order. diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid index 72be362ee..1b1e16edf 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid @@ -1,6 +1,6 @@ caption: 5.1.3 created: 20141020171015200 -modified: 20141020171015200 +modified: 20150118182805000 tags: ReleaseNotes title: Release 5.1.3 type: text/vnd.tiddlywiki @@ -25,14 +25,14 @@ released: 20141020171015200 * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/2ffe53f1916e4b746cc6d7e74e8f4ac75c72e38a]] audio "parser" for handling [[Audio]] content * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0dcf54c3b59ed04645928f0ec4ced647e5a0da7f]] support for ActionWidgets -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/65504d5d41e45326ab1b1b6c0c21eea4c9772797]] new [[FilterOperator: addprefix]] and [[FilterOperator: addsuffix]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/65504d5d41e45326ab1b1b6c0c21eea4c9772797]] new <<.olink addprefix>> and <<.olink addsuffix>> operators * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/0c8e5380778303cdd3308bed4a15290214841f8b]] support for custom password prompts * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/c26bd4c5a872f56c47e9f5cfc3fada468c53ddde]] the ListMacro to display ''caption'' field if present * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/12e26009eef5e29140ba1a880ff033428d673630]] ImageWidget to allow percentage width and height to be specified !! Bug Fixes -* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/cc576b052e2b05fd93fcb4f3eb8d9ee5278abf3e]] [[FilterOperator: each]] to work with missing tiddlers +* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/cc576b052e2b05fd93fcb4f3eb8d9ee5278abf3e]] the <<.olink each>> operator to work with missing tiddlers * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/5dd6ebff05a3380db2901294b2cfc89c1a0e71bf]] problem with tiddler width in zoomin storyview with the sidebar hidden * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/09b6540998fec6bf1fb14842be8e8c53dbd5c46a]] bug whereby the `tm-home` message wasn't navigating to a tiddler, causing problems in zoomin storyview * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/3ca8d7b6cca46ffa424bcf9bdc134da464fc84f4]] problem with jumping toolbar icons under Firefox diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.5.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.5.tid index 1fda65ca4..bafcdf053 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.5.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.5.tid @@ -1,6 +1,6 @@ caption: 5.1.5 created: 20141025120850184 -modified: 20141126153016142 +modified: 20150118182717000 tags: ReleaseNotes title: Release 5.1.5 type: text/vnd.tiddlywiki @@ -40,7 +40,7 @@ released: 20141126153016142 * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c20c935faabbb63f679bc4720b52162c56b6af64]] new system image for videos: [[$:/core/images/video]] * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/c13cf94413c94ee56bebc60fab2d9231d1824d88]] search results to allow custom visualisations - see [[Customising search results]] * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/a3a50dbf6d96e7441e5e8ec183e40134bc4eb618]] TimelineMacro to be able to use different date fields -* [[Update|https://github.com/Jermolene/TiddlyWiki5/commit/8260d000be1cf1caf35a557f6cd54a0fb8ccf4f0]] [[FilterOperator: search]] to allow a field to be specified +* [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/8260d000be1cf1caf35a557f6cd54a0fb8ccf4f0]] the <<.olink search>> operator to allow a field to be specified * [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/73491f14dd63612d527632210d2c3873eb81188f]] the highlight plugin to display tabs as spaces * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/91a7c397911726e391ca368f96b50fbe1687d56a]] modal handling to permit variables to be passed to the modal (see [[WidgetMessage: tm-modal]]) * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/853f5fd06402b16e271e8f119ef380de485aeff2]] simple logging to help track down drop/paste issues (see http://tiddlywiki.com/dev/#ImportLogging) diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.6.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.6.tid index 85e1faabd..06e65feaf 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Release 5.1.6.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.1.6.tid @@ -1,6 +1,6 @@ caption: 5.1.6 created: 20141127120850184 -modified: 20141127153016142 +modified: 20150118182735000 tags: ReleaseNotes title: Release 5.1.6 type: text/vnd.tiddlywiki @@ -20,7 +20,7 @@ released: 20141219155007260 * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b220c19fb7b789eb6d00c9d1a71414676d87130e]] support for templates to tabbed TableOfContentsMacro * [[Allow|https://github.com/Jermolene/TiddlyWiki5/commit/31b5eb1578640fabe8712f0cd4edd49708bc4493]] shadow tiddlers to appear in TableOfContentsMacro * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/5154a25ab95f0cc08eb079a624be4fd3353e6dbd]] tooltip to BrowseWidget -* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/42dba113ccdb18d7e76ac7a773c7dca532207007]] handling of missing tiddlers by the [[FilterOperator: has]] and [[FilterOperator: field]] +* [[Improved|https://github.com/Jermolene/TiddlyWiki5/commit/42dba113ccdb18d7e76ac7a773c7dca532207007]] handling of missing tiddlers by the <<.olink has>> and <<.olink field>> operators !! Bug Fixes diff --git a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.10beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.10beta.tid index b56838220..f2ff0a861 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.10beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.10beta.tid @@ -1,5 +1,5 @@ created: 20140416160234142 -modified: 20140416160234142 +modified: 20150118182457000 tags: BetaReleaseNotes title: Release 5.0.10-beta type: text/vnd.tiddlywiki @@ -25,7 +25,7 @@ caption: 5.0.10-beta !! Hackability Improvements -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/15d0c27e2a82359616ce6c7883557cd2ef1886cd]] `[is[tag]]` to the [[FilterOperator: is]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/15d0c27e2a82359616ce6c7883557cd2ef1886cd]] `[is[tag]]` to the <<.olink is>> operator * [[Hide|https://github.com/Jermolene/TiddlyWiki5/commit/95d291daac4a26664f0c232175f54780f0fa678f]] the top bars in the print stylesheet !! Bug Fixes diff --git a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.11beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.11beta.tid index 222b0c032..ca6d93585 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.11beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.11beta.tid @@ -1,5 +1,5 @@ created: 20140516150234142 -modified: 20140516150234142 +modified: 20150118182530000 tags: BetaReleaseNotes title: Release 5.0.11-beta type: text/vnd.tiddlywiki @@ -38,8 +38,8 @@ See [[Notes for upgrading to 5.0.11-beta]] for more details of these changes: * Improved vertical layouts of TabsMacro * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/93566cdc332226b77eaba8a70fa166f3b8fcfe1e]] "standard" tab to [[advanced search|$:/AdvancedSearch]] -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e83759e86d2a9e05e4b85dae50925fe988f8e239]] new filter operators [[before|FilterOperator: before]] and [[after|FilterOperator: after]] -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/570cad1c7f90e685961130918f09a7f9b2951f8c]] new [[FilterOperator: get]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e83759e86d2a9e05e4b85dae50925fe988f8e239]] new filter operators <<.olink before>> and <<.olink after>> +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/570cad1c7f90e685961130918f09a7f9b2951f8c]] new <<.olink get>> operator * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f7e50e0950c5bf10d94d926576011893418b25f1]] [[BuildCommand]], [[OutputCommand]] and [[ClearPasswordCommand]] * Added new extensible StartupMechanism for orchestrating startup tasks * [[Updated|https://github.com/Jermolene/TiddlyWiki5/commit/711b76307c95d0026f79f584e85ae3d4b7289d15]] to new version of CodeMirror diff --git a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.13beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.13beta.tid index 40e216fba..764ce3937 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.13beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.13beta.tid @@ -1,5 +1,5 @@ created: 20140518150234142 -modified: 20140624094134118 +modified: 20150118182554000 tags: BetaReleaseNotes title: Release 5.0.13-beta type: text/vnd.tiddlywiki @@ -41,7 +41,7 @@ This release includes a number of features designed to improve the experience of * [[Refactored|https://github.com/Jermolene/TiddlyWiki5/commit/1717c93d001ad184a08ca66d1bffb33fb5d32b3a]] CodeMirror (http://tiddlywiki.com/codemirrordemo.html) plugin for simpler configuration * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b2e48d00e9ea068a22b5ac5c0a4c93e8ddbb4a8a]] support for [[Environment Variables on Node.js]] * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/eee3a0cf8e5aa047f8596df06e28194409f38b01]] ServerCommand to allow a path prefix -* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/4238af2a405c14d22937d7c47a70bfb3d4e6f22d]] [[FilterOperator: listed]] to use any list field +* [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/4238af2a405c14d22937d7c47a70bfb3d4e6f22d]] the <<.olink listed>> operator to use any list field !! Bug Fixes diff --git a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.16beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.16beta.tid index 1adef028a..7218fcaff 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.16beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.16beta.tid @@ -1,6 +1,6 @@ caption: 5.0.16-beta created: 20140830131615798 -modified: 20140902124037214 +modified: 20150118182819000 tags: BetaReleaseNotes title: Release 5.0.16-beta type: text/vnd.tiddlywiki @@ -34,11 +34,11 @@ Many thanks to @buggyj for his work on this plugin. !! Hackability Improvements -* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/48312272adb17610db96d50758e6af947cab7b1d]] the [[FilterOperator: all]] to be able to select all the source tiddlers +* [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/48312272adb17610db96d50758e6af947cab7b1d]] the <<.olink all>> operator to be able to select all the source tiddlers * [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/43aeb47fc34f1ba424030c4f78ee907fe7b1d5d8]] problem with single line macro definitions incorrectly including whitespace in the value. (For example, `\define mymacro() yes` would set the macro value to " yes", with a leading space) * [[Extend|https://github.com/Jermolene/TiddlyWiki5/commit/d2a5a12f2d6b6ccc36dd22a70ac2def08d1d3722]] TableOfContentsMacro to use the caption field if present * [[Configurability|https://github.com/Jermolene/TiddlyWiki5/commit/b437f1b450f5f2a3104a9086f7c674299b53b9bc]] for the default tab shown in the tiddler info panel (see [[Configuring the default TiddlerInfo tab]]) -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/dcf4e93a3283e3e93cc14e50366f9b0252870835]] [[suffix|FilterOperator: suffix]] and [[removesuffix|FilterOperator: removesuffix]] filter operators +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/dcf4e93a3283e3e93cc14e50366f9b0252870835]] <<.olink suffix>> and <<.olink removesuffix>> operators !! Bug Fixes diff --git a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.17beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.17beta.tid index 1c69c4533..dba71042a 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.17beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.17beta.tid @@ -1,6 +1,6 @@ caption: 5.0.17-beta created: 20140910131615798 -modified: 20140912164804565 +modified: 20150118182638000 tags: BetaReleaseNotes title: Release 5.0.17-beta type: text/vnd.tiddlywiki @@ -30,7 +30,7 @@ The use of the `title` attribute in the ButtonWidget was not consistent with the As discussed in [[the associated ticket|https://github.com/Jermolene/TiddlyWiki5/issues/762]], the support for regular expression filter operands is incomplete and inconsistent. The plan is to remove support for this feature in the next release. A new filter operator has been provided to replace it, along with the addition of a deprecation warning that is displayed whenever regular expression filter operators are used. -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f4fff7a33037ba9dd537379bcb44a52a280868d6]] new [[FilterOperator: regexp]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/f4fff7a33037ba9dd537379bcb44a52a280868d6]] new <<.olink regexp>> operator * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/d45c417c187fe3dcc35ee7a308e64feebc7b185b]] deprecation warning for regular expression filter operators !!! Repository Reorganisation diff --git a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid index 65f96709f..7c3da4ced 100644 --- a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +++ b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid @@ -1,140 +1,147 @@ created: 20150110182600000 +modified: 20150117180524000 title: Documentation Macros tags: [[Improving TiddlyWiki Documentation]] -The following macros are used throughout the documentation. +The following macros are used throughout ~TiddlyWiki's documentation. !General |!Macro |!Used for |!Example | -|doc-def |the defining instance of a term |<> | -|doc-em |minor emphasis within a sentence |<> | -|doc-ph |a placeholder for the user to fill in |<> | -|doc-strong |major emphasis within a tiddler |<> | -|doc-w |a mention of an ordinary word or phrase |<> | +|.def |the defining instance of a term |<<.def widget>> | +|.em |minor emphasis within a sentence |<<.em not>> | +|.place |a placeholder for the user to fill in |<<.place tagname>> | +|.strong |major emphasis within a tiddler |<<.strong Important!>> | +|.word |a mention of an ordinary word or phrase |<<.word "hello world">> | + +!Blocks +|!Macro |!Used for | +|.preamble |an introductory sentence that stands apart from the rest of the tiddler | !Tiddlers and fields |!Macro |!Used for |!Example | -|doc-tiddler |a tiddler title|<> | -|doc-tag |a tag |<> | -|doc-field|a field name|<> | -|doc-field-value|a field value|<> | -|doc-var|a variable or macro name|<> | -|doc-widget|a widget name|<> | +|.tid |a tiddler title|<<.tid Example>> | +|.tag |a tag |<<.tag Example>> | +|.field|a field name|<<.field example>> | +|.value|a field value|<<.value "example value">> | +|.op|a filter operator|<<.op backlinks>> | +|.var|a variable or macro name|<<.var currentTiddler>> | +|.wid|a widget name|<<.wid list>> | !Links |!Macro |!Used for |!Example | -|doc-link |a link containing WikiText |<> | -|doc-clink |a code link |<` ListWidget>> | +|.link |a link containing WikiText |<<.link "^^an^^ ~~example~~" Example>> | +|.clink |a code link |<<.clink `<$list>` ListWidget>> | +|.flink |a link to a field |<<.flink ListField>> | +|.olink |a link to an operator |<<.olink prefix>> | +|.wlink |a link to a widget |<<.wlink ButtonWidget>> | !User interface |!Macro |!Used for |!Example | -|doc-key |a key on the keyboard |<> | -|doc-key-combo |a key combination |<> | -|doc-input |text entered by the user |<> | -|doc-output |text output by the system |<> | +|.key |a key on the keyboard |<<.key Escape>> | +|.keycombo |a key combination |<<.keycombo Ctrl Enter>> | !Tabs |!Macro |!Used for |!Example | -|doc-sidebar-tab |the name of a sidebar tab |<> | -|doc-more-tab |the name of a subtab of the More tab |<> | -|doc-info-tab |the name of a tiddler info tab |<> | -|doc-controlpanel-tab |the name of a Control Panel tab |<> | -|doc-advancedsearch-tab |the name of an Advanced Search tab |<> | -|doc-toc-tab |name of the tw5.com TOC tab |<> | -|doc-example-tab |an example tab name |<> | +|.sidebar-tab |the name of a sidebar tab |<<.sidebar-tab More>> | +|.more-tab |the name of a subtab of the More tab |<<.more-tab Shadows>> | +|.info-tab |the name of a tiddler info tab |<<.info-tab Fields>> | +|.controlpanel-tab |the name of a Control Panel tab |<<.controlpanel-tab Settings>> | +|.advancedsearch-tab |the name of an Advanced Search tab |<<.advancedsearch-tab Filter>> | +|.toc-tab |name of the tw5.com TOC tab |<<.toc-tab>> | +|.example-tab |an example tab name |<<.example-tab "Notes">> | -!!Parameters for doc-sidebar-tab +!!Parameters for .sidebar-tab -|Open |<> | -|Recent |<> | -|Tools |<> | -|More |<> | +|Open |<<.sidebar-tab Open>> | +|Recent |<<.sidebar-tab Recent>> | +|Tools |<<.sidebar-tab Tools>> | +|More |<<.sidebar-tab More>> | -!!Parameters for doc-more-tab +!!Parameters for .more-tab -|All |<> | -|Recent |<> | -|Tags |<> | -|Missing |<> | -|Drafts |<> | -|Orphans |<> | -|Types |<> | -|System |<> | -|Shadows |<> | +|All |<<.more-tab All>> | +|Recent |<<.more-tab Recent>> | +|Tags |<<.more-tab Tags>> | +|Missing |<<.more-tab Missing>> | +|Drafts |<<.more-tab Drafts>> | +|Orphans |<<.more-tab Orphans>> | +|Types |<<.more-tab Types>> | +|System |<<.more-tab System>> | +|Shadows |<<.more-tab Shadows>> | -!!Parameters for doc-info-tab +!!Parameters for .info-tab -|Tools |<> | -|References |<> | -|Tagging |<> | -|List |<> | -|Listed |<> | -|Fields |<> | -|Advanced |<> | +|Tools |<<.info-tab Tools>> | +|References |<<.info-tab References>> | +|Tagging |<<.info-tab Tagging>> | +|List |<<.info-tab List>> | +|Listed |<<.info-tab Listed>> | +|Fields |<<.info-tab Fields>> | +|Advanced |<<.info-tab Advanced>> | -!!Parameters for doc-controlpanel-tab +!!Parameters for .controlpanel-tab -|Info |<> | -|Appearance |<> | -|Settings |<> | -|Saving |<> | -|Plugins |<> | +|Info |<<.controlpanel-tab Info>> | +|Appearance |<<.controlpanel-tab Appearance>> | +|Settings |<<.controlpanel-tab Settings>> | +|Saving |<<.controlpanel-tab Saving>> | +|Plugins |<<.controlpanel-tab Plugins>> | -!!Parameters for doc-advancedsearch-tab +!!Parameters for .advancedsearch-tab -|Standard |<> | -|System |<> | -|Shadows |<> | -|Filter |<> | +|Standard |<<.advancedsearch-tab Standard>> | +|System |<<.advancedsearch-tab System>> | +|Shadows |<<.advancedsearch-tab Shadows>> | +|Filter |<<.advancedsearch-tab Filter>> | !Buttons |!Macro |!Used for |!Example | -|doc-button |a standard button name and icon |<> | +|.button |a standard button name and icon |<<.button "new-tiddler">> | -!!Parameters for doc-button +!!Parameters for .button !!!Tiddler toolbar -|clone |<> | -|close |<> | -|close-others |<> | -|edit |<> | -|export-tiddler |<> | -|info |<> | -|more-tiddler-actions |<> | -|new-here |<> | -|new-journal-here |<> | -|permalink |<> | +|clone |<<.button "clone">> | +|close |<<.button "close">> | +|close-others |<<.button "close-others">> | +|edit |<<.button "edit">> | +|export-tiddler |<<.button "export-tiddler">> | +|info |<<.button "info">> | +|more-tiddler-actions |<<.button "more-tiddler-actions">> | +|new-here |<<.button "new-here">> | +|new-journal-here |<<.button "new-journal-here">> | +|permalink |<<.button "permalink">> | !!!Edit-mode toolbar -|cancel |<> | -|delete |<> | -|save |<> | +|cancel |<<.button "cancel">> | +|delete |<<.button "delete">> | +|save |<<.button "save">> | !!!Page toolbar -|advanced-search |<> | -|close-all |<> | -|control-panel |<> | -|encryption |<> | -|export-page |<> | -|full-screen |<> | -|home |<> | -|import |<> | -|language |<> | -|more-page-actions |<> | -|new-journal |<> | -|new-tiddler |<> | -|permaview |<> | -|refresh |<> | -|save-wiki |<> | -|storyview |<> | -|tag-manager |<> | -|theme |<> | \ No newline at end of file +|advanced-search |<<.button "advanced-search">> | +|close-all |<<.button "close-all">> | +|control-panel |<<.button "control-panel">> | +|encryption |<<.button "encryption">> | +|export-page |<<.button "export-page">> | +|full-screen |<<.button "full-screen">> | +|home |<<.button "home">> | +|import |<<.button "import">> | +|language |<<.button "language">> | +|more-page-actions |<<.button "more-page-actions">> | +|new-journal |<<.button "new-journal">> | +|new-tiddler |<<.button "new-tiddler">> | +|permaview |<<.button "permaview">> | +|refresh |<<.button "refresh">> | +|save-wiki |<<.button "save-wiki">> | +|storyview |<<.button "storyview">> | +|tag-manager |<<.button "tag-manager">> | +|theme |<<.button "theme">> | diff --git a/editions/tw5.com/tiddlers/styleguide/Documentation Style Guide.tid b/editions/tw5.com/tiddlers/styleguide/Documentation Style Guide.tid index 280ad68a7..c3b4eb85f 100644 --- a/editions/tw5.com/tiddlers/styleguide/Documentation Style Guide.tid +++ b/editions/tw5.com/tiddlers/styleguide/Documentation Style Guide.tid @@ -1,5 +1,5 @@ created: 20140904164608166 -modified: 20150110181800000 +modified: 20150117152546000 title: Documentation Style Guide tags: [[Improving TiddlyWiki Documentation]] type: text/vnd.tiddlywiki @@ -18,4 +18,4 @@ Additional topics: * [[Spelling]] * [[Typography]] * [[Documentation Macros]] -* [[Technical Prose Style]] \ No newline at end of file +* [[Technical Prose Style]] diff --git a/editions/tw5.com/tiddlers/styleguide/Instruction Tiddlers.tid b/editions/tw5.com/tiddlers/styleguide/Instruction Tiddlers.tid index 301b7c21b..c01504e35 100644 --- a/editions/tw5.com/tiddlers/styleguide/Instruction Tiddlers.tid +++ b/editions/tw5.com/tiddlers/styleguide/Instruction Tiddlers.tid @@ -1,9 +1,9 @@ created: 20150110101500000 -modified: 20150110181800000 +modified: 20150117152550000 title: Instruction Tiddlers tags: [[Improving TiddlyWiki Documentation]] -<> talk directly to the reader and guide them through a process. The reader is likely to be a beginner or an intermediate user. +<<.def "Instruction tiddlers">> talk directly to the reader and guide them through a process. The reader is likely to be a beginner or an intermediate user. Such tiddlers can be subcategorised as: @@ -18,7 +18,7 @@ Such tiddlers can be subcategorised as: * An ordered presentation of material for beginners * Each tiddler introduces one new point or concept * Its main content contains very few links -* A revealable <> section at the end can offer related links +* A revealable <<.word "Find out more">> section at the end can offer related links ;Exercise * Accompanying a tutorial tiddler @@ -34,6 +34,6 @@ Such tiddlers can be subcategorised as: * Can contain explanations and similar commentary * Kept separate to keep the reference tiddler pure -Instruction tiddlers talk directly to the reader as <>. They can be reasonably chatty. +Instruction tiddlers talk directly to the reader as <<.word you>>. They can be reasonably chatty. -But they avoid excessively colloquial language, cultural or topical references and attempts at humour, as these can baffle or even offend the international readership. They also avoid potentially frustrating the reader with descriptions of features as <> or <>. +But they avoid excessively colloquial language, cultural or topical references and attempts at humour, as these can baffle or even offend the international readership. They also avoid potentially frustrating the reader with descriptions of features as <<.word convenient>> or <<.word easy>>. diff --git a/editions/tw5.com/tiddlers/styleguide/Reference Tiddlers.tid b/editions/tw5.com/tiddlers/styleguide/Reference Tiddlers.tid index 8c1e5c84f..a42fdbe2e 100644 --- a/editions/tw5.com/tiddlers/styleguide/Reference Tiddlers.tid +++ b/editions/tw5.com/tiddlers/styleguide/Reference Tiddlers.tid @@ -1,9 +1,9 @@ created: 20141226192500000 -modified: 20150110182100000 +modified: 20150117152552000 title: Reference Tiddlers tags: [[Improving TiddlyWiki Documentation]] -<> offer raw information in a comprehensive interlinked way. The reader is likely to be an intermediate or expert user. +<<.def "Reference tiddlers">> offer raw information in a comprehensive interlinked way. The reader is likely to be an intermediate or expert user. There are several subcategories: @@ -19,8 +19,8 @@ There are several subcategories: Reference material is written in a terse, formal style that avoids referring to the reader, and instead focuses on how ~TiddlyWiki itself behaves. The passive voice is often suitable: -* <> rather than <> -* <> rather than <> -* But <> is better, because it is less convoluted and more succinct +* <<.word "the template is specified as a tiddler">> rather than <<.word "specify the template as a tiddler">> +* <<.word "the widget can be used for various purposes">> rather than <<.word "you can use the widget for various purposes">> +* But <<.word "this widget has several possible uses">> is better, because it is less convoluted and more succinct -Most contracted verb forms are avoided in reference tiddlers. But those ending in <> (<>, <>, <>, <>, etc) are acceptable, as they make it less easy to accidentally overlook the word <>. \ No newline at end of file +Most contracted verb forms are avoided in reference tiddlers. But those ending in <<.word "n't">> (<<.word "aren't">>, <<.word "doesn't">>, <<.word "hasn't">>, <<.word "isn't">>, etc) are acceptable, as they make it less easy to accidentally overlook the word <<.word not>>. diff --git a/editions/tw5.com/tiddlers/styleguide/Spelling.tid b/editions/tw5.com/tiddlers/styleguide/Spelling.tid index 020c20738..eceb59962 100644 --- a/editions/tw5.com/tiddlers/styleguide/Spelling.tid +++ b/editions/tw5.com/tiddlers/styleguide/Spelling.tid @@ -1,12 +1,13 @@ created: 20150110182900000 +modified: 20150117152553000 title: Spelling tags: [[Improving TiddlyWiki Documentation]] Because ~TiddlyWiki is of British origin, its English documentation uses [[British spelling in preference to US spelling|http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences]]. -Words like <> are spelled <>, not <>. +Words like <<.word customise>> are spelled <<.word -ise>>, not <<.word -ize>>. -Standard technical acronyms are written in upper case, without dots: <>, not <> or <> +Standard technical acronyms are written in upper case, without dots: <<.word HTML>>, not <<.word html>> or <<.word H.T.M.L.>> Avoid arbitrarily abbreviating words and sentences. But the following abbreviations are acceptable: diff --git a/editions/tw5.com/tiddlers/styleguide/Technical Prose Style.tid b/editions/tw5.com/tiddlers/styleguide/Technical Prose Style.tid index 09022bed4..0d0edc2a3 100644 --- a/editions/tw5.com/tiddlers/styleguide/Technical Prose Style.tid +++ b/editions/tw5.com/tiddlers/styleguide/Technical Prose Style.tid @@ -1,4 +1,5 @@ created: 20150110182900000 +modified: 20150117152555000 title: Technical Prose Style tags: [[Improving TiddlyWiki Documentation]] @@ -6,9 +7,9 @@ When writing an [[instruction tiddler|Instruction Tiddlers]], start by planning Keep sentences short and simple. A clear technical sentence seldom contains more than one idea. It therefore avoids parenthetical information. Similarly, keep paragraph structure simple. A flat presentation is often easier to understand than a hierarchical one. -It is often possible to simplify a sentence without changing its meaning merely by adjusting its vocabulary. <> just means <>. <> just means <>. +It is often possible to simplify a sentence without changing its meaning, merely by adjusting its vocabulary or grammatical structure. <<.word "Execution of the macro is performed">> just means <<.word "The macro runs">>. <<.word "Your expectation might be...">> just means <<.word "You might expect...">>. -Prefer the active voice by default: <> rather than <>. The passive voice can be useful if you want the reader to focus on the action itself or its result: <>. But it may be clearer to proceed from cause to effect and say <> in the active voice. +Prefer the active voice by default: <<.word "Jane creates a tiddler">> rather than <<.word "a tiddler is created by Jane">>. The passive voice can be useful if you want the reader to focus on the action itself or its result: <<.word "a tiddler is created">>. But it can often be clearer to proceed from cause to effect and say <<.word "this creates a tiddler">> in the active voice. Documentation often presents two items that are parallel either by similarity or by difference. The reader will more easily detect such a pattern if you use the same sentence or phrase structure for both. But this must be balanced with the need to avoid monotony. diff --git a/editions/tw5.com/tiddlers/styleguide/Tiddler Structure.tid b/editions/tw5.com/tiddlers/styleguide/Tiddler Structure.tid index ed026cfb1..8e96a87ed 100644 --- a/editions/tw5.com/tiddlers/styleguide/Tiddler Structure.tid +++ b/editions/tw5.com/tiddlers/styleguide/Tiddler Structure.tid @@ -1,4 +1,5 @@ created: 20150110183300000 +modified: 20150117152556000 title: Tiddler Structure tags: [[Improving TiddlyWiki Documentation]] diff --git a/editions/tw5.com/tiddlers/styleguide/Tiddler Title Policy.tid b/editions/tw5.com/tiddlers/styleguide/Tiddler Title Policy.tid index c779704b3..4f9125d37 100644 --- a/editions/tw5.com/tiddlers/styleguide/Tiddler Title Policy.tid +++ b/editions/tw5.com/tiddlers/styleguide/Tiddler Title Policy.tid @@ -1,22 +1,24 @@ created: 20150110183300000 -modified: 20150110190400000 +modified: 20150118183633000 title: Tiddler Title Policy tags: [[Improving TiddlyWiki Documentation]] -Many documentation tiddlers, especially the [[reference ones|Reference Tiddlers]], are concerned with a single concept. Their titles should be succinct noun phrases like <> or <>. +Many documentation tiddlers, especially the [[reference ones|Reference Tiddlers]], are concerned with a single concept. Their titles should be succinct noun phrases like <<.tid "List Widget">> or <<.tid "Tiddler Fields">>. -Each of the main words of such a title begins with a capital letter. Minor words such as <>, <>, <>, <> and <> do not. +Each of the main words of such a title begins with a capital letter. Minor words such as <<.word and>>, <<.word or>>, <<.word the>>, <<.word to>> and <<.word with>> do not. Tags also follow this pattern. -Titles of this kind are plural if they denote a category of items, e.g. <> or <>. Such titles are used to tag more specific tiddlers within the category. +Titles of this kind are plural if they denote a category of items, e.g. <<.tid "Keyboard Shortcuts">> or <<.tid "Tiddler Fields">>. Such titles are used to tag more specific tiddlers within the category. -Where a concept is an item rather than a category, its tiddler has a singular title, e.g. <>, <>. +Where a concept is an item rather than a category, its tiddler has a singular title, e.g. <<.tid "List Widget">>, <<.tid "tag Operator">>. -Avoid starting a title with the word <>. +Start a title with its most distinctive part. For instance, the tiddlers documenting the filter operators have titles like <<.tid "addprefix Operator">>. This helps the reader scan a list of links to find a particular tiddler. -In the past, many tiddlers had CamelCase titles. This is gradually being phased out of the documentation to improve readability. ~CamelCase titles should no longer be used, even for tags, except in cases like <> where that is the standard spelling. +Avoid starting a title with the word <<.word the>>. -[[Instruction tiddlers|Instruction Tiddlers]] often have longer titles that can be more complicated than just a noun phrase, e.g. <> These titles use sentence case, i.e. only the first word (and any proper names) starts with a capital letter. +In the past, many tiddlers had CamelCase titles. This is gradually being phased out of the documentation to improve readability. ~CamelCase titles should no longer be used, even for tags, except in cases like <<.tid ~JavaScript>> where that is the standard spelling. -How-to tiddlers have titles that begin with <>, e.g. <>. Avoid titles like <>, because a less fluent English speaker could misunderstand that as the name of a category of tiddlers. \ No newline at end of file +[[Instruction tiddlers|Instruction Tiddlers]] often have longer titles that can be more complicated than just a noun phrase, e.g. <<.tid "Ten reasons to switch to ~TiddlyWiki">>. These titles use sentence case, i.e. only the first word (and any proper names) starts with a capital letter. + +How-to tiddlers have titles that begin with <<.word "How to">>, e.g. <<.tid "How to edit a tiddler">>. Avoid titles like <<.tid "Editing tiddlers">>, because a less fluent English speaker could misunderstand that as the name of a category of tiddlers. diff --git a/editions/tw5.com/tiddlers/styleguide/Typography.tid b/editions/tw5.com/tiddlers/styleguide/Typography.tid index 4efcd6bb2..05ee65f79 100644 --- a/editions/tw5.com/tiddlers/styleguide/Typography.tid +++ b/editions/tw5.com/tiddlers/styleguide/Typography.tid @@ -1,4 +1,5 @@ created: 20141226192500000 +modified: 20150117152559000 title: Typography tags: documenting @@ -6,7 +7,7 @@ Use the [[documentation macros|Documentation Macros]] to keep the text maintaina Be wary of arbitrarily applying raw bold or italic markup in a sentence. If there's a suitable macro, use that instead. If there isn't a suitable macro, write one or request one. -Use simple backticks (`...`) for fragments of WikiText. +Use simple backticks (`...`) for fragments of WikiText, but not for the names of things like fields and widgets. These have their own macros. To keep things clean and simple, quotation marks and apostrophes should be straight `'`, not curly `’`, and the ellipsis should be three separate dots `...` rather than `…`. diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index ba564effc..4d6e840ed 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -1,38 +1,48 @@ +created: 20150117152607000 +modified: 20150118182742000 title: $:/editions/tw5.com/doc-macros tags: $:/tags/Macro -\define doc-if(cond,then,else) <$reveal type="nomatch" default="$cond$" text="">$then$<$reveal type="match" default="$cond$" text="">$else$ +\define .if(cond,then,else) <$reveal default="$cond$" type="nomatch" text="">$then$<$reveal default="$cond$" type="match" text="">$else$ -\define doc-def(_) $_$ -\define doc-em(_) $_$ -\define doc-strong(_) $_$ -\define doc-ph(_) $_$ -\define doc-w(_) "$_$" +\define .def(_) $_$ +\define .em(_) $_$ +\define .strong(_) $_$ +\define .place(_) $_$ +\define .word(_) "$_$" -\define doc-tiddler(_) $_$ -\define doc-tag(_) $_$ -\define doc-field(_) $_$ -\define doc-field-value(_) $_$ -\define doc-var(_) $_$ -\define doc-widget(_) $_$ +\define .preamble(_) :.doc-preamble $_$ -\define doc-link(_,to) <$link to="$to$">$_$ -\define doc-clink(_,to) <> +\define .tid(_) $_$ +\define .tag(_) $_$ +\define .field(_) $_$ +\define .value(_) $_$ +\define .op(_) $_$ +\define .var(_) $_$ +\define .widget(_) $$_$ -\define doc-key(_) $_$ -\define doc-combo-key(_) <$macrocall $name="doc-if" cond="$_$" then="<>"/> -\define doc-key-combo(1,2,3,4) <><><><><><><> +\define .otitle(_) $_$ Operator -\define doc-input(_) `$_$` -\define doc-output(_) `$_$` +\define .link(_,to) <$link to="$to$">$_$ +\define .clink(_,to) <<.link """$_$""" "$to$">> +\define .flink(to) <$macrocall $name=".link" _="<<.field {{$to$!!caption}}>>" to="$to$"/> +\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/> +\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/> +\define .wlink(to) <$macrocall $name=".link" _="<<.wid {{$to$!!caption}}>>" to="$to$"/> -\define doc-tab(_) {{$_$!!caption}} -\define doc-sidebar-tab(_) <> -\define doc-more-tab(_) <> -\define doc-info-tab(_) <> -\define doc-controlpanel-tab(_) <> -\define doc-advancedsearch-tab(_) <> -\define doc-toc-tab() <> -\define doc-example-tab(_) $_$ +\define .key(_) $_$ +\define .combokey(_) <$macrocall $name=".if" cond="$_$" then="<<.key '$_$'>>"/> +\define .keycombo(1,2,3,4) <<.combokey "$1$">><<.if "$2$" +>><<.combokey "$2$">><<.if "$3$" +>><<.combokey "$3$">><<.if "$4$" +>><<.combokey "$4$">> -\define doc-button(_) {{$:/core/ui/Buttons/$_$!!caption}} +\define .tab(_) {{$_$!!caption}} +\define .sidebar-tab(_) <<.tab "$:/core/ui/SideBar/$_$">> +\define .more-tab(_) <<.tab "$:/core/ui/MoreSideBar/$_$">> +\define .info-tab(_) <<.tab "$:/core/ui/TiddlerInfo/$_$">> +\define .controlpanel-tab(_) <<.tab "$:/core/ui/ControlPanel/$_$">> +\define .advancedsearch-tab(_) <<.tab "$:/core/ui/AdvancedSearch/$_$">> +\define .toc-tab() <<.tab "TableOfContents">> +\define .example-tab(_) $_$ + +\define .button(_) {{$:/core/ui/Buttons/$_$!!caption}} + +\define .state-prefix() $:/state/editions/tw5.com/ diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/system/doc-styles.tid index 658f1f02a..4e55d04a8 100644 --- a/editions/tw5.com/tiddlers/system/doc-styles.tid +++ b/editions/tw5.com/tiddlers/system/doc-styles.tid @@ -1,3 +1,5 @@ +created: 20150117152612000 +modified: 20150118161750000 title: $:/editions/tw5.com/doc-styles tags: $:/tags/Stylesheet @@ -22,7 +24,8 @@ tags: $:/tags/Stylesheet font-style: italic; } -.doc-ph { +.doc-place { + background-color: <>; border: none; color: <>; font-style: italic; @@ -33,20 +36,38 @@ tags: $:/tags/Stylesheet .doc-tag, .doc-tiddler, .doc-field, -.doc-field-value, +.doc-value, +.doc-operator, .doc-var, .doc-widget { - background: <>; + background-color: <>; border: none; color: <>; font-weight: bold; padding: 0; } +a .doc-place, +a .doc-button, +a .doc-tab, +a .doc-tag, +a .doc-tiddler, +a .doc-field, +a .doc-value, +a .doc-operator, +a .doc-var, +a .doc-widget { + color: <>; +} + .doc-button svg { height: 1em; } +td svg { + height: 1em; +} + .doc-key { color: <>; font-weight: bold; @@ -54,4 +75,25 @@ tags: $:/tags/Stylesheet .doc-clink code { color: <>; -} \ No newline at end of file +} + +.doc-preamble { + border: 2px solid <>; + color: <>; + font-size: 90%; + margin-left: 0; + padding: 0.5em 0.7em; +} + +.doc-example { + margin: 1em 0; + padding: 0.8em 0; +} +.doc-example:hover { + background-color: <>; +} +.doc-example ul { + margin-bottom: 0; + padding-bottom: 0; + margin-top: 0.2em; +} diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid new file mode 100644 index 000000000..30e281cd5 --- /dev/null +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -0,0 +1,60 @@ +created: 20150117152607000 +modified: 20150118181923000 +title: $:/editions/tw5.com/operator-macros +tags: $:/tags/Macro + +\define .operator-def(input,parameter,paramName,output) + + + + + + + + + +
input$input$
parameter <<.place "$paramName$">>$parameter$
output$output$
+\end + +\define .operator-def-suffix(input,suffix,suffixName,parameter,paramName,output) + + + + + + + + + + + + +
input$input$
suffix <<.place "$suffixName$">>$suffix$
parameter <<.place "$paramName$">>$parameter$
output$output$
+\end + +\define .operator-examples(op) <$link to="$op$ Operator (Examples)">Examples + +\define .operator-example(n,eg,ie) +
+`$eg$` +<<.if cond:"$ie$" then:"
i.e. $ie$
">> +<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> +
+
<$button set=<<.state>> setTo="show">Try it
+
+ + <$reveal state=<<.state>> type="match" text="show"> +
+
<$button set=<<.state>> setTo="">Hide
+
+
    <$list filter="$eg$" emptyMessage="(empty)"> +
  • <$link><$view field="title"/>
  • +
+ + +\end + +\define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]]. +\define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler. +\define .node-only-operator() This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser. diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index 8a0fe87c4..932ff581d 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -1,32 +1,38 @@ +created: 20150117184156000 +modified: 20150117184616000 title: $:/editions/tw5.com/wikitext-macros tags: $:/tags/Macro \define wikitext-example(src) +
+ ``` $src$ ``` -Renders as: +That renders as: $src$ -In HTML: +... and the underlying HTML is: $$$text/vnd.tiddlywiki>text/html $src$ $$$ - +
\end \define wikitext-example-without-html(src) +
+ ``` $src$ ``` -Renders as: +That renders as: $src$ - +
\end \define tw-code(tiddler) diff --git a/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid index 0fbf685c8..90dc422d3 100644 --- a/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Variables in WikiText.tid @@ -1,6 +1,6 @@ caption: Variables created: 20141002141231992 -modified: 20150107121000000 +modified: 20150117152625000 tags: WikiText title: Variables in WikiText type: text/vnd.tiddlywiki @@ -68,7 +68,7 @@ Below, the `\define` pragma at the beginning of a tiddler [[defines the macro|Ma ''using a filter variable to get all incoming links'' -Using the [[backlinks|FilterOperator: backlinks]] [[filter operator|FilterOperators]] to get all tiddlers linking to this one... +Using the <> [[filter operator|Filter Operators]] to get all tiddlers linking to this one... ``` <backlinks[]]">> @@ -76,4 +76,4 @@ Using the [[backlinks|FilterOperator: backlinks]] [[filter operator|FilterOperat <<< <backlinks[]]">> -<<< \ No newline at end of file +<<<