From 5a65898dbead8d58334546c36d8687c92aea71f1 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 10 Apr 2014 19:56:51 +0100 Subject: [PATCH] Update tiddler filter docs --- .../tiddlers/concepts/TiddlerLinks.tid | 4 +-- .../tiddlers/filters/FilterOperator all.tid | 20 ++++++++++++++ .../filters/FilterOperator backlinks.tid | 15 +++++++++++ .../tiddlers/filters/FilterOperator bf.tid | 7 +++++ .../filters/FilterOperator butfirst.tid | 7 +++++ .../filters/FilterOperator butlast.tid | 13 ++++++++++ .../filters/FilterOperator commands.tid | 13 ++++++++++ .../tiddlers/filters/FilterOperator each.tid | 26 +++++++++++++++++++ .../filters/FilterOperator eachday.tid | 20 ++++++++++++++ .../tiddlers/filters/FilterOperator field.tid | 20 ++++++++++++++ .../tiddlers/filters/FilterOperator first.tid | 13 ++++++++++ .../tiddlers/filters/FilterOperator has.tid | 13 ++++++++++ .../filters/FilterOperator indexes.tid | 13 ++++++++++ .../tiddlers/filters/FilterOperator is.tid | 25 ++++++++++++++++++ .../tiddlers/filters/FilterOperator last.tid | 13 ++++++++++ .../tiddlers/filters/FilterOperator limit.tid | 14 ++++++++++ .../tiddlers/filters/FilterOperator links.tid | 13 ++++++++++ .../tiddlers/filters/FilterOperator list.tid | 15 +++++++++++ .../filters/FilterOperator listed.tid | 13 ++++++++++ .../filters/FilterOperator modules.tid | 14 ++++++++++ .../filters/FilterOperator moduletypes.tid | 14 ++++++++++ .../tiddlers/filters/FilterOperator next.tid | 20 ++++++++++++++ .../tiddlers/filters/FilterOperator nsort.tid | 15 +++++++++++ .../filters/FilterOperator nsortcs.tid | 15 +++++++++++ .../tiddlers/filters/FilterOperator nth.tid | 13 ++++++++++ .../filters/FilterOperator plugintiddlers.tid | 14 ++++++++++ .../filters/FilterOperator prefix.tid | 15 +++++++++++ .../filters/FilterOperator previous.tid | 20 ++++++++++++++ .../filters/FilterOperator removeprefix.tid | 14 ++++++++++ .../tiddlers/filters/FilterOperator rest.tid | 13 ++++++++++ .../filters/FilterOperator reverse.tid | 12 +++++++++ .../filters/FilterOperator sameday.tid | 14 ++++++++++ .../filters/FilterOperator search.tid | 13 ++++++++++ .../filters/FilterOperator shadowsource.tid | 14 ++++++++++ .../tiddlers/filters/FilterOperator sort.tid | 15 +++++++++++ .../filters/FilterOperator sortcs.tid | 14 ++++++++++ .../tiddlers/filters/FilterOperator tag.tid | 18 +++++++++++++ .../filters/FilterOperator tagging.tid | 15 +++++++++++ .../tiddlers/filters/FilterOperator tags.tid | 15 +++++++++++ .../tiddlers/filters/FilterOperator title.tid | 15 +++++++++++ .../filters/FilterOperator untagged.tid | 15 +++++++++++ .../tiddlers/filters/FilterOperators.tid | 12 +++++++++ .../Introduction to Filters.tid} | 16 +++++------- .../resources/TWeb.at from Mario Pietsch.tid | 14 ++++++++++ 44 files changed, 635 insertions(+), 11 deletions(-) create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator all.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator bf.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator commands.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator each.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator field.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator first.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator has.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator indexes.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator is.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator last.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator limit.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator links.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator list.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator listed.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator modules.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator moduletypes.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator next.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator nth.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator plugintiddlers.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator previous.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator rest.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator reverse.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator sameday.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator search.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator sort.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator tag.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator tagging.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator tags.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator title.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperator untagged.tid create mode 100644 editions/tw5.com/tiddlers/filters/FilterOperators.tid rename editions/tw5.com/tiddlers/{concepts/TiddlerFilters.tid => filters/Introduction to Filters.tid} (87%) create mode 100644 editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerLinks.tid b/editions/tw5.com/tiddlers/concepts/TiddlerLinks.tid index 996f91a5d..435fd81cd 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerLinks.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerLinks.tid @@ -1,5 +1,5 @@ created: 20130825202900000 -modified: 20140221093306317 +modified: 20140410103200281 tags: concepts title: TiddlerLinks type: text/vnd.tiddlywiki @@ -12,7 +12,7 @@ Links are useful for modelling organic relationships between tiddlers, and parti The TiddlerInfoPanel lists incoming links to a tiddler in the tab ''References''. -TiddlerFilters can include the following FilterOperators that work with links: +TiddlerFilters can include the following [[filter operators|TiddlerFilters]] that work with links: * `[links[]]` - returns the titles of the tiddlers that are linked from the currently selected tiddler(s) * `[backlinks[]]` - returns the titles of the tiddlers that link to the currently selected tiddler(s) diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid new file mode 100644 index 000000000..44fb530c0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +title: FilterOperator: 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 | + diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid b/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid new file mode 100644 index 000000000..167ada71c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator backlinks.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 bf.tid b/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid new file mode 100644 index 000000000..d1e4624f3 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator bf.tid @@ -0,0 +1,7 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..434f2662f --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator butfirst.tid @@ -0,0 +1,7 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..82444c636 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator butlast.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..9aa4e62b8 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator commands.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..48ecae316 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator each.tid @@ -0,0 +1,26 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..2c1ce71a5 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator eachday.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 field.tid b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid new file mode 100644 index 000000000..130eb2247 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator field.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +title: FilterOperator: field +type: text/vnd.tiddlywiki + +The ''field'' 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 first.tid b/editions/tw5.com/tiddlers/filters/FilterOperator first.tid new file mode 100644 index 000000000..374e651ef --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator first.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 has.tid b/editions/tw5.com/tiddlers/filters/FilterOperator has.tid new file mode 100644 index 000000000..0b9b56f7b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator has.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +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 new file mode 100644 index 000000000..1185d966d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator indexes.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..65d48676b --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator is.tid @@ -0,0 +1,25 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +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 + +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[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 new file mode 100644 index 000000000..78ee7b35d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator last.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..f720a5d42 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator limit.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +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 new file mode 100644 index 000000000..dab041c99 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator links.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +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 new file mode 100644 index 000000000..6a57e591e --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator list.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: list +type: text/vnd.tiddlywiki + +The ''list'' filter operator replaces the current list with the list contained in the [[TextReference|TextReferences]] 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 new file mode 100644 index 000000000..1fa4eb451 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator listed.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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. + +For example: + +|!Filter String |!Description | +|`[[HelloThere]listed[]]` |Returns the titles of any tiddlers containing `HelloThere` in their `list` fields | +|`[all[current]listed[]]]` |Returns the titles of any tiddlers containing the current tiddler in their `list` fields | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid b/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid new file mode 100644 index 000000000..4258c6cc5 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator modules.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..144963c6c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator moduletypes.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..5ca1987f7 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator next.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..7e51d6601 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator nsort.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: nsort +type: text/vnd.tiddlywiki + +The ''nsort'' filter operator sorts the current list as numeric values. 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 new file mode 100644 index 000000000..5d963bdc2 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator nsortcs.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: nsortcs +type: text/vnd.tiddlywiki + +The ''nsortcs'' filter operator sorts the current list as numeric values. 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 new file mode 100644 index 000000000..06293f2e7 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator nth.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 number of entries to return. + +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 new file mode 100644 index 000000000..5c6cd611d --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator plugintiddlers.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..5e36ed09a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator prefix.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid b/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid new file mode 100644 index 000000000..cfea56e08 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator previous.tid @@ -0,0 +1,20 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 removeprefix.tid b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid new file mode 100644 index 000000000..a02833c4e --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator removeprefix.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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]]. diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid b/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid new file mode 100644 index 000000000..09addacb4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator rest.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..4ff1f93dc --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator reverse.tid @@ -0,0 +1,12 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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 new file mode 100644 index 000000000..b4f9a60f1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator sameday.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +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. + +For example: + +|!Filter String |!Description | +|`[sameday[20140410]]` |Returns a list of the tiddlers modified 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 new file mode 100644 index 000000000..3002d9d18 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator search.tid @@ -0,0 +1,13 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +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. + +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" | diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid b/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid new file mode 100644 index 000000000..05e89d3c0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator shadowsource.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..5d849e4ad --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator sort.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +title: FilterOperator: sort +type: text/vnd.tiddlywiki + +The ''sort'' filter operator sorts the current list case insensitively (upper and lower case letters are considered equivalent). 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` | + +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 new file mode 100644 index 000000000..9b9e435ba --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator sortcs.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: sortcs +type: text/vnd.tiddlywiki + +The ''sortcs'' filter operator sorts the current list case sensitively (upper and lower case letters are considered different). 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 tag.tid b/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid new file mode 100644 index 000000000..aa2ab6605 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator tag.tid @@ -0,0 +1,18 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters commonfilters +title: FilterOperator: 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[tiddlers+shadows]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 `mytag` | + +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 new file mode 100644 index 000000000..fb72e2fc0 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator tagging.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..9eede9b3c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator tags.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..d49175628 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator title.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..a62e4b9fd --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperator untagged.tid @@ -0,0 +1,15 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: filters +title: FilterOperator: 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 new file mode 100644 index 000000000..580cfab1a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/FilterOperators.tid @@ -0,0 +1,12 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: concepts +title: FilterOperators +type: text/vnd.tiddlywiki + +\define bulletList(filter) + +\end +The full list of available filter operators is: + +<> diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid similarity index 87% rename from editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid rename to editions/tw5.com/tiddlers/filters/Introduction to Filters.tid index 0fd498fe0..87fa10bd9 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid +++ b/editions/tw5.com/tiddlers/filters/Introduction to Filters.tid @@ -1,12 +1,10 @@ -created: 20130827080000000 -modified: 20140306034221709 -tags: concepts -title: TiddlerFilters +created: 20140410101941871 +modified: 20140410103229640 +tags: introduction +title: Introduction to Filters type: text/vnd.tiddlywiki -Filters are used in TiddlyWiki to choose tiddlers by specifying simple match criteria. See [[TiddlerFilter Formal Grammar]] for a technical explanation of the syntax. - -Filters are used by widgets like the ListWidget and the CountWidget to perform operations on multiple tiddlers at once. They are also used throughout TiddlyWiki's internal mechanisms. +A step by step introduction to how TiddlerFilters are used. You can experiment with tiddler filters by typing them into the "Filter" tab of the [[advanced search panel|$:/AdvancedSearch]]. @@ -22,7 +20,7 @@ The titles must be separated by one or more spaces and/or linebreaks. ! Filter Operators -Filter operators are used to select tiddlers based on some criteria. For example, this filter consists of a single operation made selects all tiddlers tagged "introduction": +Filter operators are used to select tiddlers based on some criteria. For example, this filter consists of a single operation that selects all tiddlers tagged "introduction": ``` [tag[introduction]] @@ -30,7 +28,7 @@ Filter operators are used to select tiddlers based on some criteria. For example The word "tag" is the ''operator'' and "introduction" is the ''operand''. -See FilterOperators for a complete list of the available operators. +See TiddlerFilters for a complete list of the available operators. !! Default Filter Operator diff --git a/editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid b/editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid new file mode 100644 index 000000000..e83828da7 --- /dev/null +++ b/editions/tw5.com/tiddlers/links/resources/TWeb.at from Mario Pietsch.tid @@ -0,0 +1,14 @@ +created: 20140410103123179 +modified: 20140410103123179 +tags: resources +title: "TWeb.at" by Mario Pietsch +type: text/vnd.tiddlywiki +url: https://tweb.at + +A collection of TiddlyWiki resources from Mario Pietsch, with a focus on cloud deployments. Mario also maintains the German translation of TiddlyWiki. + +<<< +My name is Mario Pietsch from Austria. I'm living near Salzburg. + +This page, will be the portal to my TiddlyWiki, TiddlyWeb related content. +<<<