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..b6736293b --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/AbsoluteOperators.tid @@ -0,0 +1,13 @@ +created: 20150117204109000 +modified: 20150124185709000 +tags: Concepts +title: Absolute Operators +type: text/vnd.tiddlywiki + +The output of a [[filter|Filters]] step depends on its [[operator|Filter Operators]]: + +* Most operators perform <<.def relative>> to their input. They examine each input title 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. + +A good example of an absolute operator is <<.olink title>>. The output of `[title[A]title[B]]` is just <<.tid B>>. But the <<.olink field>> operator is relative, so `[title[A]field:title[B]` outputs nothing at all. diff --git a/editions/tw5.com/tiddlers/concepts/DateFields.tid b/editions/tw5.com/tiddlers/concepts/DateFields.tid new file mode 100644 index 000000000..9c1bfa618 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/DateFields.tid @@ -0,0 +1,28 @@ +created: 20150117190213631 +modified: 20150124214537000 +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"/>"""> diff --git a/editions/tw5.com/tiddlers/concepts/DominantAppend.tid b/editions/tw5.com/tiddlers/concepts/DominantAppend.tid new file mode 100644 index 000000000..622c5e2a8 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/DominantAppend.tid @@ -0,0 +1,11 @@ +created: 20150123220223000 +modified: 20150124185028000 +tags: Concepts +title: Dominant Append +type: text/vnd.tiddlywiki + +[[Filters]] manipulate [[sets of titles|Title Selection]] in which no title may appear more than once. Furthermore, they often need to append one such set to another. + +This is done in such a way that, if a title would be duplicated, the earlier copy of that title is discarded. The titles being appended are dominant. + +For example, if a selection contains `Andrew Becky Clara Daniel` and `Andrew Barney Clara Daisy` is then appended to it, the result is `Becky Daniel Andrew Barney Clara Daisy`. diff --git a/editions/tw5.com/tiddlers/concepts/Filters.tid b/editions/tw5.com/tiddlers/concepts/Filters.tid index ec055933c..d20f8d03a 100644 --- a/editions/tw5.com/tiddlers/concepts/Filters.tid +++ b/editions/tw5.com/tiddlers/concepts/Filters.tid @@ -1,13 +1,13 @@ -created: 20130827080000000= -modified: 20140912145347313 +created: 20130827080000000 +modified: 20150124183938000 tags: Reference Concepts title: Filters type: text/vnd.tiddlywiki list: [[Introduction to filter notation]] [[Filter Syntax]] -You can think of TiddlyWiki as a database where 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. +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|Title Selection]], 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 Syntax]] -- the detailed technical rules +* [[Filter Operators]] -- the available methods of filtering diff --git a/editions/tw5.com/tiddlers/concepts/HardAndSoftLinks.tid b/editions/tw5.com/tiddlers/concepts/HardAndSoftLinks.tid new file mode 100644 index 000000000..12e5d4402 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/HardAndSoftLinks.tid @@ -0,0 +1,15 @@ +created: 20150123220237000 +modified: 20150124120447000 +tags: Concepts +title: Hard and Soft Links +type: text/vnd.tiddlywiki + +A <<.def "hard link">> is one that can be detected by a superficial examination of WikiText. + +A link is <<.def "soft">> if it is: + +* contained in text [[trancluded|Transclusion]] from elsewhere +* supplied via a [[macro|Macros]] or [[variable|Variables]] +* generated by a link widget whose <<.attr to>> attribute is a transclusion, macro or variable + +Soft links are not detected by link-related filter operators such as <<.olink backlinks>>, <<.olink links>>, <<.olink all>> and <<.olink is>>. diff --git a/editions/tw5.com/tiddlers/concepts/OrderOfTaggedTiddlers.tid b/editions/tw5.com/tiddlers/concepts/OrderOfTaggedTiddlers.tid new file mode 100644 index 000000000..1a7bb55e9 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/OrderOfTaggedTiddlers.tid @@ -0,0 +1,15 @@ +created: 20150124125646000 +modified: 20150124202917000 +tags: Concepts +title: Order of Tagged Tiddlers + +When ~TiddlyWiki generates a list of the tiddlers that have a particular tag (e.g. the dropdown list of a tag pill), it orders the tiddlers using the following rules: + +# Start with any that are [[declared|Title List]] in the <<.field list>> field of the tag tiddler, in the order given there. + +# In each remaining tiddler <<.place T>>, look for a <<.field list-before>> field. If this has a tiddler title as its value, place <<.place T>> just <<.em before>> that one. +#* As a special case, if the field exists but its value is empty, place <<.place T>> at the very start of the list. + +# In each remaining tiddler <<.place T>>, look for a <<.field list-after>> field. If this has a tiddler title as its value, place tiddler <<.place T>> just <<.em after>> that one. + +# If any tiddlers still remain, place them at the end of the list. diff --git a/editions/tw5.com/tiddlers/concepts/RailroadDiagrams.tid b/editions/tw5.com/tiddlers/concepts/RailroadDiagrams.tid index 02ae03ffa..7dbec9c7b 100644 --- a/editions/tw5.com/tiddlers/concepts/RailroadDiagrams.tid +++ b/editions/tw5.com/tiddlers/concepts/RailroadDiagrams.tid @@ -1,8 +1,8 @@ created: 20150105133800000 -modified: 20150105134300000 -title: RailroadDiagrams +modified: 20150124181306000 +title: Railroad Diagrams -Railroad diagrams, sometimes called syntax diagrams, are a visual way of explaining the syntax rules of a computer language. Reading one is like reading a public transport map. +<<.def "Railroad diagrams">>, sometimes called <<.def "syntax diagrams">>, are a visual way of explaining the syntax rules of a computer language. Reading one is like reading a public transport map. Each diagram starts on the left and ends on the right. Simply follow any line from the startpoint to the endpoint. All the alternative lines are equally valid. A line will sometimes jump over an item that is optional, or loop back to indicate that an item can be repeated. @@ -14,4 +14,4 @@ In the example above, a comma appears between each occurrence of the `repeated` Characters in round boxes are literal, i.e. they denote themselves. A name in a rectangular box denotes a further railroad diagram. -The railroad diagrams on this site are generated with the [[Railroad Plugin]]. +The railroad diagrams in ~TiddlyWiki's documentation are generated with the [[Railroad Plugin]]. diff --git a/editions/tw5.com/tiddlers/concepts/TextReference.tid b/editions/tw5.com/tiddlers/concepts/TextReference.tid index 96ed27d11..61441f550 100644 --- a/editions/tw5.com/tiddlers/concepts/TextReference.tid +++ b/editions/tw5.com/tiddlers/concepts/TextReference.tid @@ -1,5 +1,5 @@ created: 201308270759 -modified: 201311011115 +modified: 20150124211238000 tags: Concepts title: TextReference @@ -14,7 +14,7 @@ Text references are made up of several parts, most of which can be optional: Text references can be used in several places: -* As IndirectOperands within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`) +* As [[indirect parameters|Filter Parameter]] within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`) * As IndirectAttributes of an element or widget (eg, `<$widget attrib={{Title!!description}}/>`) * As the operand of a shortcut transclusion (eg, `{{MyTiddler!!title}}`) * As the `state` attribute of the RevealWidget and the LinkCatcherWidget diff --git a/editions/tw5.com/tiddlers/concepts/TitleList.tid b/editions/tw5.com/tiddlers/concepts/TitleList.tid index 72d06900d..d9bbe8412 100644 --- a/editions/tw5.com/tiddlers/concepts/TitleList.tid +++ b/editions/tw5.com/tiddlers/concepts/TitleList.tid @@ -1,12 +1,14 @@ +created: 20150117152418000 +modified: 20150124205659000 tags: Concepts -title: TitleList +title: Title List -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]], and are thus a way of expressing a [[selection of titles|Title Selection]]. diff --git a/editions/tw5.com/tiddlers/concepts/TitleSelection.tid b/editions/tw5.com/tiddlers/concepts/TitleSelection.tid new file mode 100644 index 000000000..be3026865 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/TitleSelection.tid @@ -0,0 +1,10 @@ +created: 20150117152418000 +modified: 20150124202920000 +tags: Concepts +title: Title Selection + +A <<.def "title selection">> is an ordered set of tiddler titles (or similar strings), in which no title appears more than once. + +Title selections are important in [[filter|Filters]] processing. + +The simplest way to write one down is as a [[title list|Title List]]. diff --git a/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid b/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid index 783439f2f..c79e52399 100644 --- a/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid +++ b/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid @@ -1,6 +1,7 @@ created: 201308251431 -modified: 201308251431 +modified: 20150124131347000 tags: task title: Kill the Dragon +list-before: Get the Ring //This is a sample task for the TaskManagementExample// diff --git a/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid b/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid index d6630a575..62a1be33d 100644 --- a/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid +++ b/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid @@ -1,6 +1,7 @@ color: #8d9ac3 created: 201308252132 -modified: 201308252132 +modified: 20150124123528000 title: task +list: [[Make the beds]] -Sample tasks for the TaskManagementExample. \ No newline at end of file +Sample tasks for the TaskManagementExample. diff --git a/editions/tw5.com/tiddlers/demonstrations/Weekdays/Days of the Week.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Days of the Week.tid new file mode 100644 index 000000000..ae0a105a9 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Days of the Week.tid @@ -0,0 +1,13 @@ +created: 20150117192110000 +modified: 20150123214636000 +title: Days of the Week +type: text/vnd.tiddlywiki +list: Monday Tuesday Wednesday Thursday Friday Saturday Sunday +short: Mon Tue Wed Thu Fri Sat Sun +my-special-list: [[listed Operator (Examples)]] + +<<.this-is-operator-example>> + +It has a <<.field list>> field containing the following items: + +<> diff --git a/editions/tw5.com/tiddlers/demonstrations/Weekdays/Friday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Friday.tid new file mode 100644 index 000000000..b9acc6a27 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/demonstrations/Weekdays/Monday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Monday.tid new file mode 100644 index 000000000..3ee569c03 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/demonstrations/Weekdays/Saturday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Saturday.tid new file mode 100644 index 000000000..a9c439903 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/demonstrations/Weekdays/Sunday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Sunday.tid new file mode 100644 index 000000000..0817e2708 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/demonstrations/Weekdays/Thursday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Thursday.tid new file mode 100644 index 000000000..208e2c863 --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Thursday.tid @@ -0,0 +1,13 @@ +created: 20150117192116000 +modified: 20150124204253000 +title: Thursday +type: text/vnd.tiddlywiki + +<<.this-is-operator-example>> + +! <<.olink before>> and <<.olink after>> + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]before{!!title}]">> +<<.operator-example 2 "[list[Days of the Week]after{!!title}]">> diff --git a/editions/tw5.com/tiddlers/demonstrations/Weekdays/Tuesday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Tuesday.tid new file mode 100644 index 000000000..5d5fc90df --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/demonstrations/Weekdays/Wednesday.tid b/editions/tw5.com/tiddlers/demonstrations/Weekdays/Wednesday.tid new file mode 100644 index 000000000..2fc54e6bd --- /dev/null +++ b/editions/tw5.com/tiddlers/demonstrations/Weekdays/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/fields/ListField.tid b/editions/tw5.com/tiddlers/fields/ListField.tid index 43d4a6d76..340a11d2b 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: 20150124202924000 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. Its value is a [[title list|Title List]], 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 deleted file mode 100644 index 48ac8129d..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator addprefix.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: addprefix -title: FilterOperator: addprefix -type: text/vnd.tiddlywiki - -The ''addprefix'' filter operator add a prefix to all titles in the current list. - -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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid deleted file mode 100644 index ecd3748b7..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator addsuffix.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140828133830424 -modified: 20140902145613329 -tags: Filters -caption: addsuffix -title: FilterOperator: addsuffix -type: text/vnd.tiddlywiki - -The ''addsuffix'' filter operator adds a suffix to all titles in the current list. - -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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator after.tid b/editions/tw5.com/tiddlers/filters/FilterOperator after.tid deleted file mode 100644 index 76b37debb..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator after.tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20140512103123179 -modified: 20140512103123179 -tags: Filters -title: FilterOperator: after -caption: after -type: text/vnd.tiddlywiki - -The ''after'' filter operator returns the tiddler from the current list that is after the tiddler named in the operand. - -The following examples assume a tiddler called `MyList` with a `list` field containing: - -``` -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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid deleted file mode 100644 index b1781aede..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid +++ /dev/null @@ -1,22 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -title: FilterOperator: all -caption: all -type: text/vnd.tiddlywiki - -The ''all'' filter operator is used to select combinations of lists of tiddlers for subsequent operations. - -The operand of the ''all'' operator is a list of names of tiddler sources joined with `+`. - -For example: - -|!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 | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid b/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid deleted file mode 100644 index 39141fc06..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: backlinks -title: FilterOperator: backlinks -type: text/vnd.tiddlywiki - -The ''backlinks'' filter operator replaces the current list with a list of the non-system tiddlers that link to them. - -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 | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator before.tid b/editions/tw5.com/tiddlers/filters/FilterOperator before.tid deleted file mode 100644 index aa6fc4888..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator before.tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20140512103123179 -modified: 20140512103123179 -tags: Filters -caption: before -title: FilterOperator: before -type: text/vnd.tiddlywiki - -The ''before'' filter operator returns the tiddler from the current list that is before the tiddler named in the operand. - -The following examples assume a tiddler called `MyList` with a `list` field containing: - -``` -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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid b/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid deleted file mode 100644 index 17056f1b2..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid +++ /dev/null @@ -1,8 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: bf -title: FilterOperator: bf -type: text/vnd.tiddlywiki - -The ''bf'' filter operator is a synonym for [[FilterOperator: rest]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid b/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid deleted file mode 100644 index f4d356f1c..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid +++ /dev/null @@ -1,8 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: butfirst -title: FilterOperator: butfirst -type: text/vnd.tiddlywiki - -The ''butfirst'' filter operator is a synonym for [[FilterOperator: rest]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid b/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid deleted file mode 100644 index 8e438c9b2..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: butlast -title: FilterOperator: butlast -type: text/vnd.tiddlywiki - -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. - -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` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid b/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid deleted file mode 100644 index cc40f17a1..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: commands -title: FilterOperator: commands -type: text/vnd.tiddlywiki - -The ''commands'' filter operator replaces the current list with a list of the available commands (see the HelpCommand for details). - -For example: - -|!Filter String |!Description | -|`[commands[]]` |Returns a list of the available command names | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator each.tid b/editions/tw5.com/tiddlers/filters/FilterOperator each.tid deleted file mode 100644 index 0645a1946..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator each.tid +++ /dev/null @@ -1,27 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: each -title: FilterOperator: each -type: text/vnd.tiddlywiki - -The ''each'' filter operator filters the current list to leave only the first tiddler with each distinct value for a specified field. - -For example: - -|!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"/> -
- -
- diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid b/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid deleted file mode 100644 index f5002b5b7..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: eachday -title: FilterOperator: eachday -type: text/vnd.tiddlywiki - -The ''eachday'' filter operator filters the current list to leave only the first tiddler that has a distinct value for a specified date field. - -For example: - -|!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 - - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid b/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid deleted file mode 100644 index 686de3d28..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator editiondescription.tid +++ /dev/null @@ -1,10 +0,0 @@ -created: 20150111145738451 -modified: 20150111145738451 -tags: Filters -caption: editiondescription -title: FilterOperator: editiondescription -type: text/vnd.tiddlywiki - -The ''editiondescription'' filter operator returns a description string for each edition name in the current results. It is only available under Node.js. - -Also see [[FilterOperator: editions]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid b/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid deleted file mode 100644 index 5dfa3b7d0..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator editions.tid +++ /dev/null @@ -1,8 +0,0 @@ -created: 20150111145738451 -modified: 20150111145738451 -tags: Filters -caption: editions -title: FilterOperator: editions -type: text/vnd.tiddlywiki - -The ''editions'' filter operator returns the names of all the available editions. It is only available under Node.js. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid deleted file mode 100644 index 3c80f59b9..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator field.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: field -title: FilterOperator: field -type: text/vnd.tiddlywiki - -The ''field'' filter operator filters the current list according to whether a field matches a specified value. - -The operand is the value to match, and the suffix is used to identify the field. For example: - -|!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` | - -Note that if an unknown filter operator `[unknown[xxx]]` is encountered it is interpreted as `[field:unknown[xxx]]`. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid b/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid deleted file mode 100644 index 9434bf6f9..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator fields.tid +++ /dev/null @@ -1,13 +0,0 @@ -caption: fields -created: 20140924115616653 -modified: 20141002150019737 -tags: Filters -title: FilterOperator: fields -type: text/vnd.tiddlywiki - -The ''fields'' filter operator returns the names of all the fields used in the currently selected 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` | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator first.tid b/editions/tw5.com/tiddlers/filters/FilterOperator first.tid deleted file mode 100644 index 5d497cd69..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator first.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: first -title: FilterOperator: first -type: text/vnd.tiddlywiki - -The ''first'' filter operator returns the first entries in the current list. The optional operand specifies the number of entries to return. - -For example: - -|!Filter String |!Description | -|`one two three +[first[]]` |Returns `one` | -|`one two three +[first[2]]` |Returns `one`, `two` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator get.tid b/editions/tw5.com/tiddlers/filters/FilterOperator get.tid deleted file mode 100644 index 51a000efa..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator get.tid +++ /dev/null @@ -1,13 +0,0 @@ -created: 20140426183123179 -modified: 20140426183123179 -tags: Filters -caption: get -title: FilterOperator: get -type: text/vnd.tiddlywiki - -The ''get'' filter operator replaces the titles of the tiddlers in the current list with the values of the field specified by the operand. - -For example: - -|!Filter String |!Description | -|`[all[current]get[draft.of]]` |If the current tiddler is a draft, returns the original tiddler, otherwise returns an empty list | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator has.tid b/editions/tw5.com/tiddlers/filters/FilterOperator has.tid deleted file mode 100644 index 245f536b4..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator has.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: has -title: FilterOperator: has -type: text/vnd.tiddlywiki - -The ''has'' filter operator chooses tiddlers from the current list that have a non-empty value for the field specified in the operand. - -For example: - -|!Filter String |!Description | -|`[has[modifier]]` |Returns tiddlers that have a `modifier` field | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator indexes.tid b/editions/tw5.com/tiddlers/filters/FilterOperator indexes.tid deleted file mode 100644 index 5a54ef334..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator indexes.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: indexes -caption: indexes -type: text/vnd.tiddlywiki - -The ''indexes'' filter operator returns a list of all the property indexes found in the DataTiddlers in the current list. Tiddlers that are not DataTiddlers are ignored. - -For example: - -|!Filter String |!Description | -|`[[MyData]indexes[]]` |Returns the indexes of all properties in the data tiddler `MyData` | -|`[{$:/palette}indexes[]sort[title]]` |Returns the names of all the colours defined in the current [[colour palette|ColourPalettes]] | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator is.tid b/editions/tw5.com/tiddlers/filters/FilterOperator is.tid deleted file mode 100644 index 19408c84b..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator is.tid +++ /dev/null @@ -1,29 +0,0 @@ -created: 20140410103123179 -modified: 20140418103123179 -tags: Filters CommonFilters -caption: is -title: FilterOperator: is -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: - -* `[is[current]]` - returns any tiddler that matches the title of the current tiddler -* `[is[image]]` - tiddlers that contain an image (eg, GIF, JPEG, PNG etc.) -* `[is[missing]]` - MissingTiddlers that are referenced but undefined -* `[is[orphan]]` - OrphanTiddlers that are not referenced from any other tiddler -* `[is[shadow]]` - tiddlers that are ShadowTiddlers -* `[is[system]]` - tiddlers that are SystemTiddlers -* `[is[tiddler]]` - tiddlers that are not MissingTiddlers -* `[is[tag]]` - tiddlers that are being used as tags - -For example: - -|!Filter String |!Description | -|`[tag[task]is[shadow]]` |Returns ShadowTiddlers tagged `task` | -|`[tag[task]!is[system]]` |Returns non-SystemTiddlers tagged `task` | -|`[is[shadow]]` |Returns ShadowTiddlers that have been overridden by a 'real' tiddler | -|`[!is[shadow]]` |Returns ordinary tiddlers that are not shadow tiddlers | -|`[!is[tag]]` |Returns all tiddlers that are not being used as tags | -|`[is[missing]]` |Returns an empty list (see note below) | - -Note that the ''is'' filter operator strictly filters the current list by choosing whether or not to include each one in the output. It never adds tiddlers to the results that are not already listed. This means that when used at the start of a run of filter operators the ''is'' operator will be choosing from the currently existing tiddlers, and so will never return missing tiddlers, or shadow tiddlers that haven't been overridden. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator last.tid b/editions/tw5.com/tiddlers/filters/FilterOperator last.tid deleted file mode 100644 index 20459fd68..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator last.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: last -title: FilterOperator: last -type: text/vnd.tiddlywiki - -The ''last'' filter operator returns the last entries in the current list. The optional operand specifies the number of entries to return. - -For example: - -|!Filter String |!Description | -|`one two three +[last[]]` |Returns `three` | -|`one two three +[last[2]]` |Returns `two`, `three` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator limit.tid b/editions/tw5.com/tiddlers/filters/FilterOperator limit.tid deleted file mode 100644 index 96bc6bb9a..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator limit.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: limit -title: FilterOperator: limit -type: text/vnd.tiddlywiki - -The ''limit'' filter operator trims the current list to the length specified in the operator. Usually the first tiddlers in the list are returned; preceding the operator with ''!'' causes it to instead return the last tiddlers in the list. - -For example: - -|!Filter String |!Description | -|`[sort[modified]!limit[20]]` |Returns the titles of the last 20 tiddlers to have been modified | -|`[has[created]sort[created]limit[10]]` |Returns the titles of the oldest 10 tiddlers to have been created | - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator links.tid b/editions/tw5.com/tiddlers/filters/FilterOperator links.tid deleted file mode 100644 index 5302e270a..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator links.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: links -title: FilterOperator: links -type: text/vnd.tiddlywiki - -The ''links'' filter operator replaces the current list with a list of the targets of outgoing links from those tiddlers. - -For example: - -|!Filter String |!Description | -|`[[HelloThere]links[]]` |Returns the titles of tiddlers linked from `HelloThere` | -|`[all[current]links[]]` |Returns the titles of tiddlers linked from the current tiddler | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator list.tid b/editions/tw5.com/tiddlers/filters/FilterOperator list.tid deleted file mode 100644 index c546a3e40..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator list.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: list -title: FilterOperator: list -type: text/vnd.tiddlywiki - -The ''list'' filter operator replaces the current list with the list contained in the TextReference specified in the operand. The default field for the text reference is `list`. - -Preceding the operator name with `!` inverts the logic so that the filter only returns the tiddlers in the current list that are not listed in the specified list. - -For example: - -|!Filter String |!Description | -|`[list[HelloThere]]` |Returns the list of tiddlers in the `list` field of the tiddler `HelloThere` | -|`[list[HelloThere!!mylist]]` |Returns the list of tiddlers in the `mylist` field of the tiddler `HelloThere` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator listed.tid b/editions/tw5.com/tiddlers/filters/FilterOperator listed.tid deleted file mode 100644 index b008e317d..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator listed.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140613103123179 -tags: Filters -caption: listed -title: FilterOperator: listed -type: text/vnd.tiddlywiki - -The ''listed'' filter operator returns the titles of the tiddlers that have `list` fields that contain any members of the current list. The optional operand can be used to specify a different field. - -For example: - -|!Filter String |!Description | -|`[[HelloThere]listed[]]` |Returns the titles of any tiddlers containing `HelloThere` in their `list` fields | -|`[all[current]listed[my-special-list]]` |Returns the titles of any tiddlers containing the current tiddler in their `my-special-list` fields | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid b/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid deleted file mode 100644 index abc97a4d8..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: modules -title: FilterOperator: modules -type: text/vnd.tiddlywiki - -The ''modules'' filter operator treats the current list as a list of [[module types|ModuleType]], and returns the titles of all of the modules of those types. - -For example: - -|!Filter String |!Description | -|`[[filteroperator]modules[]]` |Returns a list of the modules of type `filteroperator` | - -See also [[FilterOperator: moduletypes]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator moduletypes.tid b/editions/tw5.com/tiddlers/filters/FilterOperator moduletypes.tid deleted file mode 100644 index 1919c5591..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator moduletypes.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: moduletypes -title: FilterOperator: moduletypes -type: text/vnd.tiddlywiki - -The ''moduletypes'' filter operator replaces the current list with a list of the types of the currently loaded modules. - -For example: - -|!Filter String |!Description | -|`[moduletypes[]]` |Returns a list of the types of the currently loaded modules | - -See also [[FilterOperator: modules]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator next.tid b/editions/tw5.com/tiddlers/filters/FilterOperator next.tid deleted file mode 100644 index 4d8e51b9b..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator next.tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: next -title: FilterOperator: next -type: text/vnd.tiddlywiki - -The ''next'' filter operator takes each tiddler in the current list and looks it up in the `list` field of the tiddler specified in the operand, and then returns the immediately following tiddler title. - -The following examples assume a tiddler called `MyList` with a `list` field containing: - -``` -one two three four five -``` - -|!Filter String |!Description | -|`[[three]next[MyList]]` |Returns `four` | -|`[[five]next[MyList]]` |Returns an empty list | -|`one three +[next[MyList]]` |Returns `two`, `four` | - -See also [[FilterOperator: previous]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid b/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid deleted file mode 100644 index 3c6682c11..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: nsort -title: FilterOperator: nsort -type: text/vnd.tiddlywiki - -The ''nsort'' filter operator sorts the current list as numeric values, along the field specified in the operand (which defaults to `title`). String values are sorted case insensitively (upper and lower case letters are considered equivalent). Preceding the operator with `!` reverses the sort order. - -For example: - -|!Filter String |!Description | -|`10 010 1000 100 +[nsort[]]` |Returns `10`, `010`, `100`, `1000` | -|`10 010 alpha 1000 100 +[nsort[]]` |Returns `10`, `010`, `100`, `1000`, `alpha` | - -See also [[FilterOperator: sort]], [[FilterOperator: sortcs]] and [[FilterOperator: nsortcs]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid b/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid deleted file mode 100644 index afe5199bc..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: nsortcs -title: FilterOperator: nsortcs -type: text/vnd.tiddlywiki - -The ''nsortcs'' filter operator sorts the current list as numeric values, along the field specified in the operand (which defaults to `title`). String values are sorted case sensitively (upper and lower case letters are considered different). Preceding the operator with `!` reverses the sort order. - -For example: - -|!Filter String |!Description | -|`10 010 1000 100 +[nsortcs[]]` |Returns `10`, `010`, `100`, `1000` | -|`10 010 alpha 1000 100 +[nsortcs[]]` |Returns `10`, `010`, `100`, `1000`, `alpha` | - -See also [[FilterOperator: sort]], [[FilterOperator: sortcs]] and [[FilterOperator: nsort]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator nth.tid b/editions/tw5.com/tiddlers/filters/FilterOperator nth.tid deleted file mode 100644 index 35438d3d6..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator nth.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: nth -title: FilterOperator: nth -type: text/vnd.tiddlywiki - -Without an operand, the ''nth'' filter operator returns the first entry in the current list. The optional operand specifies the position of the entry in the list. - -For example: - -|!Filter String |!Description | -|`one two three four five +[nth[]]` |Returns `one` | -|`one two three four five +[nth[3]]` |Returns `three` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator plugintiddlers.tid b/editions/tw5.com/tiddlers/filters/FilterOperator plugintiddlers.tid deleted file mode 100644 index 378251fe3..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator plugintiddlers.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: plugintiddlers -title: FilterOperator: plugintiddlers -type: text/vnd.tiddlywiki - -The ''plugintiddlers'' filter operator returns the titles of the shadow tiddlers within any plugin tiddlers in the current list. - -For example: - -|!Filter String |!Description | -|`[[$:/core]plugintiddlers[]]` |Returns a list of the shadow tiddlers within the [[$:/core]] module | - -See also [[FilterOperator: shadowsource]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid deleted file mode 100644 index af965c7c6..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: prefix -title: FilterOperator: prefix -type: text/vnd.tiddlywiki - -The ''prefix'' filter operator returns the titles in the current list that start with a specified prefix. If the ''prefix'' operator is preceded by `!` then it returns the titles that do not start with the specified prefix. - -For example: - -|!Filter String |!Description | -|`[tag[task]!prefix[hidden]]` |Returns tiddlers tagged `task` whose titles do not start with `hidden` | -|`[prefix[$:/]]` |Equivalent to `[is[system]]` | - -See also [[FilterOperator: removeprefix]], [[FilterOperator: removesuffix]], [[FilterOperator: removesuffix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid b/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid deleted file mode 100644 index d3f6ef53b..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid +++ /dev/null @@ -1,21 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: previous -title: FilterOperator: previous -type: text/vnd.tiddlywiki - -The ''previous'' filter operator takes each tiddler in the current list and looks it up in the `list` field of the tiddler specified in the operand, and then returns the immediately preceding tiddler title. - -The following examples assume a tiddler called `MyList` with a `list` field containing: - -``` -one two three four five -``` - -|!Filter String |!Description | -|`[[three]previous[MyList]]` |Returns `two` | -|`[[one]previous[MyList]]` |Returns an empty list | -|`two four +[previous[MyList]]` |Returns `one`, `three` | - -See also [[FilterOperator: next]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator regexp.tid b/editions/tw5.com/tiddlers/filters/FilterOperator regexp.tid deleted file mode 100644 index 36bb1a78c..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator regexp.tid +++ /dev/null @@ -1,37 +0,0 @@ -created: 20140909134102102 -modified: 20140909134102102 -tags: Filters -caption: regexp -title: FilterOperator: regexp -type: text/vnd.tiddlywiki - -The ''regexp'' filter operator filters tiddlers that match a regular expression. - -Regular expressions are a way of encoding complex string matching criteria. The format is defined fully in [[this Mozilla reference|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions]]. - -The regexp filter operator takes a fieldname as the optional suffix (defaulting to `title`). - -The regular expression itself can start or end with an optional string to specify flags in the format `(?flags)` where flags can be "g", "m" or "i". Only the "i" flag is generally useful: it forces the match to be case-insensitive (ie upper and lower case letters are considered the same). - -For example: - -|!Filter String |!Description | -|`[all[tiddlers]regexp[EggCup]]` |Selects all tiddlers that have the CamelCase string "EggCup" in their title | -|`[all[tiddlers]regexp[eggcup(?i)]]` |Selects all tiddlers that have the string "eggcup" in their title (ignoring case) | -|`[all[tiddlers]regexp[(?i)\.jpe?g$]]` |Selects all tiddlers with titles ending in ".jpg" or ".jpeg" (ignoring case) | -|`[all[tiddlers]regexp:modified[^2014]]` |Selects all tiddlers whose modified field starts with the string "2014" | - -! Regular Expressions with Square Brackets - -Note that the filter syntax doesn't allow you to directly enter regular expressions that include square brackets. Instead, you should use a variable to store the filter string. For example, the following regular expression matches all titles that contain any combination the letters "a", "b" and "c" (with no other characters present). - -``` -<$set name="myfilter" value="^[abc]*$"> -<$list filter="[regexp:title]"> -
-<$view field="title"/> -
- - -``` - diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid deleted file mode 100644 index c9ab7b69a..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: removeprefix -title: FilterOperator: removeprefix -type: text/vnd.tiddlywiki - -The ''removeprefix'' filter operator returns the titles in the current list that start with a specified prefix with the prefix removed. - -For example: - -|!Filter String |!Description | -|`tid-one tid-two three +[removeprefix[tid-]]` |Returns `one`, `two` | - -See also [[FilterOperator: prefix]], [[FilterOperator: suffix]], [[FilterOperator: removesuffix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid deleted file mode 100644 index 9b55a9383..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator removesuffix.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140828133830424 -modified: 20140902145613329 -tags: Filters -caption: removesuffix -title: FilterOperator: removesuffix -type: text/vnd.tiddlywiki - -The ''removesuffix'' filter operator returns the titles in the current list that end with a specified suffix with the suffix removed. - -For example: - -|!Filter String |!Description | -|`one-tid two-tid three +[removesuffix[-tid]]` |Returns `one`, `two` | - -See also [[FilterOperator: suffix]], [[FilterOperator: prefix]], [[FilterOperator: removeprefix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid b/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid deleted file mode 100644 index cf8e4c675..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid +++ /dev/null @@ -1,14 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: rest -title: FilterOperator: rest -type: text/vnd.tiddlywiki - -Without an operand, the ''rest'' filter operator returns all but the first entry in the current list. The optional operand specifies the number of entries to omit. - -For example: - -|!Filter String |!Description | -|`one two three four five +[rest[]]` |Returns `two`, `three`, `four`, `five` | -|`one two three four five +[rest[2]]` |Returns `three`, `four`, `five` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator reverse.tid b/editions/tw5.com/tiddlers/filters/FilterOperator reverse.tid deleted file mode 100644 index 7ef56acbd..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator reverse.tid +++ /dev/null @@ -1,13 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: reverse -title: FilterOperator: reverse -type: text/vnd.tiddlywiki - -The ''reverse'' filter operator reverses the order of the titles in the current list. - -For example: - -|!Filter String |!Description | -|`one two three +[reverse[]]` |Returns the list `three`, `two`, `one` | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator sameday.tid b/editions/tw5.com/tiddlers/filters/FilterOperator sameday.tid deleted file mode 100644 index a9d1dce91..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator sameday.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -caption: sameday -title: FilterOperator: sameday -type: text/vnd.tiddlywiki - -The ''sameday'' filter operator filters the current list to leave only those tiddlers whose `modified` field is on the same day as the date provided as the operand. The optional suffix allows a different field to be specified. - -For example: - -|!Filter String |!Description | -|`[sameday[20140410]]` |Returns a list of the tiddlers modified on the 10th April 2014 | -|`[sameday:created[20140410]]` |Returns a list of the tiddlers created on the 10th April 2014 | - -See [[FilterOperator: eachday]] for an example. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator search.tid b/editions/tw5.com/tiddlers/filters/FilterOperator search.tid deleted file mode 100644 index 85910703a..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator search.tid +++ /dev/null @@ -1,17 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -caption: search -title: FilterOperator: search -type: text/vnd.tiddlywiki - -The ''search'' filter operator filters the current list to leave only those tiddlers that include the operand text in their title, body or tags. Preceding the operator with `!` returns all tiddlers that do not include the specified text. The search is case-insenstive. - -Optionally, a field can be specified to restrict the search. - -For example: - -|!Filter String |!Description | -|`[search[alsatian]]` |Returns a list of the tiddlers containing the text "alsatian" | -|`[all[shadows]search[alsatian]]` |Returns a list of the shadow tiddlers containing the text "alsatian" | -|`[search:caption[spaniel]]` |Returns a list of the tiddlers containing the text "spaniel" in their caption field | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid b/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid deleted file mode 100644 index a0b7eb7c4..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: shadowsource -caption: shadowsource -type: text/vnd.tiddlywiki - -The ''shadowsource'' filter operator returns the titles of the plugin tiddlers containing any ShadowTiddlers in the current list. - -For example: - -|!Filter String |!Description | -|`[[$:/core/copyright.txt]shadowsource[]]` |Returns `$:/core`, which is the plugin that contains the shadow tiddler [[$:/core/copyright.txt]] | - -See also [[FilterOperator: plugintiddlers]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid b/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid deleted file mode 100644 index e00e9ff40..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid +++ /dev/null @@ -1,18 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -title: FilterOperator: sort -caption: sort -type: text/vnd.tiddlywiki - -The ''sort'' filter operator sorts the current list case insensitively (upper and lower case letters are considered equivalent), along the field specified in the operand (which defaults to `title`). Preceding the operator with `!` reverses the sort order. - -For example: - -|!Filter String |!Description | -|`one two three four +[sort[]]` |Returns `four`, `one`, `three`, `two` | -|`one two Three four +[sort[]]` |Returns `four`, `one`, `Three`, `two` | - -For an example of use with explicit operands, see [[FilterOperator: limit]]. - -See also [[FilterOperator: nsort]], [[FilterOperator: sortcs]] and [[FilterOperator: nsortcs]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid b/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid deleted file mode 100644 index 932a0946a..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid +++ /dev/null @@ -1,15 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: sortcs -caption: sortcs -type: text/vnd.tiddlywiki - -The ''sortcs'' filter operator sorts the current list case sensitively (upper and lower case letters are considered different), along the field specified in the operand (which defaults to `title`). Preceding the operator with `!` reverses the sort order. - -For example: - -|!Filter String |!Description | -|`one two Three four +[sortcs[]]` |Returns `Three`, `four`, `one`, `two` | - -See also [[FilterOperator: sort]], [[FilterOperator: nsort]] and [[FilterOperator: nsortcs]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid deleted file mode 100644 index 0c12a01a2..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator suffix.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140828133830424 -modified: 20140828133830424 -tags: Filters -title: FilterOperator: suffix -caption: suffix -type: text/vnd.tiddlywiki - -The ''suffix'' filter operator returns the titles in the current list that end with a specified suffix. If the ''suffix'' operator is preceded by `!` then it returns the titles that do not end with the specified suffix. - -For example: - -|!Filter String |!Description | -|`[tag[task]!suffix[hidden]]` |Returns tiddlers tagged `task` whose titles do not end with `hidden` | -|`[suffix[.jpg]]` |Returns tiddlers whose titles end with `.jpg` | - -See also [[FilterOperator: removesuffix]], [[FilterOperator: prefix]], [[FilterOperator: removeprefix]], [[FilterOperator: addprefix]], and [[FilterOperator: addsuffix]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid b/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid deleted file mode 100644 index f6acba4d2..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid +++ /dev/null @@ -1,19 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters CommonFilters -title: FilterOperator: tag -caption: tag -type: text/vnd.tiddlywiki - -The ''tag'' filter operator returns the tiddlers in the current list that have the tag specified in the operand. Preceding the operator with `!` returns tiddlers that do not have the specified tag. - -For example: - -|!Filter String |!Description | -|`[tag[mytag]]` |Returns all tiddlers tagged `mytag` | -|`[all[shadows]tag[mytag]]` |Returns all ShadowTiddlers tagged `mytag` | -|`[all[shadows+tiddlers]tag[mytag]]` |Returns all ShadowTiddlers and non-ShadowTiddlers tagged `mytag` | -|`[!tag[mytag]]` |Returns all tiddlers not tagged `mytag` | -|`[tag[mytag]!tag[exclude]]` |Returns all tiddlers tagged `mytag` that are not tagged `exclude` | - -See also [[FilterOperator: tagging]], [[FilterOperator: tags]] and [[FilterOperator: untagged]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator tagging.tid b/editions/tw5.com/tiddlers/filters/FilterOperator tagging.tid deleted file mode 100644 index b2015a8c3..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator tagging.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: tagging -caption: tagging -type: text/vnd.tiddlywiki - -The ''tagging'' filter operator returns all the tiddlers that are tagged by the tiddlers in the current list. - -For example: - -|!Filter String |!Description | -|`[[mytag]tagging[]]` |Returns all tiddlers tagged `mytag` | -|`[all[current]tagging[]]` |Returns all tiddlers tagged by the current tiddler | - -See also [[FilterOperator: tag]], [[FilterOperator: tags]] and [[FilterOperator: untagged]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator tags.tid b/editions/tw5.com/tiddlers/filters/FilterOperator tags.tid deleted file mode 100644 index 04e684d7c..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator tags.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: tags -caption: tags -type: text/vnd.tiddlywiki - -The ''tags'' filter operator returns all the tags present on the tiddlers in the current list. - -For example: - -|!Filter String |!Description | -|`[[mytiddler]tags[]]` |Returns all tags for the tiddler `mytiddler` | -|`[all[shadows+tiddlers]tags[]]` |Returns all the tags used on ShadowTiddlers or non-ShadowTiddlers | - -See also [[FilterOperator: tag]], [[FilterOperator: tagging]] and [[FilterOperator: untagged]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator title.tid b/editions/tw5.com/tiddlers/filters/FilterOperator title.tid deleted file mode 100644 index f4a9780f9..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator title.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: title -caption: title -type: text/vnd.tiddlywiki - -The ''title'' filter operator replaces the current list with the title specified in the operand. - -For example: - -|!Filter String |!Description | -|`[[mytiddler]]` |Returns the title `mytiddler` | -|`[title[mytiddler]]` |Returns the title `mytiddler` | - -Note that the ''title'' operator is the default when no operator name is specified. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator untagged.tid b/editions/tw5.com/tiddlers/filters/FilterOperator untagged.tid deleted file mode 100644 index caac74ea4..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterOperator untagged.tid +++ /dev/null @@ -1,16 +0,0 @@ -created: 20140410103123179 -modified: 20140410103123179 -tags: Filters -title: FilterOperator: untagged -caption: untagged -type: text/vnd.tiddlywiki - -The ''untagged'' filter operator selects from the current list any tiddlers that do not have any tags. - -For example: - -|!Filter String |!Description | -|`[untagged[]]` |Returns the titles of all tiddlers without tags | -|`[all[shadows]untagged[]]` |Returns all the ShadowTiddlers without tags | - -See also [[FilterOperator: tag]], [[FilterOperator: tagging]] and [[FilterOperator: tags]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperators.tid b/editions/tw5.com/tiddlers/filters/FilterOperators.tid index 800d635d5..80b3755ab 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperators.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperators.tid @@ -1,17 +1,42 @@ created: 20140410103123179 -modified: 20141007213204936 -tags: Concepts -title: FilterOperators +modified: 20150124200331000 +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. +\define .operator-rows(filter) +<$list filter="$filter$"> +<$link to={{!!title}}>{{!!caption}} +{{!!purpose}} <$list filter="[all[current]tag[Common Operators]]">{{$:/core/images/done-button}} +<$list filter="[all[current]tag[Negatable Operators]]">`!` + +\end -A typical step is written as `[operator[parameter]]`, although not all of the operators need a parameter. +\define .group-heading(_) +$_$ +\end -Here are the most commonly used operators: +A <<.def "filter operator">> is a predefined keyword attached to an individual [[step|Filter Step]] of a [[filter|Filters]]. It defines the particular action of that step. -<> +The following table lists all the core operators. The commonest ones are checkmarked. The third column indicates which operators allow <$link to="Filter Step">the ! prefix to reverse their meaning. -The complete list is: + + + + + + +<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[String Operators]!tag[Tag Operators]!tag[Special Operators]sort[]]">> +<<.group-heading "Order Operators">> +<<.operator-rows "[tag[Filter Operators]tag[Order Operators]!tag[String Operators]!tag[Tag Operators]!tag[Special Operators]sort[]]">> +<<.group-heading "String Operators">> +<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]tag[String Operators]!tag[Tag Operators]!tag[Special Operators]sort[]]">> +<<.group-heading "Tag Operators">> +<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[String Operators]tag[Tag Operators]!tag[Special Operators]sort[]]">> +<<.group-heading "Special Operators">> +<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">> +
OperatorPurposeNeg
-<> +A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]]. + +Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few are [[absolute|Absolute Operators]]. 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 deleted file mode 100644 index 5b98e011e..000000000 --- a/editions/tw5.com/tiddlers/filters/FilterSyntax.tid +++ /dev/null @@ -1,95 +0,0 @@ -created: 20140210141217955 -modified: 20150102174633890 -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. - -When a filter is evaluated, it generates a <>, which is an ordered set of items. No item can appear more than once in the result. The items are usually tiddler titles, but certain specialised filters generate other items, such as Node.js command words. - ---- - -;filter -: <$railroad text=""" -{ [:whitespace] ("+" | :- | "-") run } -"""/> - -A <> is a sequence of runs, evaluated from left to right. - -Each run receives an <>, which it modifies to produce a result. The first run in a sequence receives `[all[tiddlers]]` as its input, i.e. the set of all non-missing tiddlers. The second run receives the result of the first run as its input, and so on. - -|!Run |!Interpretation |!Result | -|`run` |union of sets|input OR run | -|`+run` |intersection of sets |input AND run | -|`-run` |difference of sets|input AND NOT run | - ---- - -;run -: <$railroad text=""" -( "[" {step} "]" - | - [:{/"anything but [ ] or whitespace"/}] -) -"""/> - - - -The lower option, e.g. matching `HelloThere`, is short for `[title[HelloThere]]`. - -A <> is a sequence of steps, evaluated from left to right. - -The run's result is basically the intersection of the step results. In other words, the run's result contains the items that are found in <> of the step results. - -However, a few operators (known as <>) ignore any preceding steps in the same run, and completely replace the result so far. Examples of this are <> and <>, but not <>. - ---- - -;step -: <$railroad text=""" -[:"!"] [:method] parameter -"""/> - -If the method is omitted, it defaults to `title`. - ---- - -;method -: <$railroad text=""" -operator [:":" suffix] -"""/> - -The operator is drawn from a list of [[predefined names|FilterOperators]]. - -The suffix is additional information, usually the name of a [[field|TiddlerFields]], that extends the meaning of certain operators. - -An unrecognised operator name is is treated as the suffix to the <> operator. - ---- - -;parameter -: <$railroad text=""" -( "[" [:{/"anything but ]"/}] "]" - | - "{" [:{/"anything but }"/}] "}" - | - "<" [:{/"anything but >"/}] ">" -) -"""/> - -* `[`...`]` encloses a literal parameter -* `{`...`}` encloses a TextReference parameter -* `<`...`>` encloses a [[variable|Variables]] parameter - ---- - -;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 49c8fea04..c0bf8b2ba 100644 --- a/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid +++ b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid @@ -1,12 +1,14 @@ created: 20140410101941871 -modified: 20141009180223576 +modified: 20150124183957000 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 presentation, 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: +<$macrocall $name=".note" _="""Filters do nothing if you just type them into a tiddler on their own. They need a context. An easy way to experiment with filters is to type them into the <<.advancedsearch-tab Filter>> tab of [[Advanced Search|$:/AdvancedSearch]]."""/> + +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 +24,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 +51,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 +61,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 +69,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]] @@ -78,7 +80,7 @@ A <> of runs will select the tiddlers that match <> If we want to ignore vegetarian recipes that serve 4, we can say this: ``` -[serving[3]] [serving[4]!tag[vegetarian]] [serving[5]] +[serving[3]] [serving[4]!tag[Vegetarian]] [serving[5]] ``` By default, each run considers every tiddler in the wiki. But we can use a `+` sign to force a run to consider only the tiddlers that were selected by the preceding runs: @@ -87,9 +89,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 +101,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 +109,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/addprefix.tid b/editions/tw5.com/tiddlers/filters/addprefix.tid new file mode 100644 index 000000000..97b3aa7ba --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/addprefix.tid @@ -0,0 +1,16 @@ +created: 20140410103123179 +modified: 20150124172110000 +tags: [[Filter Operators]] [[String Operators]] +title: addprefix Operator +type: text/vnd.tiddlywiki +caption: addprefix +purpose: extend each input title with a prefix + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="the input, but with <<.place s>> added to the start of each title" +/> + +<<.operator-examples "addprefix">> diff --git a/editions/tw5.com/tiddlers/filters/addsuffix.tid b/editions/tw5.com/tiddlers/filters/addsuffix.tid new file mode 100644 index 000000000..6d1c5624d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/addsuffix.tid @@ -0,0 +1,16 @@ +created: 20140828133830424 +modified: 20150124172115000 +tags: [[Filter Operators]] [[String Operators]] +title: addsuffix Operator +type: text/vnd.tiddlywiki +caption: addsuffix +purpose: extend each input title with a suffix + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="the input, but with <<.place s>> added to the end of each title" +/> + +<<.operator-examples "addsuffix">> diff --git a/editions/tw5.com/tiddlers/filters/after.tid b/editions/tw5.com/tiddlers/filters/after.tid new file mode 100644 index 000000000..dcd374e76 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/after.tid @@ -0,0 +1,18 @@ +created: 20140512103123179 +modified: 20150124204353000 +tags: [[Filter Operators]] [[Order Operators]] +title: after Operator +type: text/vnd.tiddlywiki +caption: after +purpose: find which input title follows a specified one + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="one of those titles" +paramName="t" +output="the title that immediately follows <<.place t>> in the input" +/> + +If <<.place t>> is not present in the input, or is the last title there, then the output is empty. + +<<.operator-examples "after">> diff --git a/editions/tw5.com/tiddlers/filters/all.tid b/editions/tw5.com/tiddlers/filters/all.tid new file mode 100644 index 000000000..39e250be7 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/all.tid @@ -0,0 +1,34 @@ +created: 20140410103123179 +modified: 20150124200847000 +tags: [[Filter Operators]] [[Common Operators]] [[Absolute Operators]] +title: all Operator +type: text/vnd.tiddlywiki +caption: all +purpose: find all titles of a fundamental category + +<$macrocall $name=".operator-def" +input="ignored, unless the parameter is empty" +parameter="zero or more categories -- see below" +output="the titles that belong to all the specified categories" +/> + +The parameter specifies zero or more fundamental categories using the following syntax: + +<$railroad text=""" +[{: ("current" | "missing" |: "orphans" | "shadows" | "tiddlers" ) +"+" }] +"""/> + +|!Category |!Members |!Sorted | +|^`current` |just the [[current tiddler|CurrentTiddler]] |^-- | +|^`missing` |all non-existent tiddlers to which there is at least one [[hard link|Hard and Soft Links]] |^no | +|^`orphans` |all tiddlers to which there are <<.em no>> hard 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 category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output. + +As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is [[soft|Filter Parameter]]. + +The <<.olink is>> operator is similar, but its scope is restricted to its input. + +<<.operator-examples "all">> diff --git a/editions/tw5.com/tiddlers/filters/backlinks.tid b/editions/tw5.com/tiddlers/filters/backlinks.tid new file mode 100644 index 000000000..234d2e7d5 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/backlinks.tid @@ -0,0 +1,17 @@ +created: 20140410103123179 +modified: 20150124200946000 +tags: [[Filter Operators]] +title: backlinks Operator +type: text/vnd.tiddlywiki +caption: backlinks +purpose: find the titles that link to each input title + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="any non-[[system|SystemTiddlers]] titles that contain [[hard links|Hard and Soft Links]] to the input titles" +/> + +Each input title is processed in turn. The corresponding tiddler's list of backlinks is generated, sorted alphabetically 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/before.tid b/editions/tw5.com/tiddlers/filters/before.tid new file mode 100644 index 000000000..fc70c7905 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/before.tid @@ -0,0 +1,18 @@ +created: 20140512103123179 +modified: 20150124164952000 +tags: [[Filter Operators]] [[Order Operators]] +caption: before +title: before Operator +type: text/vnd.tiddlywiki +purpose: find which input title precedes a specified one + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="one of those titles" +paramName="t" +output="the title that immediately precedes <<.place t>> in the input" +/> + +If <<.place t>> is not present in the input, or is the first title there, then the output is empty. + +<<.operator-examples "before">> diff --git a/editions/tw5.com/tiddlers/filters/bf.tid b/editions/tw5.com/tiddlers/filters/bf.tid new file mode 100644 index 000000000..4420432e6 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/bf.tid @@ -0,0 +1,9 @@ +created: 20140410103123179 +modified: 20150124200504000 +tags: [[Filter Operators]] [[Order Operators]] +title: bf Operator +type: text/vnd.tiddlywiki +caption: bf +purpose: same as <<.op rest>> + +<<.op bf>> is a synonym for <<.olink rest>>, also known as <<.olink butfirst>>. diff --git a/editions/tw5.com/tiddlers/filters/butfirst.tid b/editions/tw5.com/tiddlers/filters/butfirst.tid new file mode 100644 index 000000000..bbc7f9b86 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/butfirst.tid @@ -0,0 +1,9 @@ +created: 20140410103123179 +modified: 20150124200507000 +tags: [[Filter Operators]] [[Order Operators]] +title: butfirst Operator +type: text/vnd.tiddlywiki +caption: butfirst +purpose: same as <<.op rest>> + +<<.op butfirst>> is a synonym for <<.olink rest>>, also known as <<.olink bf>>. diff --git a/editions/tw5.com/tiddlers/filters/butlast.tid b/editions/tw5.com/tiddlers/filters/butlast.tid new file mode 100644 index 000000000..55452f56f --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/butlast.tid @@ -0,0 +1,16 @@ +created: 20140410103123179 +modified: 20150124172210000 +tags: [[Filter Operators]] [[Order Operators]] +title: butlast Operator +type: text/vnd.tiddlywiki +caption: butlast +purpose: discard the last <<.place n>> input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 1" +paramName="n" +output="all but the last <<.place n>> input titles" +/> + +<<.operator-examples "butlast">> diff --git a/editions/tw5.com/tiddlers/filters/commands.tid b/editions/tw5.com/tiddlers/filters/commands.tid new file mode 100644 index 000000000..de6b2abe0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/commands.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20150124155303000 +tags: [[Filter Operators]] [[Special Operators]] [[Absolute Operators]] +title: commands Operator +type: text/vnd.tiddlywiki +caption: commands +purpose: select the titles of all the Node.js commands + +<$macrocall $name=".operator-def" +input="ignored" +parameter="none" +output="the [[command words|Commands]] that can be given to [[TiddlyWiki on Node.js]]" +/> + +<<.operator-examples "commands">> diff --git a/editions/tw5.com/tiddlers/filters/each.tid b/editions/tw5.com/tiddlers/filters/each.tid new file mode 100644 index 000000000..4f381fc20 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/each.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20150124164957000 +tags: [[Filter Operators]] [[Group Operators]] +title: each Operator +type: text/vnd.tiddlywiki +caption: each +purpose: select one of each group of input titles by field + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]]" +paramName="f" +output="a selection containing the first input title encountered for each distinct value of field <<.place f>>" +/> + +Each input title is processed in turn. The value of field <<.place f>> in the corresponding tiddler is examined, and as long as the value has not been encountered before, the title is appended to the output set. + +If a tiddler doesn't contain field <<.place f>>, or contains it but with an empty value, then it contributes nothing to the output. + +<<.operator-examples "each">> diff --git a/editions/tw5.com/tiddlers/filters/eachday.tid b/editions/tw5.com/tiddlers/filters/eachday.tid new file mode 100644 index 000000000..d8c8ff20a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/eachday.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20150124214554000 +tags: [[Filter Operators]] [[Group Operators]] [[Date Operators]] +title: eachday Operator +type: text/vnd.tiddlywiki +caption: eachday +purpose: select one of each group of input titles by date + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[date field|Date Fields]]" +paramName="f" +output="a selection containing the first input title encountered for each distinct value (ignoring times of day) of field <<.place f>>" +/> + +Each input title is processed in turn. The value of field <<.place f>> in the corresponding tiddler is examined, and as long as this indicates a date that has not been encountered before, the title is appended to the output set. + +If a tiddler doesn't contain field <<.place f>>, it contributes nothing to the output. + +<<.operator-examples "eachday">> diff --git a/editions/tw5.com/tiddlers/filters/editiondescription.tid b/editions/tw5.com/tiddlers/filters/editiondescription.tid new file mode 100644 index 000000000..c538ea3af --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/editiondescription.tid @@ -0,0 +1,17 @@ +created: 20150111145738451 +modified: 20150124165002000 +tags: [[Filter Operators]] [[Special Operators]] +title: editiondescription Operator +type: text/vnd.tiddlywiki +caption: editiondescription +purpose: select the descriptions of the input editions + +<$macrocall $name=".operator-def" +input="a [[selection|Title Selection]] of edition names" +parameter="none" +output="the description string of each edition in the input" +/> + +Each input title is processed in turn, ignoring any that is not the name of a ~TiddlyWiki edition. + +<<.node-only-operator>> diff --git a/editions/tw5.com/tiddlers/filters/editions.tid b/editions/tw5.com/tiddlers/filters/editions.tid new file mode 100644 index 000000000..f7ce355e6 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/editions.tid @@ -0,0 +1,15 @@ +created: 20150111145738451 +modified: 20150124150912000 +tags: [[Filter Operators]] [[Special Operators]] [[Absolute Operators]] +title: editions Operator +type: text/vnd.tiddlywiki +caption: editions +purpose: select the names of all the ~TiddlyWiki editions + +<$macrocall $name=".operator-def" +input="ignored" +parameter="none" +output="the name of each ~TiddlyWiki edition, in alphabetical order" +/> + +<<.node-only-operator>> 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..c49d876d6 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/get.tid @@ -0,0 +1,9 @@ +created: 20150118134611000 +modified: 20150124201839000 +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]]">> +<<.operator-example 3 "[each[tags]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/filters/examples/indexes.tid b/editions/tw5.com/tiddlers/filters/examples/indexes.tid new file mode 100644 index 000000000..b60e14f5c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/indexes.tid @@ -0,0 +1,8 @@ +created: 20150119125815000 +modified: 20150119191028000 +tags: [[indexes Operator]] [[Operator Examples]] +title: indexes Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[{$:/palette}indexes[]sort[title]]" "all the colours defined in the current [[colour palette|ColourPalettes]]">> +<<.operator-example 2 "[[$:/HistoryList]indexes[]]" "integer output because the [[history list|$:/HistoryList]] is an array">> diff --git a/editions/tw5.com/tiddlers/filters/examples/is.tid b/editions/tw5.com/tiddlers/filters/examples/is.tid new file mode 100644 index 000000000..d81a9bf77 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/is.tid @@ -0,0 +1,13 @@ +created: 20150119133413000 +modified: 20150119134652000 +tags: [[is Operator]] [[Operator Examples]] +title: is Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[is[tag]]">> +<<.operator-example 2 "[!is[tag]]">> +<<.operator-example 3 "[all[shadows]!is[system]]" "shadow tiddlers that don't start with `$:/`">> +<<.operator-example 4 "[is[system]tag[$:/tags/Stylesheet]]" "system stylesheets">> +<<.operator-example 5 "[all[shadows]is[system]tag[$:/tags/Stylesheet]]" "shadow system stylesheets">> +<<.operator-example 6 "[is[shadow]]" "overridden shadow tiddlers">> +<<.operator-example 7 "[is[missing]]" "empty because its input contains only tiddlers that exist">> diff --git a/editions/tw5.com/tiddlers/filters/examples/last.tid b/editions/tw5.com/tiddlers/filters/examples/last.tid new file mode 100644 index 000000000..2aec8e58d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/last.tid @@ -0,0 +1,11 @@ +created: 20150118134611000 +modified: 20150119182151000 +tags: [[last Operator]] [[Operator Examples]] +title: last Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]last[]]">> +<<.operator-example 2 "[list[Days of the Week]last[5]]">> +<<.operator-example 3 "[tag[Concepts]!sort[title]last[3]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/limit.tid b/editions/tw5.com/tiddlers/filters/examples/limit.tid new file mode 100644 index 000000000..584baf509 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/limit.tid @@ -0,0 +1,8 @@ +created: 20150118134611000 +modified: 20150123214304000 +tags: [[limit Operator]] [[Operator Examples]] +title: limit Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[sort[modified]!limit[20]]" "the 20 most recently modified tiddlers">> +<<.operator-example 2 "[has[created]sort[created]limit[10]]" "the oldest 10 tiddlers in the wiki">> diff --git a/editions/tw5.com/tiddlers/filters/examples/links.tid b/editions/tw5.com/tiddlers/filters/examples/links.tid new file mode 100644 index 000000000..218c8233f --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/links.tid @@ -0,0 +1,14 @@ +created: 20150118134611000 +modified: 20150124202748000 +tags: [[links Operator]] [[Operator Examples]] +title: links Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[HelloThere]links[]]">> +<<.operator-example 2 "[all[current]links[]]" "tiddlers [[hard-linked|Hard and Soft Links]] from the current one">> + +Here are some hard links: + +* HelloThere +* [[Filter Operators]] +* [[links Operator]] diff --git a/editions/tw5.com/tiddlers/filters/examples/list.tid b/editions/tw5.com/tiddlers/filters/examples/list.tid new file mode 100644 index 000000000..05f886045 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/list.tid @@ -0,0 +1,10 @@ +created: 20150118134611000 +modified: 20150123214445000 +tags: [[list Operator]] [[Operator Examples]] +title: list Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[HelloThere]]">> +<<.operator-example 2 "[list[Days of the Week!!short]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/listed.tid b/editions/tw5.com/tiddlers/filters/examples/listed.tid new file mode 100644 index 000000000..021a9946e --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/listed.tid @@ -0,0 +1,8 @@ +created: 20150118134611000 +modified: 20150123214616000 +tags: [[listed Operator]] [[Operator Examples]] +title: listed Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[HelloThere]listed[]]">> +<<.operator-example 2 "[all[current]listed[my-special-list]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/modules.tid b/editions/tw5.com/tiddlers/filters/examples/modules.tid new file mode 100644 index 000000000..cdd319186 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/modules.tid @@ -0,0 +1,7 @@ +created: 20150123221510000 +modified: 20150123221534000 +tags: [[modules Operator]] [[Operator Examples]] +title: modules Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[filteroperator]modules[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/moduletypes.tid b/editions/tw5.com/tiddlers/filters/examples/moduletypes.tid new file mode 100644 index 000000000..09aaa69ac --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/moduletypes.tid @@ -0,0 +1,7 @@ +created: 20150123221601000 +modified: 20150123221623000 +tags: [[moduletypes Operator]] [[Operator Examples]] +title: moduletypes Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[moduletypes[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/next.tid b/editions/tw5.com/tiddlers/filters/examples/next.tid new file mode 100644 index 000000000..7bb268de2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/next.tid @@ -0,0 +1,11 @@ +created: 20150123221711000 +modified: 20150123221834000 +tags: [[next Operator]] [[Operator Examples]] +title: next Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[[Monday]next[Days of the Week]]">> +<<.operator-example 2 "[[Sunday]next[Days of the Week]]">> +<<.operator-example 3 "Tuesday Wednesday Thursday +[next[Days of the Week]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/nsort.tid b/editions/tw5.com/tiddlers/filters/examples/nsort.tid new file mode 100644 index 000000000..1c8f67125 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/nsort.tid @@ -0,0 +1,8 @@ +created: 20150123221921000 +modified: 20150123222142000 +tags: [[nsort Operator]] [[Operator Examples]] +title: nsort Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "10 010 1000 100 +[nsort[]]">> +<<.operator-example 2 "10 010 ALPHA beta alpha 1000 100 +[nsort[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/nsortcs.tid b/editions/tw5.com/tiddlers/filters/examples/nsortcs.tid new file mode 100644 index 000000000..9bab28058 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/nsortcs.tid @@ -0,0 +1,8 @@ +created: 20150123222108000 +modified: 20150123222139000 +tags: [[nsortcs Operator]] [[Operator Examples]] +title: nsortcs Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "10 010 1000 100 +[nsortcs[]]">> +<<.operator-example 2 "10 010 ALPHA beta alpha 1000 100 +[nsortcs[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/nth.tid b/editions/tw5.com/tiddlers/filters/examples/nth.tid new file mode 100644 index 000000000..2c31ea9f3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/nth.tid @@ -0,0 +1,10 @@ +created: 20150118134611000 +modified: 20150123222912000 +tags: [[nth Operator]] [[Operator Examples]] +title: nth Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]nth[]]">> +<<.operator-example 2 "[list[Days of the Week]nth[5]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/plugintiddlers.tid b/editions/tw5.com/tiddlers/filters/examples/plugintiddlers.tid new file mode 100644 index 000000000..d8b359604 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/plugintiddlers.tid @@ -0,0 +1,8 @@ +created: 20150123223006000 +modified: 20150123223023000 +tags: [[plugintiddlers Operator]] [[Operator Examples]] +title: plugintiddlers Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[$:/core]plugintiddlers[]]">> + diff --git a/editions/tw5.com/tiddlers/filters/examples/prefix.tid b/editions/tw5.com/tiddlers/filters/examples/prefix.tid new file mode 100644 index 000000000..742efbd3c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/prefix.tid @@ -0,0 +1,9 @@ +created: 20150123223129000 +modified: 20150123223321000 +tags: [[prefix Operator]] [[Operator Examples]] +title: prefix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[tag[task]!prefix[Go]]">> +<<.operator-example 2 "[prefix[$:/languages/]]">> +<<.operator-example 3 "[prefix[$:/]]" "same as `[is[system]]`">> diff --git a/editions/tw5.com/tiddlers/filters/examples/previous.tid b/editions/tw5.com/tiddlers/filters/examples/previous.tid new file mode 100644 index 000000000..2049512fd --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/previous.tid @@ -0,0 +1,11 @@ +created: 20150123221711000 +modified: 20150123223422000 +tags: [[previous Operator]] [[Operator Examples]] +title: previous Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[[Wednesday]previous[Days of the Week]]">> +<<.operator-example 2 "[[Monday]previous[Days of the Week]]">> +<<.operator-example 3 "Tuesday Wednesday Thursday +[previous[Days of the Week]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/regexp.tid b/editions/tw5.com/tiddlers/filters/examples/regexp.tid new file mode 100644 index 000000000..161df8937 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/regexp.tid @@ -0,0 +1,21 @@ +created: 20150123221711000 +modified: 20150123225347000 +tags: [[regexp Operator]] [[Operator Examples]] +title: regexp Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[!is[system]regexp[Wiki]]" "non-system tiddlers with `Wiki` in their title">> +<<.operator-example 2 "[!is[system]regexp[(?i)Wiki]]" "non-system tiddlers with `Wiki` in their title, ignoring case">> +<<.operator-example 3 "[!is[system]regexp[Wiki(?i)]]" "same again">> +<<.operator-example 4 "[regexp[(?i)\.jpe?g$]]" "tiddlers with titles ending in `.jpg` or `.jpeg`, ignoring case">> +<<.operator-example 5 "[regexp:created[^201408]]" "tiddlers created in August 2014">> + +The regular expression `[0-9]{2}` matches two consecutive digits. Because it contains square brackets, the way to use it with the <<.op regexp>> operator is via a [[variable|Variables]], as follows: + +<$macrocall +$name="wikitext-example-without-html" +src="""<$set name="digit-pattern" value="[0-9]{2}"> +<]">> +"""/> diff --git a/editions/tw5.com/tiddlers/filters/examples/removeprefix.tid b/editions/tw5.com/tiddlers/filters/examples/removeprefix.tid new file mode 100644 index 000000000..99026a4bc --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/removeprefix.tid @@ -0,0 +1,7 @@ +created: 20150118132851000 +modified: 20150123210429000 +tags: [[removeprefix Operator]] [[Operator Examples]] +title: removeprefix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[My Cat]] [[Your Garden]] [[My Favourite Armchair]] +[removeprefix[My ]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/removesuffix.tid b/editions/tw5.com/tiddlers/filters/examples/removesuffix.tid new file mode 100644 index 000000000..63546f2a0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/removesuffix.tid @@ -0,0 +1,9 @@ +created: 20150118132851000 +modified: 20150123211000000 +tags: [[removesuffix Operator]] [[Operator Examples]] +title: removesuffix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "SIMPLEX Googolplex Complex +[removesuffix[plex]]">> + + diff --git a/editions/tw5.com/tiddlers/filters/examples/rest.tid b/editions/tw5.com/tiddlers/filters/examples/rest.tid new file mode 100644 index 000000000..61b35b119 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/rest.tid @@ -0,0 +1,11 @@ +created: 20150118134611000 +modified: 20150123211722000 +tags: [[rest Operator]] [[Operator Examples]] +title: rest Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]rest[]]">> +<<.operator-example 2 "[list[Days of the Week]rest[3]]">> +<<.operator-example 3 "Z Y X W V U T S R Q P O +[rest[5]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/reverse.tid b/editions/tw5.com/tiddlers/filters/examples/reverse.tid new file mode 100644 index 000000000..960592de2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/reverse.tid @@ -0,0 +1,9 @@ +created: 20150118134611000 +modified: 20150123212752000 +tags: [[reverse Operator]] [[Operator Examples]] +title: reverse Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]reverse[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/sameday.tid b/editions/tw5.com/tiddlers/filters/examples/sameday.tid new file mode 100644 index 000000000..7b27bb4d8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/sameday.tid @@ -0,0 +1,8 @@ +created: 20150124101702000 +modified: 20150124101739000 +tags: [[sameday Operator]] [[Operator Examples]] +title: sameday Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[sameday[20140410]]" "tiddlers modified on 10 April 2014">> +<<.operator-example 2 "[sameday:created[20140410]]" "tiddlers created on 10 April 2014">> diff --git a/editions/tw5.com/tiddlers/filters/examples/search.tid b/editions/tw5.com/tiddlers/filters/examples/search.tid new file mode 100644 index 000000000..233b30d3f --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/search.tid @@ -0,0 +1,10 @@ +created: 20150124104508000 +modified: 20150124110256000 +tags: [[search Operator]] [[Operator Examples]] +title: search Operator (Examples) +type: text/vnd.tiddlywiki + +<$macrocall $name=".operator-example" n="1" eg="[!is[system]search[table]]" ie="non-system tiddlers containing the word <<.word table>>"/> +<$macrocall $name=".operator-example" n="2" eg="[all[shadows]search[table]]" ie="shadow tiddlers containing the word <<.word table>>"/> +<$macrocall $name=".operator-example" n="3" eg="[search:caption[arch]]" ie="tiddlers containing `arch` in their <<.field caption>> field"/> + diff --git a/editions/tw5.com/tiddlers/filters/examples/shadowsource.tid b/editions/tw5.com/tiddlers/filters/examples/shadowsource.tid new file mode 100644 index 000000000..1be4f2fff --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/shadowsource.tid @@ -0,0 +1,8 @@ +created: 20150124111726000 +modified: 20150124210736000 +tags: [[shadowsource Operator]] [[Operator Examples]] +title: shadowsource Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[$:/core/copyright.txt]shadowsource[]]">> +<<.operator-example 2 "$:/core/copyright.txt $:/plugins/tiddlywiki/railroad/parser.js +[shadowsource[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/sort.tid b/editions/tw5.com/tiddlers/filters/examples/sort.tid new file mode 100644 index 000000000..e6edf8ecf --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/sort.tid @@ -0,0 +1,13 @@ +created: 20150124112340000 +modified: 20150124113250000 +tags: [[sort Operator]] [[Operator Examples]] +title: sort Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "[list[Days of the Week]sort[]]">> +<<.operator-example 2 "[list[Days of the Week]!sort[]]">> +<<.operator-example 3 "one two Three four +[sort[]]">> +<<.operator-example 4 "[prefix[Tiddl]sort[text]]">> +<<.operator-example 5 "[has[created]sort[created]limit[10]]" "the oldest 10 tiddlers in the wiki">> diff --git a/editions/tw5.com/tiddlers/filters/examples/sortcs.tid b/editions/tw5.com/tiddlers/filters/examples/sortcs.tid new file mode 100644 index 000000000..1b5722719 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/sortcs.tid @@ -0,0 +1,10 @@ +created: 20150124113044000 +modified: 20150124113344000 +tags: [[sortcs Operator]] [[Operator Examples]] +title: sortcs Operator (Examples) +type: text/vnd.tiddlywiki + +<<.using-days-of-week>> + +<<.operator-example 1 "one two Three four +[sortcs[]]">> +<<.operator-example 2 "one two Three four +[!sortcs[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid b/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid new file mode 100644 index 000000000..d8dbda9c1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/splitbefore.tid @@ -0,0 +1,8 @@ +created: 20150126143216000 +modified: 20150126143901000 +tags: [[splitbefore Operator]] [[Operator Examples]] +title: splitbefore Operator (Examples) +type: text/vnd.tiddlywiki + +<$macrocall $name=".operator-example" n="1" eg="2015-01-26 2014-07-19 2013 +[splitbefore[-]]"/> +<$macrocall $name=".operator-example" n="2" eg="[[green trees]splitbefore[ee]]"/> diff --git a/editions/tw5.com/tiddlers/filters/examples/storyviews.tid b/editions/tw5.com/tiddlers/filters/examples/storyviews.tid new file mode 100644 index 000000000..c824a6fd2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/storyviews.tid @@ -0,0 +1,7 @@ +created: 20150126142047000 +modified: 20150126142124000 +tags: [[storyviews Operator]] [[Operator Examples]] +title: storyviews Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[storyviews[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/suffix.tid b/editions/tw5.com/tiddlers/filters/examples/suffix.tid new file mode 100644 index 000000000..869fc1304 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/suffix.tid @@ -0,0 +1,8 @@ +created: 20150124113652000 +modified: 20150124113925000 +tags: [[suffix Operator]] [[Operator Examples]] +title: suffix Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[suffix[.jpg]]">> +<<.operator-example 2 "[tag[task]!suffix[ing]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/tag.tid b/editions/tw5.com/tiddlers/filters/examples/tag.tid new file mode 100644 index 000000000..587442fed --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/tag.tid @@ -0,0 +1,10 @@ +created: 20150124122400000 +modified: 20150124122939000 +tags: [[tag Operator]] [[Operator Examples]] +title: tag Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[tag[task]]">> +<<.operator-example 2 "[tag[task]!tag[done]]">> +<<.operator-example 3 "[!tag[task]]">> +<<.operator-example 4 "[all[shadows]tag[$:/tags/Stylesheet]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/tagging.tid b/editions/tw5.com/tiddlers/filters/examples/tagging.tid new file mode 100644 index 000000000..6efe2f555 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/tagging.tid @@ -0,0 +1,9 @@ +created: 20150124133043000 +modified: 20150124133617000 +tags: [[tagging Operator]] [[Operator Examples]] +title: tagging Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[task]tagging[]]" "same as `[tag[task]]`">> +<<.operator-example 2 "Concepts task +[tagging[]]">> +<<.operator-example 3 "[all[current]tagging[]]" "tiddlers tagged with the current one">> diff --git a/editions/tw5.com/tiddlers/filters/examples/tags.tid b/editions/tw5.com/tiddlers/filters/examples/tags.tid new file mode 100644 index 000000000..6a84f23e3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/tags.tid @@ -0,0 +1,9 @@ +created: 20150124134009000 +modified: 20150124134203000 +tags: [[tags Operator]] [[Operator Examples]] +title: tags Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[Filter Operators]tags[]]">> +<<.operator-example 2 "[all[shadows]tags[]]">> +<<.operator-example 3 "[all[shadows+tiddlers]tags[]sort[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/title.tid b/editions/tw5.com/tiddlers/filters/examples/title.tid new file mode 100644 index 000000000..c59b26fe3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/title.tid @@ -0,0 +1,15 @@ +created: 20150124140124000 +modified: 20150124140355000 +tags: [[title Operator]] [[Operator Examples]] +title: title Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[title[HelloThere]]">> +<<.operator-example 2 "[[HelloThere]]">> +<<.operator-example 3 "HelloThere">> +<<.operator-example 4 "[title[HelloThere]] [title[Filter Operators]]">> +<<.operator-example 5 "[[HelloThere]] [[Filter Operators]]">> +<<.operator-example 6 "HelloThere [[Filter Operators]]">> +<<.operator-example 7 "[tag[Filters]] +[!title[Filter Operators]]">> +<<.operator-example 8 "[tag[Filters]] +[![Filter Operators]]">> +<<.operator-example 9 "[tag[Filters]] -[[Filter Operators]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/untagged.tid b/editions/tw5.com/tiddlers/filters/examples/untagged.tid new file mode 100644 index 000000000..ea9fd1049 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/untagged.tid @@ -0,0 +1,9 @@ +created: 20150124142346000 +modified: 20150124142713000 +tags: [[untagged Operator]] [[Operator Examples]] +title: untagged Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[untagged[]]">> +<<.operator-example 2 "[all[shadows]untagged[]]">> +<<.operator-example 3 "[list[HelloThere]!untagged[]]">> diff --git a/editions/tw5.com/tiddlers/filters/field.tid b/editions/tw5.com/tiddlers/filters/field.tid new file mode 100644 index 000000000..f25348c4e --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/field.tid @@ -0,0 +1,26 @@ +created: 20140410103123179 +modified: 20150124201655000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]] +title: field Operator +type: text/vnd.tiddlywiki +caption: field +purpose: filter the input by field + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +suffix="the name of a [[field|TiddlerFields]]" +suffixName="f" +parameter="a possible value of field <<.place f>>" +paramName="s" +output="those input tiddlers in which field <<.place f>> has the value <<.place s>>" +negationOutput="those input tiddlers in which field <<.place f>> does <<.em not>> have the value <<.place s>>" +/> + +If <<.place s>> is empty, <<.op field>> will match both of the following: + +* tiddlers that don't contain field <<.place f>> +* tiddlers in which field <<.place f>> exists but has an empty value + +The syntax of a [[filter step|Filter Step]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.op field>> operator. See the <<.operator-examples "field" "examples">>. + +<<.operator-examples "field">> diff --git a/editions/tw5.com/tiddlers/filters/fields.tid b/editions/tw5.com/tiddlers/filters/fields.tid new file mode 100644 index 000000000..f73f2b7a9 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/fields.tid @@ -0,0 +1,17 @@ +created: 20140924115616653 +modified: 20150124184835000 +tags: [[Filter Operators]] [[Field Operators]] +title: fields Operator +type: text/vnd.tiddlywiki +caption: fields +purpose: select all field names of the input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="all the field names contained in the input tiddlers" +/> + +Each input title is processed in turn. Its list 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/first.tid b/editions/tw5.com/tiddlers/filters/first.tid new file mode 100644 index 000000000..b7302cfd1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/first.tid @@ -0,0 +1,16 @@ +created: 20140410103123179 +modified: 20150124161800000 +tags: [[Filter Operators]] [[Order Operators]] +title: first Operator +type: text/vnd.tiddlywiki +caption: first +purpose: select the first <<.place n>> input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 1" +paramName="n" +output="the first <<.place n>> input titles" +/> + +<<.operator-examples "first">> diff --git a/editions/tw5.com/tiddlers/filters/get.tid b/editions/tw5.com/tiddlers/filters/get.tid new file mode 100644 index 000000000..1f9980ae9 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/get.tid @@ -0,0 +1,20 @@ +created: 20140426183123179 +modified: 20150124165013000 +tags: [[Filter Operators]] [[Field Operators]] +title: get Operator +type: text/vnd.tiddlywiki +caption: get +purpose: select all values of a field in the input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]]" +paramName="f" +output="the values of field <<.place f>> in each of the input titles" +/> + +Each input title is processed in turn. If the corresponding tiddler contains field <<.place f>>, and the value of this field is not empty, then its value is appended to the output. + +Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `each[f]get[f]`. + +<<.operator-examples "get">> diff --git a/editions/tw5.com/tiddlers/filters/has.tid b/editions/tw5.com/tiddlers/filters/has.tid new file mode 100644 index 000000000..db20f1aab --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/has.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20150124191952000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]] +title: has Operator +type: text/vnd.tiddlywiki +caption: has +purpose: filter the input by field existence + +<$macrocall $name=".operator-def" +syntax="has[f]" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]]" +paramName="f" +output="those input tiddlers in which field <<.place f>> has a non-empty value" +negationOutput="those input tiddlers in which field <<.place f>> does <<.em not>> exist or has an empty value" +/> + +<<.operator-examples "has">> diff --git a/editions/tw5.com/tiddlers/filters/indexes.tid b/editions/tw5.com/tiddlers/filters/indexes.tid new file mode 100644 index 000000000..0d79aeb9a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/indexes.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124184840000 +tags: [[Filter Operators]] +title: indexes Operator +type: text/vnd.tiddlywiki +caption: indexes +purpose: select all data properties of the input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="all the property names or indices contained in the input data tiddlers" +/> + +Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. The list of property names is retrieved from the data tiddler (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output. + +Where a tiddler's [[content is JSON|JSONTiddlers]] with an array as its root, the <<.op indexes>> operator retrieves a selection of integer indices instead. + +<<.operator-examples "indexes">> diff --git a/editions/tw5.com/tiddlers/filters/is.tid b/editions/tw5.com/tiddlers/filters/is.tid new file mode 100644 index 000000000..dc8841ab3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/is.tid @@ -0,0 +1,37 @@ +created: 20140410103123179 +modified: 20150124202225000 +tags: [[Filter Operators]] [[Common Operators]] [[Negatable Operators]] +title: is Operator +type: text/vnd.tiddlywiki +caption: is +purpose: filter the input by fundamental category + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a category -- see below" +paramName="c" +output="those input tiddlers that belong to category <<.place c>>" +negationOutput="those input tiddlers that do <<.em not>> belong to category <<.place c>>" +/> + +The parameter <<.place c>> is one of the following fundamental categories: + +|!Category |!Matches any tiddler that... | +|^`current` |is the [[current tiddler|CurrentTiddler]] | +|^`image` |has an image ContentType | +|^`missing` |does not exist (other than possibly as a non-shadow tiddler), regardless of whether there are any links it | +|^`orphan` |has no [[hard links|Hard and Soft Links]] to it | +|^`shadow` |is a [[shadow tiddler|ShadowTiddlers]], regardless of whether it has been overridden with a non-shadow tiddler | +|^`system` |is a [[system tiddler|SystemTiddlers]], i.e. its title starts with `$:/` | +|^`tag` |is in use as a tag | +|^`tiddler` |exists as a non-shadow tiddler | + +If <<.place c>> is anything else, the output is an error message. + +`!is[tiddler]` is a synonym for `is[missing]`, and vice versa. + +When <<.op is[missing]>> is the first operator in a [[run|Filter Run]], its output is always empty. And when <<.op is[shadow]>> comes first, it outputs only those shadow tiddlers that have been overridden. This is because the [[initial input to a run|Filter Expression]] contains only <<.em non>>-shadow tiddlers. + +The <<.olink all>> operator is similar, but its scope is the whole wiki. + +<<.operator-examples "is">> diff --git a/editions/tw5.com/tiddlers/filters/last.tid b/editions/tw5.com/tiddlers/filters/last.tid new file mode 100644 index 000000000..360fe175b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/last.tid @@ -0,0 +1,16 @@ +created: 20140410103123179 +modified: 20150124204508000 +tags: [[Filter Operators]] [[Order Operators]] +title: last Operator +type: text/vnd.tiddlywiki +caption: last +purpose: select the last <<.place n>> input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 1" +paramName="n" +output="the last <<.place n>> input titles" +/> + +<<.operator-examples "last">> diff --git a/editions/tw5.com/tiddlers/filters/limit.tid b/editions/tw5.com/tiddlers/filters/limit.tid new file mode 100644 index 000000000..c4b9dac3b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/limit.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124204544000 +tags: [[Filter Operators]] [[Common Operators]] [[Order Operators]] [[Negatable Operators]] +title: limit Operator +type: text/vnd.tiddlywiki +caption: limit +purpose: select the first or last <<.place n>> input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 0" +paramName="n" +output="the first <<.place n>> input titles" +negationOutput="the last <<.place n>> input titles" +/> + +`limit[n]` and `!limit[n]` are synonyms for `first[n]` and `last[n]` respectively. + +<<.operator-examples "limit">> diff --git a/editions/tw5.com/tiddlers/filters/links.tid b/editions/tw5.com/tiddlers/filters/links.tid new file mode 100644 index 000000000..ca93cf1a8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/links.tid @@ -0,0 +1,17 @@ +created: 20140410103123179 +modified: 20150124184844000 +tags: [[Filter Operators]] [[Common Operators]] +title: links Operator +type: text/vnd.tiddlywiki +caption: links +purpose: find the titles linked to by each input title + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="the titles to which the input tiddlers contain [[hard links|Hard and Soft Links]]" +/> + +Each input title is processed in turn. The corresponding tiddler's list of links is generated, in the order in which they appear in the tiddler's text, and [[dominantly appended|Dominant Append]] to the operator's overall output. + +<<.operator-examples "links">> diff --git a/editions/tw5.com/tiddlers/filters/list.tid b/editions/tw5.com/tiddlers/filters/list.tid new file mode 100644 index 000000000..fcdb7581e --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/list.tid @@ -0,0 +1,23 @@ +created: 20140410103123179 +modified: 20150124203324000 +tags: [[Filter Operators]] [[Field Operators]] [[Absolute Operators]] [[Negatable Operators]] +title: list Operator +type: text/vnd.tiddlywiki +caption: list +purpose: select titles via a list field + +<$macrocall $name=".operator-def" +input="ignored" +negationInput="a [[selection of titles|Title Selection]]" +parameter="a [[reference|TextReference]] to a [[field|TiddlerFields]] or [[property|DataTiddlers]] of a particular tiddler" +paramName="r" +output="the titles stored as a [[title list|Title List]] at <<.place r>>" +negationOutput="those input titles that are <<.em not>> mentioned at <<.place r>>" +/> + +<<.place r>> can reference either a field or a property. See [[TextReference]] for the syntax. + +* If neither is specified, the <<.field list>> field is used by default. So `[list[T]]` outputs the titles listed in the <<.field list>> of tiddler T. +* If <<.place r>> consists of <<.em only>> a field or a property, the tiddler part of the reference defaults to the CurrentTiddler. So `[list[!!tags]]` outputs the titles listed in the <<.field tags>> field of the current tiddler. + +<<.operator-examples "list">> diff --git a/editions/tw5.com/tiddlers/filters/listed.tid b/editions/tw5.com/tiddlers/filters/listed.tid new file mode 100644 index 000000000..b5095f8d1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/listed.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20150124203638000 +tags: [[Filter Operators]] [[Field Operators]] +title: listed Operator +type: text/vnd.tiddlywiki +caption: listed +purpose: find the titles that list the input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]], defaulting to <<.field list>>" +paramName="f" +output="the titles in which field <<.place f>> mentions any of the input titles" +/> + +<<.field f>> is assumed to be a [[title list|Title List]]. + +Each input title is processed in turn. A list of tiddlers whose <<.place f>> field mentions it is generated (in no particular order) and [[dominantly appended|Dominant Append]] to the operator's overall output. + +<<.operator-examples "listed">> diff --git a/editions/tw5.com/tiddlers/filters/modules.tid b/editions/tw5.com/tiddlers/filters/modules.tid new file mode 100644 index 000000000..a3e525837 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/modules.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20150124170624000 +tags: [[Filter Operators]] [[Special Operators]] +title: modules Operator +type: text/vnd.tiddlywiki +caption: modules +purpose: select the names of all modules of the input module types + +<$macrocall $name=".operator-def" +input="a [[selection|Title Selection]] of module types" +parameter="none" +output="the title of each module with any of the input types" +/> + +<<.operator-examples "modules">> diff --git a/editions/tw5.com/tiddlers/filters/moduletypes.tid b/editions/tw5.com/tiddlers/filters/moduletypes.tid new file mode 100644 index 000000000..d47d1580d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/moduletypes.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20150124170640000 +tags: [[Filter Operators]] [[Special Operators]] [[Absolute Operators]] +title: moduletypes Operator +type: text/vnd.tiddlywiki +caption: moduletypes +purpose: select the names of all ~TiddlyWiki module types + +<$macrocall $name=".operator-def" +input="ignored" +parameter="none" +output="the name of each known ~TiddlyWiki [[module type|ModuleType]], in alphabetical order" +/> + +<<.operator-examples "moduletypes">> diff --git a/editions/tw5.com/tiddlers/filters/next.tid b/editions/tw5.com/tiddlers/filters/next.tid new file mode 100644 index 000000000..9e3415d41 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/next.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20150124171754000 +tags: [[Filter Operators]] [[Field Operators]] [[Order Operators]] +title: next Operator +type: text/vnd.tiddlywiki +caption: next +purpose: find which titles in a <<.field list>> field follow the input ones + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a tiddler title" +paramName="t" +output="a selection containing each title that immediately follows each of the input titles in the <<.field list>> field of <<.place t>>" +/> + +Each input title is processed in turn, and its successor is located in the <<.field list>> field and appended to the output. If a title is not listed in the field, or is the last title there, then it contributes nothing to the output. + +<<.operator-examples "next">> diff --git a/editions/tw5.com/tiddlers/filters/nsort.tid b/editions/tw5.com/tiddlers/filters/nsort.tid new file mode 100644 index 000000000..7bd2d78ad --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/nsort.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124205344000 +tags: [[Filter Operators]] [[Field Operators]] [[Order Operators]] [[Negatable Operators]] +title: nsort Operator +type: text/vnd.tiddlywiki +caption: nsort +purpose: sort the input by number field + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]], defaulting to <<.field title>>" +paramName="f" +output="the input, sorted into ascending order by field <<.field f>>, treating field values as numbers" +negationOutput="the input, likewise sorted into descending order" +/> + +Non-numeric values are treated as having a higher value than any number, and the difference between capital and lowercase letters is ignored. Compare <<.olink nsortcs>>. + +<<.operator-examples "nsort">> diff --git a/editions/tw5.com/tiddlers/filters/nsortcs.tid b/editions/tw5.com/tiddlers/filters/nsortcs.tid new file mode 100644 index 000000000..e546589b2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/nsortcs.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124205339000 +tags: [[Filter Operators]] [[Field Operators]] [[Order Operators]] [[Negatable Operators]] +title: nsortcs Operator +type: text/vnd.tiddlywiki +caption: nsortcs +purpose: sort the input titles by number field, ignoring case + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]], defaulting to <<.field title>>" +paramName="f" +output="the input, sorted into ascending order by field <<.field f>>, treating field values as numbers" +negationOutput="the input, likewise sorted into descending order" +/> + +Non-numeric values are treated as having a higher value than any number, and capital and lowercase letters are treated as different. Compare <<.olink nsort>>. + +<<.operator-examples "nsortcs">> diff --git a/editions/tw5.com/tiddlers/filters/nth.tid b/editions/tw5.com/tiddlers/filters/nth.tid new file mode 100644 index 000000000..ed8058b0d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/nth.tid @@ -0,0 +1,18 @@ +created: 20150122204111000 +modified: 20150124204959000 +tags: [[Filter Operators]] [[Order Operators]] +title: nth Operator +type: text/vnd.tiddlywiki +caption: nth +purpose: select the <<.place n>>th input title + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 1" +paramName="n" +output="the <<.place n>>th input title" +/> + +<<.place n>> is one-based. In other words, `nth[1]` has the same effect as the <<.olink first>> operator. + +<<.operator-examples "nth">> diff --git a/editions/tw5.com/tiddlers/filters/plugintiddlers.tid b/editions/tw5.com/tiddlers/filters/plugintiddlers.tid new file mode 100644 index 000000000..95b4dfab6 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/plugintiddlers.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20150124200549000 +tags: [[Filter Operators]] [[Special Operators]] +title: plugintiddlers Operator +type: text/vnd.tiddlywiki +caption: plugintiddlers +purpose: select all shadow titles in the input plugins + +<$macrocall $name=".operator-def" +input="a [[selection|Title Selection]] of plugin tiddler titles" +parameter="none" +output="all shadow titles contained in the input plugins" +/> + +<<.operator-examples "plugintiddlers">> diff --git a/editions/tw5.com/tiddlers/filters/prefix.tid b/editions/tw5.com/tiddlers/filters/prefix.tid new file mode 100644 index 000000000..bb4e3a908 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/prefix.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124192023000 +tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]] +title: prefix Operator +type: text/vnd.tiddlywiki +caption: prefix +purpose: filter the input titles by how they start + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="those input titles that start with <<.place s>>" +negationOutput="those input tiddlers that do <<.em not>> start with <<.place s>>" +/> + +<<.s-matching-is-case-sensitive>> + +<<.operator-examples "prefix">> diff --git a/editions/tw5.com/tiddlers/filters/previous.tid b/editions/tw5.com/tiddlers/filters/previous.tid new file mode 100644 index 000000000..43966dc1a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/previous.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20150124171748000 +tags: [[Filter Operators]] [[Field Operators]] [[Order Operators]] +title: previous Operator +type: text/vnd.tiddlywiki +caption: previous +purpose: find which titles in a <<.field list>> field precede the input ones + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a tiddler title" +paramName="t" +output="a selection containing each title that immediately precedes each of the input titles in the <<.field list>> field of <<.place t>>" +/> + +Each input title is processed in turn, and its predecessor is located in the <<.field list>> field and appended to the output. If a title is not listed in the field, or is the first item there, then it contributes nothing to the output. + +<<.operator-examples "previous">> diff --git a/editions/tw5.com/tiddlers/filters/regexp.tid b/editions/tw5.com/tiddlers/filters/regexp.tid new file mode 100644 index 000000000..49d825150 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/regexp.tid @@ -0,0 +1,31 @@ +created: 20140909134102102 +modified: 20150124203736000 +tags: [[Filter Operators]] [[Field Operators]] [[Negatable Operators]] +title: regexp Operator +type: text/vnd.tiddlywiki +caption: regexp +purpose: filter the input by pattern-matched field + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +suffix="the name of a [[field|TiddlerFields]]" +suffixName="f" +parameter="a regular expression" +paramName="x" +output="those input tiddlers in which field <<.place f>> matches <<.place x>>" +negationOutput="those input tiddlers in which field <<.place f>> does <<.em not>> match <<.place x>>" +/> + +<<.def "Regular expressions">> are concise strings of characters that denote patterns of text to search for. The format used in ~TiddlyWiki is fully defined in [[this Mozilla reference|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions]]. + +The [[filter syntax|Filter Run]] makes it impossible to directly specify a regular expression that contains square brackets. The solution is to store the expression in a [[variable|Variables]]. See the <<.operator-examples "regexp" "examples">>. + +The parameter <<.place x>> can optionally start or end with a string of flags: + +<$railroad text=""" "(?" { ("i"|"m"|:"g") } ")" """/> + +Only the `i` flag is generally useful: it forces the different between capital and lowercase letters to be ignored. + +If <<.place x>> is empty, <<.op regexp>> will match all of the input tiddlers. + +<<.operator-examples "regexp">> diff --git a/editions/tw5.com/tiddlers/filters/removeprefix.tid b/editions/tw5.com/tiddlers/filters/removeprefix.tid new file mode 100644 index 000000000..39947c882 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/removeprefix.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20150124173431000 +tags: [[Filter Operators]] [[String Operators]] +title: removeprefix Operator +type: text/vnd.tiddlywiki +caption: removeprefix +purpose: filter the input titles by how they start, deleting that prefix + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="those input titles that start with <<.place s>>, but with those characters discarded" +/> + +<<.s-matching-is-case-sensitive>> + +<<.operator-examples "removeprefix">> diff --git a/editions/tw5.com/tiddlers/filters/removesuffix.tid b/editions/tw5.com/tiddlers/filters/removesuffix.tid new file mode 100644 index 000000000..2db32d2ce --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/removesuffix.tid @@ -0,0 +1,18 @@ +created: 20140828133830424 +modified: 20150124173434000 +tags: [[Filter Operators]] [[String Operators]] +title: removesuffix Operator +type: text/vnd.tiddlywiki +caption: removesuffix +purpose: filter the input titles by how they end, deleting that suffix + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="those input titles that end with <<.place s>>, but with those characters discarded" +/> + +<<.s-matching-is-case-sensitive>> + +<<.operator-examples "removesuffix">> diff --git a/editions/tw5.com/tiddlers/filters/rest.tid b/editions/tw5.com/tiddlers/filters/rest.tid new file mode 100644 index 000000000..6242da65a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/rest.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20150124191714000 +tags: [[Filter Operators]] [[Order Operators]] +title: rest Operator +type: text/vnd.tiddlywiki +caption: rest +purpose: discard the first <<.place n>> input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="an integer, defaulting to 1" +paramName="n" +output="all but the first <<.place n>> input titles" +/> + +<<.olink butfirst>> and <<.olink bf>> are synonyms for <<.op rest>>. + +<<.operator-examples "rest">> diff --git a/editions/tw5.com/tiddlers/filters/reverse.tid b/editions/tw5.com/tiddlers/filters/reverse.tid new file mode 100644 index 000000000..79ae04c1d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/reverse.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20150124205130000 +tags: [[Filter Operators]] [[Order Operators]] +title: reverse Operator +type: text/vnd.tiddlywiki +caption: reverse +purpose: reverse the order of the input titles + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="the input, in reverse order" +/> + +<<.operator-examples "reverse">> diff --git a/editions/tw5.com/tiddlers/filters/sameday.tid b/editions/tw5.com/tiddlers/filters/sameday.tid new file mode 100644 index 000000000..03580ea9c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/sameday.tid @@ -0,0 +1,22 @@ +created: 20140410103123179 +modified: 20150124214612000 +tags: [[Filter Operators]] [[Date Operators]] +title: sameday Operator +type: text/vnd.tiddlywiki +caption: sameday +purpose: filter the input by date + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +suffix="the name of a [[date field|Date Fields]], defaulting to <<.field modified>>" +suffixName="f" +parameter="a date, in the [[format|DateFormat]] `YYYYMMDD`" +paramName="d" +output="those input tiddlers in which field <<.place f>> has the value <<.place d>>, ignoring time" +/> + +If <<.place d>> is not a valid date, the output is empty. + +<<.place d>> may include a time of day, but this is ignored. + +<<.operator-examples "sameday">> diff --git a/editions/tw5.com/tiddlers/filters/search.tid b/editions/tw5.com/tiddlers/filters/search.tid new file mode 100644 index 000000000..d821dc42c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/search.tid @@ -0,0 +1,24 @@ +created: 20140410103123179 +modified: 20150124204023000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]] +title: search Operator +type: text/vnd.tiddlywiki +caption: search +purpose: filter the input by searching tiddler content + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +suffix="optionally, the name of a [[field|TiddlerFields]]" +suffixName="f" +parameter="one or more search terms, separated by spaces" +output="those input tiddlers in which <<.em all>> of the search terms can be found in the value of field <<.place f>>" +negationOutput="those input tiddlers in which <<.em not>> all of the search terms can be so found" +/> + +When used with a suffix, the <<.op search>> operator is similar to <<.olink regexp>> but less powerful. + +If the suffix is omitted, a tiddler is deemed to match if all the search terms appear in the combination of its <<.field tags>>, <<.field text>> and <<.field title>> fields. + +The search ignores the difference between capital and lowercase letters. + +<<.operator-examples "search">> diff --git a/editions/tw5.com/tiddlers/filters/shadowsource.tid b/editions/tw5.com/tiddlers/filters/shadowsource.tid new file mode 100644 index 000000000..65f54c8c2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/shadowsource.tid @@ -0,0 +1,17 @@ +created: 20140410103123179 +modified: 20150124210534000 +tags: [[Filter Operators]] [[Special Operators]] +title: shadowsource Operator +type: text/vnd.tiddlywiki +caption: shadowsource +purpose: select the plugin titles that contain the input shadows + +<$macrocall $name=".operator-def" +input="a [[selection|Title Selection]] of [[shadow titles|ShadowTiddlers]]" +parameter="none" +output="the [[plugins|Plugins]] that contain the input tiddlers" +/> + +Each input title is processed in turn. If it denotes a shadow tiddler, the title of its plugin tiddler is [[dominantly appended|Dominant Append]] to the output. Non-shadow tiddlers contribute nothing to the output. + +<<.operator-examples "shadowsource">> diff --git a/editions/tw5.com/tiddlers/filters/sort.tid b/editions/tw5.com/tiddlers/filters/sort.tid new file mode 100644 index 000000000..85bc646b8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/sort.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124205350000 +tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Order Operators]] [[Negatable Operators]] +title: sort Operator +type: text/vnd.tiddlywiki +caption: sort +purpose: sort the input by text field + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]], defaulting to <<.field title>>" +paramName="f" +output="the input, sorted into ascending order by field <<.field f>>, treating field values as text" +negationOutput="the input, likewise sorted into descending order" +/> + +The difference between capital and lowercase letters is ignored. Compare <<.olink sortcs>>. + +<<.operator-examples "sort">> diff --git a/editions/tw5.com/tiddlers/filters/sortcs.tid b/editions/tw5.com/tiddlers/filters/sortcs.tid new file mode 100644 index 000000000..3fb0d369d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/sortcs.tid @@ -0,0 +1,19 @@ +created: 20140410103123179 +modified: 20150124205353000 +tags: [[Filter Operators]] [[Field Operators]] [[Order Operators]] [[Negatable Operators]] +title: sortcs Operator +type: text/vnd.tiddlywiki +caption: sortcs +purpose: sort the input by text field, ignoring case + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the name of a [[field|TiddlerFields]], defaulting to <<.field title>>" +paramName="f" +output="the input, sorted into ascending order by field <<.field f>>, treating field values as text" +negationOutput="the input, likewise sorted into descending order" +/> + +Capital and lowercase letters are treated as different. Compare <<.olink sort>>. + +<<.operator-examples "sortcs">> diff --git a/editions/tw5.com/tiddlers/filters/splitbefore.tid b/editions/tw5.com/tiddlers/filters/splitbefore.tid new file mode 100644 index 000000000..1178ddeaa --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/splitbefore.tid @@ -0,0 +1,25 @@ +created: 20150126142522000 +modified: 20150126143945000 +tags: [[Filter Operators]] [[String Operators]] +title: splitbefore Operator +type: text/vnd.tiddlywiki +caption: splitbefore +purpose: select a delimited prefix from each input title + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters marking the end of the prefix" +paramName="s" +output="the prefix, up to and including <<.place S>>, of each input title" +/> + +Each input title is processed in turn. + +* A title that contains <<.place s>> contributes everything up to and including <<.place s>>. +* A title that doesn't contain <<.place s>> simply contributes itself to the output. + +Contributions are [[dominantly appended|Dominant Append]] to the output. + +The <<.clink "`toc`" TableOfContentsMacro>> macros use this operator with `/` as the parameter. + +<<.operator-examples "splitbefore">> diff --git a/editions/tw5.com/tiddlers/filters/storyviews.tid b/editions/tw5.com/tiddlers/filters/storyviews.tid new file mode 100644 index 000000000..071f4fe48 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/storyviews.tid @@ -0,0 +1,17 @@ +created: 20150126141718000 +modified: 20150126142035000 +tags: [[Filter Operators]] [[Special Operators]] +title: storyviews Operator +type: text/vnd.tiddlywiki +caption: storyviews +purpose: select the names of all the story views + +<$macrocall $name=".operator-def" +input="ignored" +parameter="none" +output="the name of each story view" +/> + +The names are those exported by [[modules|Modules]] whose <<.field module-type>> is <<.value storyview>>. + +<<.operator-examples "storyviews">> diff --git a/editions/tw5.com/tiddlers/filters/suffix.tid b/editions/tw5.com/tiddlers/filters/suffix.tid new file mode 100644 index 000000000..a4653b6ce --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/suffix.tid @@ -0,0 +1,19 @@ +created: 20140828133830424 +modified: 20150124192043000 +tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]] +title: suffix Operator +type: text/vnd.tiddlywiki +caption: suffix +purpose: filter the input titles by how they end + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="a string of characters" +paramName="s" +output="those input titles that end with <<.place p>>" +negationOutput="those input tiddlers that do <<.em not>> end with <<.place p>>" +/> + +<<.s-matching-is-case-sensitive>> + +<<.operator-examples "suffix">> diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterExpression.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterExpression.tid new file mode 100644 index 000000000..694f44dc2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterExpression.tid @@ -0,0 +1,28 @@ +created: 20150124182421000 +modified: 20150124184900000 +tags: [[Filter Syntax]] +title: Filter Expression +type: text/vnd.tiddlywiki + +<$railroad text=""" +[{: + [: [[whitespace|"Filter Whitespace"]] ] + ("+"|:-|"-") + [[run|"Filter Run"]] +}] +"""/> + +A <<.def "filter expression">> is the outermost level of the [[filter syntax|Filter Syntax]]. It consists of one or more [[runs|Filter Run]]. + +A run's input is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order). But the `+` prefix can change this. + +* If a run has no `+` or `-` prefix, its output titles are [[dominantly appended|Dominant Append]] to the filter's output. +* If a run has a `-` prefix, its output titles 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 |!Output | +|`run` |union of sets |... OR run | +|`+run` |intersection of sets |... AND run | +|`-run` |difference of sets |... AND NOT run | diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterParameter.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterParameter.tid new file mode 100644 index 000000000..a3f734bfe --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterParameter.tid @@ -0,0 +1,27 @@ +created: 20151714300000000 +modified: 20150124191518000 +tags: [[Filter Syntax]] +title: Filter Parameter +type: text/vnd.tiddlywiki + +<$railroad text=""" +( "[" [:{/"anything but ]"/}] "]" + | + "{" [:{/"anything but }"/}] "}" + | + "<" [:{/"anything but >"/}] ">" +) +"""/> + +The parameter to a [[filter operator|Filter Operators]] can be: + +;<<.def hard>> +: `[like this]` +: The parameter is the exact text that appears between the square brackets. +;<<.def soft>> +: <<.def indirect>> +:: `{like this}` +:: The parameter is the text indicated by the [[text reference|TextReference]] whose name appears between the curly brackets, i.e. a [[field|TiddlerFields]] of a specified tiddler, or the value of a property of a specified [[data tiddler|DataTiddlers]]. +: <<.def variable>> +:: `` +:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterRun.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterRun.tid new file mode 100644 index 000000000..ecc5e381b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterRun.tid @@ -0,0 +1,26 @@ +created: 20150124182117000 +modified: 20150124190233000 +tags: [[Filter Syntax]] +title: Filter Run +type: text/vnd.tiddlywiki + +<$railroad text=""" +( "[" { [[step|"Filter Step"]] } "]" + | + [:{/"anything but [ ] or whitespace"/}] + | + '"' [:{/'anything but "'/}] '"' + | + "'" [:{/"anything but '"/}] '"' +) +"""/> + +A <<.def run>> consists of [[steps|Filter Step]], and it outputs a [[selection|Title Selection]] that contributes to a larger [[filter expression|Filter Expression]]. + +The steps 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. + +{{Absolute Operators}} + +The lower three options in the diagram match syntax like `HelloThere`, `"HelloThere"`, `'HelloThere'` and `"Filter Operators"`. They are short for `[title[...]]`. + +The quoted options exist to support titles that contain square brackets, as in `"An [[[[Unusual]]]] Tiddler"`. diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterStep.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterStep.tid new file mode 100644 index 000000000..0b8a149e8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterStep.tid @@ -0,0 +1,21 @@ +created: 20150124182127000 +modified: 20150124191051000 +tags: [[Filter Syntax]] +title: Filter Step +type: text/vnd.tiddlywiki + +<$railroad text=""" +[:"!"] +[: [[operator|"Filter Operators"]] [:":" suffix] ] +[[parameter|"Filter Parameter"]] +"""/> + +A <<.def step>> represents a single operation within a [[filter|Filter Syntax]]. + +In programming terms, it is akin to a function call to which [[the step's input|Filter Run]] is passed as an implicit parameter. A step's output is a [[selection|Title Selection]] that contributes to a [[run|Filter Run]] and hence to the entire [[filter expression|Filter Expression]] that contains it. + +The step's <<.def operator>> is drawn from a list of [[predefined keywords|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`. + +The <<.def suffix>> is additional text, often the name of a [[field|TiddlerFields]], that extends the meaning of certain operators. + +Many steps require an explicit <<.def parameter>> value, also known as an <<.def operand>>, that further defines what the step is to do. diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterSyntax.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterSyntax.tid new file mode 100644 index 000000000..0190aabab --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterSyntax.tid @@ -0,0 +1,18 @@ +created: 20140210141217955 +modified: 20150124184229000 +tags: Filters +title: Filter Syntax +type: text/vnd.tiddlywiki +list: [[Filter Expression]] [[Filter Run]] [[Filter Step]] [[Filter Parameter]] [[Filter Whitespace]] + +<<.preamble """[[Filters]] follow a grammar that is presented here, using [[railroad diagrams|Railroad Diagrams]], for those who find formal syntax descriptions helpful. However, you can [[learn to write filters|Introduction to filter notation]] without needing to understand this group of tiddlers.""">> + +A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets of titles|Title Selection]] of things like tiddlers and fields. + +Filters are [[expressions|Filter Expression]] constructed from smaller building blocks, called [[runs|Filter Run]] and [[steps|Filter Step]], each of which also transforms an input to an output. + +A filter starts with an empty output. Its runs are processed from left to right, progressively modifying the output. + +Here are details of the various building blocks involved: + +<> diff --git a/editions/tw5.com/tiddlers/filters/syntax/FilterWhitespace.tid b/editions/tw5.com/tiddlers/filters/syntax/FilterWhitespace.tid new file mode 100644 index 000000000..f31422b3d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/FilterWhitespace.tid @@ -0,0 +1,11 @@ +created: 20150124182304000 +modified: 20150125105243000 +tags: [[Filter Syntax]] +title: Filter Whitespace +type: text/vnd.tiddlywiki + +<$railroad text=""" +{( "space" | "tab" | "linefeed" | "return" | "vertical tab" | "formfeed" )} +"""/> + +Whitespace characters can appear between each [[run|Filter Run]] of a [[filter expression|Filter Expression]]. diff --git a/editions/tw5.com/tiddlers/filters/tag.tid b/editions/tw5.com/tiddlers/filters/tag.tid new file mode 100644 index 000000000..d908a9950 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/tag.tid @@ -0,0 +1,21 @@ +created: 20140410103123179 +modified: 20150124205948000 +tags: [[Filter Operators]] [[Common Operators]] [[Tag Operators]] [[Negatable Operators]] +title: tag Operator +type: text/vnd.tiddlywiki +caption: tag +purpose: filter the input by tag + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="the title of a [[tag|Tagging]]" +paramName="t" +output="those input tiddlers that have tag <<.place t>>" +negationOutput="those input tiddlers that do <<.em not>> have tag <<.place t>>" +/> + +The output is [[sorted|Order of Tagged Tiddlers]] using the tag's <<.field list>> field and the tiddlers' <<.field list-before>> and <<.field list-after>> fields. + +If <<.place t>> is empty, the output of `tag` is empty, and the output of `!tag` is a copy of the input. + +<<.operator-examples "tag">> diff --git a/editions/tw5.com/tiddlers/filters/tagging.tid b/editions/tw5.com/tiddlers/filters/tagging.tid new file mode 100644 index 000000000..c8ccce101 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/tagging.tid @@ -0,0 +1,17 @@ +created: 20140410103123179 +modified: 20150124205941000 +tags: [[Filter Operators]] [[Tag Operators]] +title: tagging Operator +type: text/vnd.tiddlywiki +caption: tagging +purpose: find the tiddlers that have the input tags + +<$macrocall $name=".operator-def" +input="a [[selection|Title Selection]] of [[tags|Tagging]]" +parameter="none" +output="the titles of any tiddlers that carry the input tags" +/> + +Each input tag is processed in turn. The list of tiddlers carrying that tag is generated, [[sorted|Order of Tagged Tiddlers]], and then [[dominantly appended|Dominant Append]] to the operator's overall output. + +<<.operator-examples "tagging">> diff --git a/editions/tw5.com/tiddlers/filters/tags.tid b/editions/tw5.com/tiddlers/filters/tags.tid new file mode 100644 index 000000000..7dc972fd4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/tags.tid @@ -0,0 +1,17 @@ +created: 20140410103123179 +modified: 20150124210613000 +tags: [[Filter Operators]] [[Tag Operators]] +title: tags Operator +type: text/vnd.tiddlywiki +caption: tags +purpose: select all tags of the input tiddlers + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="all the tags carried by the input tiddlers" +/> + +Each input title is processed in turn. The corresponding tiddler's tags are retrieved (in order of appearance in the <<.field tags>> field) and then [[dominantly appended|Dominant Append]] to the operator's output. + +<<.operator-examples "tags">> diff --git a/editions/tw5.com/tiddlers/filters/title.tid b/editions/tw5.com/tiddlers/filters/title.tid new file mode 100644 index 000000000..5dda38e29 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/title.tid @@ -0,0 +1,22 @@ +created: 20140410103123179 +modified: 20150124192051000 +tags: [[Filter Operators]] [[Common Operators]] [[Absolute Operators]] [[Negatable Operators]] +title: title Operator +type: text/vnd.tiddlywiki +caption: title +purpose: select a single title + +<$macrocall $name=".operator-def" +input="ignored" +negationInput="a [[selection of titles|Title Selection]]" +parameter="a tiddler title" +paramName="t" +output="a selection containing only <<.place t>>" +negationOutput="the input, but with tiddler <<.place t>> filtered out if it exists in the wiki" +/> + +`[title[An Example]]` can be shortened to `[[An Example]]`, because <<.op title>> is the default filter operator. + +<<.op title>> is an [[absolute operator|Absolute Operators]] (except in the form `!title`), but <<.olink2 "field:title" field>> is relative. + +<<.operator-examples "title">> diff --git a/editions/tw5.com/tiddlers/filters/untagged.tid b/editions/tw5.com/tiddlers/filters/untagged.tid new file mode 100644 index 000000000..84ed30f5c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/untagged.tid @@ -0,0 +1,22 @@ +created: 20140410103123179 +modified: 20150124192055000 +tags: [[Filter Operators]] [[Tag Operators]] [[Negatable Operators]] +title: untagged Operator +type: text/vnd.tiddlywiki +caption: untagged +purpose: discard any input titles that have tags + +<$macrocall $name=".operator-def" +input="a [[selection of titles|Title Selection]]" +parameter="none" +output="those input tiddlers that have no tags" +negationOutput="those input tiddlers that have at least one tag" +/> + +A tiddler is deemed to have no tags if it: + +* doesn't exist +* doesn't have a <<.field tags>> field +* has an empty <<.field tags>> field + +<<.operator-examples "untagged">> diff --git a/editions/tw5.com/tiddlers/howtos/Structuring TiddlyWiki.tid b/editions/tw5.com/tiddlers/howtos/Structuring TiddlyWiki.tid index e4b292cb1..b0d6f34d3 100644 --- a/editions/tw5.com/tiddlers/howtos/Structuring TiddlyWiki.tid +++ b/editions/tw5.com/tiddlers/howtos/Structuring TiddlyWiki.tid @@ -1,5 +1,5 @@ created: 20131128090536894 -modified: 20140919155834905 +modified: 20150124211518000 tags: [[Working with TiddlyWiki]] title: Structuring TiddlyWiki type: text/vnd.tiddlywiki @@ -8,5 +8,5 @@ TiddlyWiki5 provides several features to help you structure information as [[tid * TiddlerLinks * [[Tagging]] -* TiddlerLists +* [[Title Lists|Title List]] * DataTiddlers diff --git a/editions/tw5.com/tiddlers/howtos/Tagging.tid b/editions/tw5.com/tiddlers/howtos/Tagging.tid index 5b6cf411d..cfcf93f7b 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: 20150124202936000 tags: [[Working with TiddlyWiki]] Concepts title: Tagging type: text/vnd.tiddlywiki @@ -33,13 +33,8 @@ 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. +If you want any other order, add a <<.flink ListField>> field to the tag tiddler, and set its value to be a [[list of the tiddlers|Title List]] in that order. -The ''list'' field doesn't have to mention all of the tiddlers. Here are the precise rules ~TiddlyWiki uses to order tagged tiddlers: - -# Start with the tiddlers in the ''list'' field, in the sequence given there. -# In each remaining tiddler, look for a ''list-before'' field. If this has a tiddler title as its value, insert the tiddler into the sequence just before that one. As a special case, if the field's value is blank, add the tiddler at the very start of the sequence. -# In each remaining tiddler, look for a ''list-after'' field. If this has a tiddler title as its value, insert the tiddler into the sequence just after that one. -# If any tiddlers still remain, add them to the very end of the sequence. +The ''list'' field doesn't have to mention all of the tiddlers. See the [[precise rules|Order of Tagged Tiddlers]] ~TiddlyWiki uses to order tagged tiddlers. 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.14beta.tid b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.14beta.tid index 2aeec4f68..54c8eff57 100644 --- a/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.14beta.tid +++ b/editions/tw5.com/tiddlers/releasenotes/beta/Release 5.0.14beta.tid @@ -1,6 +1,6 @@ caption: 5.0.14-beta created: 20140718150234142 -modified: 20140813153116300 +modified: 20150124211128000 tags: BetaReleaseNotes title: Release 5.0.14-beta type: text/vnd.tiddlywiki @@ -57,8 +57,8 @@ For 5.0.14-beta, the setting has been changed. Visit [[control panel|$:/ControlP * [[Extended|https://github.com/Jermolene/TiddlyWiki5/commit/c23f6af4b5c59f4d09dd8d6704e1939bb9d5b2d3]] TiddlerWidget to add a CSS class corresponding to each tag present on displayed tiddlers * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/d357e1706c91d17a72fb19fedf43e57071fc7dd6]] support for hiding specified fields in the tiddler editor -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/be040ea8a2cc8962f1a28a313e4c9ebc2d5c0e31]] support for variable operands in filters (see [[Introduction to Filters]]) -* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1f16ef6fa88b51d2dad7c8e57fcff014950a7442]] support for widget messages [[tw-permalink|WidgetMessage: tw-permalink]] and [[tw-permaview|WidgetMessage: tw-permaview]] +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/be040ea8a2cc8962f1a28a313e4c9ebc2d5c0e31]] support for variable operands in filters (see [[Filter Parameter]]) +* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/1f16ef6fa88b51d2dad7c8e57fcff014950a7442]] support for widget messages [[tw-permalink|WidgetMessage: tw-permalink]] and [[tw-permaview|WidgetMessage: tw-permaview]] * [[Added|https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/browser-sniff]] browser sniffing plugin so that tiddlywiki.com can present the correct browser-specific documentation * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ef67cc3fd9b267a522598abccdfbb93fbfca240c]] a configuration option for specifying the default location for saving new tiddlers in the client-server configuration * [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/b4d47858e587c96f3a68cc28cffff181ec45f55f]] support for the InfoMechanism 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..31c8ffe1f 100644 --- a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +++ b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid @@ -1,140 +1,148 @@ created: 20150110182600000 +modified: 20150123221155000 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 nam e|<<.var currentTiddler>> | +|.wid |a widget name |<<.wid list>> | +|.attr |an attribute name |<<.attr filter>> | !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..810c0e870 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -1,38 +1,53 @@ +created: 20150117152607000 +modified: 20150124180333000 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 .def(_) $_$ +\define .em(_) $_$ +\define .strong(_) $_$ +\define .place(_) $_$ +\define .word(_) "$_$" -\define doc-def(_) $_$ -\define doc-em(_) $_$ -\define doc-strong(_) $_$ -\define doc-ph(_) $_$ -\define doc-w(_) "$_$" +\define .preamble(_) :.doc-preamble $_$ +\define .note(_) +@@.doc-note +;Note +: $_$ +@@ +\end -\define doc-tiddler(_) $_$ -\define doc-tag(_) $_$ -\define doc-field(_) $_$ -\define doc-field-value(_) $_$ -\define doc-var(_) $_$ -\define doc-widget(_) $_$ +\define .tid(_) $_$ +\define .tag(_) $_$ +\define .field(_) $_$ +\define .value(_) $_$ +\define .op(_) $_$ +\define .var(_) $_$ +\define .wid(_) $$_$ +\define .attr(_) $_$ -\define doc-link(_,to) <$link to="$to$">$_$ -\define doc-clink(_,to) <> +\define .otitle(_) $_$ Operator -\define doc-key(_) $_$ -\define doc-combo-key(_) <$macrocall $name="doc-if" cond="$_$" then="<>"/> -\define doc-key-combo(1,2,3,4) <><><><><><><> +\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-input(_) `$_$` -\define doc-output(_) `$_$` +\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-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 .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 doc-button(_) {{$:/core/ui/Buttons/$_$!!caption}} +\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..75914c677 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: 20150126091948000 title: $:/editions/tw5.com/doc-styles tags: $:/tags/Stylesheet @@ -22,10 +24,13 @@ tags: $:/tags/Stylesheet font-style: italic; } -.doc-ph { +.doc-place { + background-color: <>; border: none; - color: <>; - font-style: italic; + color: <>; + font-style: normal; + font-weight: bold; + text-transform: uppercase; } .doc-button, @@ -33,20 +38,40 @@ tags: $:/tags/Stylesheet .doc-tag, .doc-tiddler, .doc-field, -.doc-field-value, +.doc-value, +.doc-operator, .doc-var, -.doc-widget { - background: <>; +.doc-widget, +.doc-attr { + 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, +a .doc-attr { + color: <>; +} + .doc-button svg { height: 1em; } +td svg { + height: 1em; +} + .doc-key { color: <>; font-weight: bold; @@ -54,4 +79,45 @@ 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-note dt { + color: <>; +} +.doc-note dd { + border-left: 2px solid <>; + padding-left: 0.6em; +} + +.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; +} + +.doc-table th, .doc-table tr { + vertical-align: top; +} +.doc-table th a { + font-weight: bold; +} + +tr.doc-table-subheading { + height: 2em; + vertical-align: middle; +} diff --git a/editions/tw5.com/tiddlers/system/if-macro.js b/editions/tw5.com/tiddlers/system/if-macro.js new file mode 100644 index 000000000..6c902ed65 --- /dev/null +++ b/editions/tw5.com/tiddlers/system/if-macro.js @@ -0,0 +1,26 @@ +/*\ +title: $:/editions/tw5.com/if-macro.js +type: application/javascript +module-type: macro +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +exports.name = ".if"; + +exports.params = [ + { name: "cond" }, + { name: "then" }, + { name: "else" } +]; + +exports.run = function(cond, then, elze) { + then = then || ""; + elze = elze || ""; + return cond ? then : elze; +}; + +})(); 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..b56c48cd3 --- /dev/null +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -0,0 +1,55 @@ +created: 20150117152607000 +modified: 20150126144131000 +title: $:/editions/tw5.com/operator-macros +tags: $:/tags/Macro + +\define .operator-def(input,negationInput,suffix,suffixName,parameter,paramName,output,negationOutput) + + + +<$macrocall $name=".if" cond="""$negationInput$""" +then="""""" +else=""/> +<$macrocall $name=".if" cond="""$suffix$""" +then="""""" +else=""/> + + +<$macrocall $name=".if" cond="""$negationOutput$""" +then="""""" +else=""/> +
purpose{{!!purpose}}
[[input|Filter Syntax]]$input$
`!` input$negationInput$
[[suffix|Filter Step]]<<.place "$suffixName$">> = $suffix$
[[parameter|Filter Parameter]]<$macrocall $name=".if" cond="""$paramName$""" then="<<.place '$paramName$'>> = " else=""/>$parameter$
output$output$
`!` output$negationOutput$
+\end + +\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$ + +\define .operator-example(n,eg,ie) +
+`$eg$` +<$macrocall $name=".if" cond="""$ie$""" then="""
→ $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 .s-matching-is-case-sensitive() In looking for matches for <<.place s>>, capital and lowercase letters are treated as different. + +\define .node-only-operator() + +<$macrocall $name=".note" _="This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser."/> + +\end 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 +<<< diff --git a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid index 47f87b23d..e6fa8417b 100644 --- a/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid +++ b/editions/tw5.com/tiddlers/workingwithtw/Creating journal tiddlers.tid @@ -1,5 +1,5 @@ created: 20141010093214683 -modified: 20141125123700243 +modified: 20150124202942000 tags: [[Working with TiddlyWiki]] title: Creating journal tiddlers type: text/vnd.tiddlywiki @@ -29,7 +29,7 @@ For example, you might be reviewing a tiddler called ''Oxford Street'' and reali To configure how new journal entries are created, visit the ''Basics'' tab under ''Info'' in the [[control panel|$:/ControlPanel]]: * "Title of new journal tiddlers" specifies how these tiddlers should be named, as a [[date format string|DateFormat]]. The default setting of `DDth MMM YYYY` causes new entries to have titles of the form "10th October 2014" -* "Tags for new journal tiddlers" [specifies|TitleList] tags that will automatically appear on new journal entries. For example: `Journal [[Summer vacation]]` +* "Tags for new journal tiddlers" [specifies|Title List] tags that will automatically appear on new journal entries. For example: `Journal [[Summer vacation]]` Hint: if you want to create a separate journal tiddler whenever you click ''new journal'' (even if you do this several times in the same day), you can include the clock time in the title format. Specify something like `YYYY-0MM-0DD at 0hhh0mm'0ss''` as the date format.