1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-22 21:33:14 +00:00

Overhaul the filter operator documentation: part 1

This commit is contained in:
Astrid Elocson 2015-01-18 18:39:00 +00:00
parent 8fc404bbca
commit 172c7ef7dd
80 changed files with 941 additions and 462 deletions

View File

@ -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.
<<list-links "[tag[Commands]]">>

View File

@ -0,0 +1,11 @@
created: 20150117204109000
modified: 20150117204242000
tags: Concepts
title: Absolute Operators
type: text/vnd.tiddlywiki
The output of a filter step depends on its [[operator|Filter Operators]]:
* Most operators perform <<.def relative>> to their input. They examine each input string in turn and filter out any that don't match. Such steps narrow down the output of a run.
* <<.def Absolute>> operators ignore their input and generate an independent output instead. <<.olink title>> is an example: the result of `[title[A]title[B]]` is `B`. But the <<.olink field>> operator is relative, so the result of `[title[A]field:title[B]` is empty.

View File

@ -0,0 +1,28 @@
created: 20150117190213631
modified: 20150117191804000
tags: Concepts
title: Date Fields
type: text/vnd.tiddlywiki
Certain [[fields|TiddlerFields]] of a tiddler are used to store dates and times.
The two standard date fields are <<.field created>> and <<.field modified>>.
Values of date fields are 17-character strings:
* 4 digits for the year
* 2 digits for the month
* 2 digits for the day
* 2 digits for the hour
* 2 digits for the minute
* 2 digits for the second
* 3 digits for the millisecond
To avoid problems arising from differences of time zone, TiddlyWiki always uses [[UTC|http://en.wikipedia.org/wiki/Coordinated_Universal_Time]].
As an example, the <<.field created>> field of this tiddler has the value <<.value """<$view field="created"/>""">>.
Dates can be [[converted to other formats|DateFormat]] for display:
<$macrocall $name="wikitext-example-without-html"
src="""<$view field="created" format="date" template="DDD DDth MMM YYYY"/>""">

View File

@ -0,0 +1,11 @@
created: 20151714300000000
modified: 20150117172438000
tags: Concepts
title: Dominant Append
type: text/vnd.tiddlywiki
A <<.def "dominant append">> is a frequent occurrence in [[filter|Filters]] processing.
Filters manipulate sets of items in which no item can appear more than once, and they often append one such set to another.
This is done in such a way that if the result would contain two copies of the same item, the <<.em earlier>> one is removed. The appended items thus dominate over any earlier duplicates.

View File

@ -0,0 +1,20 @@
created: 20151714300000000
modified: 20150117193508000
tags: Concepts
title: Filter Parameters
type: text/vnd.tiddlywiki
The parameter to a [[filter operator|Filter Operators]] can be:
;<<.def direct>>
: `[like this]`
: Literal, treated at face value
;<<.def indirect>>
:<<.def transcluded>>
:: `{like this}`
:: The value of a field of a specified tiddler, or the value of an index of a specified [[data tiddler|DataTiddlers]]
:<<.def variable>>
::`<like this>`
:: The value of the specified [[variable|Variables]]
See [[Filter Syntax]].

View File

@ -1,5 +1,5 @@
created: 20130827080000000=
modified: 20140912145347313
created: 20130827080000000
modified: 20150117193502000
tags: Reference Concepts
title: Filters
type: text/vnd.tiddlywiki
@ -7,7 +7,7 @@ list: [[Introduction to filter notation]] [[Filter Syntax]]
You can think of TiddlyWiki as a database in which the records are tiddlers. A database typically provides a way of discovering which records match a given pattern, and in ~TiddlyWiki this is done with filters.
A <<doc-def filter>> is a concise notation for selecting a particular set of tiddlers, known as its <<doc-def "result">>. Whenever ~TiddlyWiki encounters a filter, it calculates the result. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them.
A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Tiddler Sets]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them.
The following example passes a filter to the [[list-links macro|ListMacro]] to display a list of all tiddlers whose titles start with the letter H:
@ -15,11 +15,11 @@ The following example passes a filter to the [[list-links macro|ListMacro]] to d
<<list-links "[prefix[H]]">>
```
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 <<doc-advancedsearch-tab Filter>> 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
* [[Filter Operators]] -- the available methods of filtering

View File

@ -0,0 +1,20 @@
created: 20130825202900000
modified: 20150117152438000
tags: Concepts
title: Observable Links
type: text/vnd.tiddlywiki
An <<.def "observable link">> is a [[link|TiddlerLinks]] whose presence can be detected by a superficial examination of WikiText.
A link is <<.em not>> observable if it is:
* contained in text [[transcluded|Transclusion]] from elsewhere
* supplied via [[Macros]] or [[Variables]]
* generated by a <<.wlink LinkWidget>> widget whose `to` attribute is a transclusion, macro or variable
Unobservable links are <<.em ignored>> by the link-related [[Filter Operators]]:
* <<.olink backlinks>>
* <<.olink links>>
* <<.olink2 "all[missing]" all>>
* <<.olink2 "all[orphans]" all>>

View File

@ -0,0 +1,10 @@
created: 20150117152418000
modified: 20150117165517000
tags: Concepts
title: Tiddler Sets
A <<.def "tiddler set">> is a data structure. It is an ordered collection of strings, usually tiddler titles, containing no duplicates.
Tiddler sets are important in [[filter|Filters]] processing.
The simplest way to generate one is to use the TitleList syntax.

View File

@ -1,12 +1,14 @@
created: 20150117152418000
modified: 20150117163928000
tags: Concepts
title: TitleList
A title list is a line of text that presents one or more tiddler titles, strung together with a space between each one and the next.
A <<.def "title list">> is a line of text that presents one or more tiddler titles, strung together with a space between each one and the next.
If a title //contains// a space, it needs double square brackets around it.
Example:
If a title <<.em contains>> a space, it needs double square brackets around it:
`GettingStarted [[Discover TiddlyWiki]] Upgrading`
Title lists are used in various places, including PermaLinks and the ListField.
They are in fact the simplest case of a [[filter|Filters]].

View File

@ -1,10 +1,11 @@
created: 20130830092500000
modified: 20140919155816993
modified: 20150117163423000
tags: Fields
title: ListField
caption: list
type: text/vnd.tiddlywiki
The `list` [[field of a tiddler|TiddlerFields]] is an optional feature that can be used to help structure your content. It is defined as an ordered sequence of tiddler titles, and it can be used in several ways:
The `list` [[field of a tiddler|TiddlerFields]] is an optional feature that can be used to help structure your content. It is defined as an [[ordered sequence of tiddler titles|TitleList]], and it can be used in several ways:
* The `list` field of a tiddler that is being used as a tag determines the ordering of the tiddlers that carry that tag - see [[Tagging]] for details
* The `list` [[filter|Filters]] selects the entries from a list

View File

@ -1,15 +1,16 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: addprefix
title: FilterOperator: addprefix
modified: 20150118182915000
tags: [[Filter Operators]] [[String Operators]]
title: addprefix Operator
type: text/vnd.tiddlywiki
caption: addprefix
purpose: extend each input item with a prefix
The ''addprefix'' filter operator add a prefix to all titles in the current list.
<<.operator-def
input:"a [[set|Tiddler Sets]] of strings"
parameter:"a prefix to be added"
paramName:"p"
output:"a copy of the input, but with the prefix added to the start of each string"
>>
For example:
|!Filter String |!Description |
|`one two three +[addprefix[tid-]]` |Returns `tid-one`, `tid-two`, `tid-three` |
See also [[FilterOperator: prefix]], [[FilterOperator: suffix]], [[FilterOperator: addsuffix]], [[FilterOperator: removeprefix]] and [[FilterOperator: removesuffix]].
<<.operator-examples "addprefix">>

View File

@ -1,15 +1,16 @@
created: 20140828133830424
modified: 20140902145613329
tags: Filters
caption: addsuffix
title: FilterOperator: addsuffix
modified: 20150118182957000
tags: [[Filter Operators]] [[String Operators]]
title: addsuffix Operator
type: text/vnd.tiddlywiki
caption: addsuffix
purpose: extend each input item with a suffix
The ''addsuffix'' filter operator adds a suffix to all titles in the current list.
<<.operator-def
input:"a [[set|Tiddler Sets]] of strings"
parameter:"a suffix to be added"
paramName:"p"
output:"a copy of the input, but with the suffix added to the end of each string"
>>
For example:
|!Filter String |!Description |
|`one two three +[addsuffix[-tid]]` |Returns `one-tid`, `two-tid`, `three-tid` |
See also [[FilterOperator: suffix]], [[FilterOperator: prefix]], [[FilterOperator: addprefix]], [[FilterOperator: removesuffix]], and [[FilterOperator: removeprefix]].
<<.operator-examples "addsuffix">>

View File

@ -1,21 +1,18 @@
created: 20140512103123179
modified: 20140512103123179
tags: Filters
title: FilterOperator: after
caption: after
modified: 20150118183000000
tags: [[Filter Operators]] [[List Operators]]
title: after Operator
type: text/vnd.tiddlywiki
caption: after
purpose: get the successor of an input item
The ''after'' filter operator returns the tiddler from the current list that is after the tiddler named in the operand.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of strings"
parameter="one of those strings"
paramName="p"
output="the string that immediately follows <<.place p>> in the input set"
/>
The following examples assume a tiddler called `MyList` with a `list` field containing:
If <<.place p>> is not present in the input set, or is the last item, then the output is empty.
```
one two three four five
```
|!Filter String |!Description |
|`[list[MyList]after[two]]` |Returns `three` |
|`[list[MyList]after[five]]` |Returns an empty list |
|`[list[MyList]after{!!title}]` |Returns `five` if the current tiddler is `four` |
See also [[FilterOperator: before]], [[FilterOperator: previous]] and [[FilterOperator: next]].
<<.operator-examples "after">>

View File

@ -1,22 +1,33 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters CommonFilters
title: FilterOperator: all
caption: all
modified: 20150118183004000
tags: [[Filter Operators]] [[Common Operators]] [[Absolute Operators]] [[Link Operators]]
title: all Operator
type: text/vnd.tiddlywiki
caption: all
purpose: get all tiddlers of a basic category
The ''all'' filter operator is used to select combinations of lists of tiddlers for subsequent operations.
<$macrocall $name=".operator-def"
input="ignored, unless <<.place p>> is empty"
parameter="see below"
paramName="p"
output="the [[set|Tiddler Sets]] of tiddler titles that belong to one or more basic categories"
/>
The operand of the ''all'' operator is a list of names of tiddler sources joined with `+`.
The parameter specifies categories using the following syntax:
For example:
<$railroad text="""
[{: ("current" | "missing" |: "orphans" | "shadows" | "tiddlers" ) +"+" }]
"""/>
|!Filter String |!Description |
|`[all[tiddlers]]` |Selects all 'real' tiddlers (both system and non-system), excluding shadow tiddlers |
|`[all[shadows]]` |Selects all ShadowTiddlers, including those that have been overridden with real tiddlers |
|`[all[shadows+tiddlers]]` |Selects all ShadowTiddlers and all 'real' tiddlers together |
|`[all[current]]` |Selects the current tiddler |
|`[all[missing]]` |Selects all MissingTiddlers |
|`[all[orphans]]` |Selects all OrphanTiddlers |
|`[all[]]` |Selects all the source tiddlers available to the filter |
|!Category |!Members |!Sorted |
|^`current`|just the [[current tiddler|CurrentTiddler]]|^--|
|^`missing`|all non-existent tiddlers to which there is at least one [[observable link|Observable Links]]|^no|
|^`orphans`|all tiddlers to which there are <<.em no>> observable links|^by title|
|^`shadows`|all the [[shadow tiddlers|ShadowTiddlers]] that exist, including any that have been overridden with non-shadow tiddlers|^no|
|^`tiddlers`|all the non-shadow tiddlers that exist|no|
If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each parameter's output is [[dominantly appended|Dominant Append]] to it in turn.
As a special case, if there is no parameter, the output is simply a copy of the input. This can be useful when the parameter is [[supplied indirectly|Filter Parameters]].
<<.operator-examples "all">>

View File

@ -1,16 +1,17 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: backlinks
title: FilterOperator: backlinks
modified: 20150118183008000
tags: [[Filter Operators]] [[Link Operators]]
title: backlinks Operator
type: text/vnd.tiddlywiki
caption: backlinks
purpose: get the tiddlers that link to each input tiddler
The ''backlinks'' filter operator replaces the current list with a list of the non-system tiddlers that link to them.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="none"
output="the titles of any non-system tiddlers that contain [[Observable Links]] to the input tiddlers"
/>
For example:
|!Filter String |!Description |
|`[[HelloThere]backlinks[]]` |Selects all tiddlers that contain links to the tiddler `HelloThere` |
|`[tag[Personal]backlinks[]]` |Selects all tiddlers that contain links to tiddlers tagged `Personal` |
|`[all[current]backlinks[]]` |Selects all tiddlers that contain links to the current tiddler |
Each input tiddler is processed in turn. Its corresponding set of backlinks is generated, sorted by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output.
<<.operator-examples "backlinks">>

View File

@ -1,21 +1,18 @@
created: 20140512103123179
modified: 20140512103123179
tags: Filters
modified: 20150118183011000
tags: [[Filter Operators]] [[List Operators]]
caption: before
title: FilterOperator: before
title: before Operator
type: text/vnd.tiddlywiki
purpose: get the predecessor of an input item
The ''before'' filter operator returns the tiddler from the current list that is before the tiddler named in the operand.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of strings"
parameter="one of those strings"
paramName="p"
output="the string that immediately precedes <<.place p>> in the input set"
/>
The following examples assume a tiddler called `MyList` with a `list` field containing:
If <<.place p>> is not present in the input set, or is the first item, then the output is empty.
```
one two three four five
```
|!Filter String |!Description |
|`[list[MyList]before[two]]` |Returns `one` |
|`[list[MyList]before[one]]` |Returns an empty list |
|`[list[MyList]before{!!title}]` |Returns `three` if the current tiddler is `four` |
See also [[FilterOperator: after]], [[FilterOperator: previous]] and [[FilterOperator: next]].
<<.operator-examples "before">>

View File

@ -1,8 +1,9 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: bf
title: FilterOperator: bf
modified: 20150118182927000
tags: [[Filter Operators]] [[List Operators]]
title: bf Operator
type: text/vnd.tiddlywiki
caption: bf
purpose: same as <<.op rest>>
The ''bf'' filter operator is a synonym for [[FilterOperator: rest]].
<<.op bf>> is a synonym for <<.olink rest>>, also known as <<.olink butfirst>>.

View File

@ -1,8 +1,9 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: butfirst
title: FilterOperator: butfirst
modified: 20150118183016000
tags: [[Filter Operators]] [[Sequence Operators]]
title: butfirst Operator
type: text/vnd.tiddlywiki
caption: butfirst
purpose: same as <<.op rest>>
The ''butfirst'' filter operator is a synonym for [[FilterOperator: rest]].
<<.op butfirst>> is a synonym for <<.olink rest>>, also known as <<.olink bf>>.

View File

@ -1,14 +1,16 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: butlast
title: FilterOperator: butlast
modified: 20150118183022000
tags: [[Filter Operators]] [[Sequence Operators]]
title: butlast Operator
type: text/vnd.tiddlywiki
caption: butlast
purpose: get all the but last <<.place n>> input items
Without an operand, the ''butlast'' filter operator returns all but the last entry in the current list. The optional operand specifies the number of entries to omit.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of strings"
parameter="an integer, defaulting to 1"
paramName="n"
output="all but the last <<.place n>> strings from the input set"
/>
For example:
|!Filter String |!Description |
|`one two three four five +[butlast[]]` |Returns `one`, `two`, `three`, `four` |
|`one two three four five +[butlast[2]]` |Returns `one`, `two`, `three` |
<<.operator-examples "butlast">>

View File

@ -1,14 +1,16 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: commands
title: FilterOperator: commands
modified: 20150118183026000
tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Absolute Operators]]
title: commands Operator
type: text/vnd.tiddlywiki
caption: commands
purpose: get all the Node.js commands
The ''commands'' filter operator replaces the current list with a list of the available commands (see the HelpCommand for details).
<$macrocall $name=".operator-def"
input="ignored"
parameter="none"
output="the set of [[commands|Commands]] that can be given to [[TiddlyWiki on Node.js]]"
/>
For example:
|!Filter String |!Description |
|`[commands[]]` |Returns a list of the available command names |
<<.operator-examples "commands">>

View File

@ -1,27 +1,18 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: each
title: FilterOperator: each
modified: 20150118183030000
tags: [[Filter Operators]] [[Group Operators]]
title: each Operator
type: text/vnd.tiddlywiki
caption: each
purpose: get one of each group of input tiddlers by field value
The ''each'' filter operator filters the current list to leave only the first tiddler with each distinct value for a specified field.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="the name of a [[field|TiddlerFields]]"
paramName="f"
output="a set containing the first tiddler with each distinct value for field <<.place f>>"
/>
For example:
Each input tiddler is processed in turn. The value of field <<.place f>> in that tiddler is examined, and as long as the value has not been encountered before, the tiddler's title is appended to the output set.
|!Filter String |!Description |
|`[all[tiddlers]sort[title]each[type]]` |Returns a list of the first tiddler with each distinct ''type'' field |
The ''each'' operator can be used to group tiddlers. For example, the following example creates a list of tiddlers split into types:
<$list filter="[!is[system]has[type]!type[text/vnd.tiddlywiki]each[type]sort[type]]">
<div>
! <$view field="type"/>
<$list filter="[type{!!type}!is[system]sort[title]]">
<div>
<$link to={{!!title}}><$view field="title"/></$link>
</div>
</$list>
</div>
</$list>
<<.operator-examples "each">>

View File

@ -1,21 +1,18 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: eachday
title: FilterOperator: eachday
modified: 20150118183035000
tags: [[Filter Operators]] [[Group Operators]]
title: eachday Operator
type: text/vnd.tiddlywiki
caption: eachday
purpose: get one of each group of input tiddlers by date
The ''eachday'' filter operator filters the current list to leave only the first tiddler that has a distinct value for a specified date field.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="the name of a [[date field|DateFields]]"
paramName="f"
output="a set containing the first tiddler with each distinct value (ignoring time of day) for field <<.place f>>"
/>
For example:
Each input tiddler is processed in turn. The value of field <<.place f>> in that tiddler is examined, and as long as this indicates a day that has not been encountered before, the tiddler's title is appended to the output set.
|!Filter String |!Description |
|`[eachday[created]]` |Returns a list of the first tiddler created on each distinct day |
The ''eachday'' operator can be used to group tiddlers. For example, the following wiki text creates a list of the number of tiddlers that were modified on each day:
<$list filter="[!is[system]eachday[modified]!sort[modified]]">
<$view field="modified" format="date" template="DD MMM YYYY"/>: <$count filter="[sameday{!!modified}]"/> modifications
</$list>
<<.operator-examples "eachday">>

View File

@ -1,10 +1,15 @@
created: 20150111145738451
modified: 20150111145738451
tags: Filters
caption: editiondescription
title: FilterOperator: editiondescription
modified: 20150118183039000
tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Node.js Operators]]
title: editiondescription Operator
type: text/vnd.tiddlywiki
caption: editiondescription
purpose: get the descriptions of the input ~TiddlyWiki editions
The ''editiondescription'' filter operator returns a description string for each edition name in the current results. It is only available under Node.js.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of ~TiddlyWiki edition names"
parameter="none"
output="the description string of each edition in the input"
/>
Also see [[FilterOperator: editions]].
<<.node-only-operator>>

View File

@ -1,8 +1,15 @@
created: 20150111145738451
modified: 20150111145738451
tags: Filters
caption: editions
title: FilterOperator: editions
modified: 20150118183042000
tags: [[Filter Operators]] [[Non-Tiddler Operators]] [[Node.js Operators]] [[Absolute Operators]]
title: editions Operator
type: text/vnd.tiddlywiki
caption: editions
purpose: get the names of all ~TiddlyWiki editions
The ''editions'' filter operator returns the names of all the available editions. It is only available under Node.js.
<$macrocall $name=".operator-def"
input="none"
parameter="none"
output="the name of each ~TiddlyWiki edition, in alphabetical order"
/>
<<.node-only-operator>>

View File

@ -1,16 +1,28 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters CommonFilters
caption: field
title: FilterOperator: field
modified: 20150118183046000
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]]
title: field Operator
type: text/vnd.tiddlywiki
caption: field
purpose: filter the input tiddlers by field value
The ''field'' filter operator filters the current list according to whether a field matches a specified value.
<$macrocall $name=".operator-def-suffix"
input="a [[set|Tiddler Sets]] of tiddler titles"
suffix="the name of a field"
suffixName="f"
parameter="a potential value for field <<.place f>>"
paramName="p"
output="the subset of the input tiddlers in which field <<.place f>> has the value <<.place p>>"
/>
The operand is the value to match, and the suffix is used to identify the field. For example:
If <<.place p>> is empty, <<.op field>> will match both of the following:
|!Filter String |!Description |
|`[field:modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` |
|`[modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston` |
* tiddlers that don't contain field <<.place f>>
* tiddlers in which field <<.place f>> exists but has an empty value
Note that if an unknown filter operator `[unknown[xxx]]` is encountered it is interpreted as `[field:unknown[xxx]]`.
;Negation
: `!field` outputs the subset of the input tiddlers in which field <<.place f>> does <<.em not>> have the value <<.place p>>.
The [[Filter Syntax]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.olink field>> operator. See the second example below.
<<.operator-examples "field">>

View File

@ -1,13 +1,17 @@
caption: fields
created: 20140924115616653
modified: 20141002150019737
tags: Filters
title: FilterOperator: fields
modified: 20150118183051000
tags: [[Filter Operators]] [[Field Operators]]
title: fields Operator
type: text/vnd.tiddlywiki
caption: fields
purpose: get all fields of the input tiddlers
The ''fields'' filter operator returns the names of all the fields used in the currently selected tiddlers.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="none"
output="the [[set|Tiddler Sets]] of all field names contained in the input tiddlers"
/>
|!Filter String |!Description |
|`[[HelloThere]fields[]]` |Returns the fields present in the tiddler `HelloThere` |
|`[tag[myTag]fields[]]` |Returns the aggregate of all the fields present on tiddlers that have the tag `myTag` |
Each input item is processed in turn. Its set of field names is retrieved (in no particular order) and then [[dominantly appended|Dominant Append]] to the operator's output.
<<.operator-examples "fields">>

View File

@ -1,14 +1,16 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters
caption: first
title: FilterOperator: first
modified: 20150118183055000
tags: [[Filter Operators]] [[List Operators]]
title: first Operator
type: text/vnd.tiddlywiki
caption: first
purpose: get the first <<.place n>> input items
The ''first'' filter operator returns the first entries in the current list. The optional operand specifies the number of entries to return.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of strings"
parameter="an integer, defaulting to 1"
paramName="n"
output="the first <<.place n>> items from the input set"
/>
For example:
|!Filter String |!Description |
|`one two three +[first[]]` |Returns `one` |
|`one two three +[first[2]]` |Returns `one`, `two` |
<<.operator-examples "first">>

View File

@ -1,13 +1,20 @@
created: 20140426183123179
modified: 20140426183123179
tags: Filters
caption: get
title: FilterOperator: get
modified: 20150118183058000
tags: [[Filter Operators]] [[Field Operators]]
title: get Operator
type: text/vnd.tiddlywiki
caption: get
purpose: get the values of a field from all input tiddlers
The ''get'' filter operator replaces the titles of the tiddlers in the current list with the values of the field specified by the operand.
<$macrocall $name=".operator-def"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="the name of a [[field|TiddlerFields]]"
paramName="f"
output="the values of field <<.place f>> in each of the input tiddlers"
/>
For example:
Each input tiddler is processed in turn. If the tiddler contains field <<.place f>>, and the value of this field is not empty, then its value is appended to the output.
|!Filter String |!Description |
|`[all[current]get[draft.of]]` |If the current tiddler is a draft, returns the original tiddler, otherwise returns an empty list |
Unlike most other [[Filter Operators]], the output of <<.op get>> can contain duplicates.
<<.operator-examples "get">>

View File

@ -1,14 +1,25 @@
created: 20140410103123179
modified: 20140410103123179
tags: Filters CommonFilters
caption: has
title: FilterOperator: has
modified: 20150118183102000
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]]
title: has Operator
type: text/vnd.tiddlywiki
caption: has
purpose: filter the input tiddlers by field existence
The ''has'' filter operator chooses tiddlers from the current list that have a non-empty value for the field specified in the operand.
<$macrocall $name=".operator-def"
syntax="has[f]"
input="a [[set|Tiddler Sets]] of tiddler titles"
parameter="the name of a field"
paramName="f"
output="the subset of the input tiddlers that have a value in field <<.place f>>"
/>
For example:
<<.op has>> filters out both of the following:
|!Filter String |!Description |
|`[has[modifier]]` |Returns tiddlers that have a `modifier` field |
* tiddlers that don't contain field <<.place f>>
* tiddlers in which field <<.place f>> exists but has an empty value
;Negation
: `!has` outputs the subset of the input tiddlers in which field <<.place f>> does <<.em not>> exist or does not have the value <<.place p>>.
<<.operator-examples "has">>

View File

@ -1,8 +1,8 @@
created: 20140410103123179
modified: 20140418103123179
modified: 20150118182931000
tags: Filters CommonFilters
caption: is
title: FilterOperator: is
title: is Operator
type: text/vnd.tiddlywiki
The ''is'' filter operator selects tiddlers from the current list according to their membership of the category specified in the operand:

View File

@ -1,5 +1,5 @@
created: 20140410103123179
modified: 20140410103123179
modified: 20150118182943000
tags: Filters
caption: modules
title: FilterOperator: modules

View File

@ -1,17 +1,24 @@
created: 20140410103123179
modified: 20141007213204936
tags: Concepts
title: FilterOperators
modified: 20150118180311000
tags: Concepts Filters
title: Filter Operators
type: text/vnd.tiddlywiki
A <<doc-def "filter operator">> is a predefined name attached to an individual step in a [[filter|Filters]]. It defines how that step is to be performed.
A <<.def "filter operator">> is a predefined name attached to an individual step in a [[filter|Filters]]. It defines the particular action of that step.
A typical step is written as `[operator[parameter]]`, although not all of the operators need a parameter.
<table class>
<tr>
<th align="left">Operator</th>
<th align="left">Purpose</th>
<th align="left">Common</th>
</tr>
<$list filter="[tag[Filter Operators]]"><tr>
<td><$link to={{!!title}}>{{!!caption}}</$link></td>
<td>{{!!purpose}}</td>
<td><$list filter="[all[current]tag[Common Operators]]">{{$:/core/images/done-button}}</$list></td>
</tr></$list>
</table>
Here are the most commonly used operators:
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameters]].
<<list-links "[tag[CommonFilters]]">>
The complete list is:
<<list-links "[tag[Filters]] -[[Introduction to filter notation]] -[[Filter Syntax]]">>
Most steps operate on a set of input items. For the exact rules, see [[Filter Syntax]].

View File

@ -1,36 +1,36 @@
created: 20140210141217955
modified: 20150102174633890
modified: 20150117204215000
tags: Filters
title: Filter Syntax
type: text/vnd.tiddlywiki
:([[Filters]] follow a grammar that is presented here, using [[RailroadDiagrams]], for those who find formal syntax descriptions helpful. However, [[you can learn to write filters|Introduction to filter notation]] without needing to understand this tiddler.)
<<.preamble """[[Filters]] follow a grammar that is presented here, using [[RailroadDiagrams]], for those who find formal syntax descriptions helpful. However, you can [[learn to write filters|Introduction to filter notation]] without needing to understand this tiddler.""">>
A <<doc-def filter>> is an expression whose value is an ordered set of items known as its <<doc-def result>>. No item can appear more than once in the result. The items are usually tiddler titles, but certain specialised filter steps produce other items, such as field names.
A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets|Tiddler Sets]] of strings, usually tiddler titles.
A filter is a sequence of zero or more ''runs'', and each run is a sequence of one or more ''steps''. Each step and each run produces its own intermediate result.
Filters are built from smaller pieces, called ''runs'' and ''steps'', each of which also transforms an input to an output.
---
;filter
: <$railroad text="""
[{ : [:whitespace] ("+" | :- | "-") run }]
[{: [:whitespace] ("+"|:-|"-") run }]
"""/>
A filter starts with an empty result. The runs are processed from left to right, progressively modifying the result.
A filter starts with an empty output. Its runs are processed from left to right, progressively modifying the output.
Each run receives a <<doc-def "source">> set from which to select items. This is normally the set of all tiddlers in the wiki, in the order they happen to be stored there, but it can be changed by prefixing a run with `+`.
A run's input is normally the set of all tiddler titles in the wiki (in no particular order), but the `+` prefix can change this.
* If the run has no `+` or `-` prefix, the items in its result are <<doc-em appended>> to the filter's result. If this leaves the filter's result containing two copies of the same item, the earlier one is removed.
* If the run has a `-` prefix, the items in its result are <<doc-em removed>> from the filter's result if they were present there.
* If the run has a `+` prefix, it receives the filter's current result as its source set. The filter's result is then completely <<doc-em replaced>> by the run's result. Any subsequent run reverts to receiving all tiddlers as its source set, unless it too has a `+` prefix.
* If a run has no `+` or `-` prefix, its output strings are [[dominantly appended|Dominant Append]] to the filter's output.
* If a run has a `-` prefix, its output strings are <<.em removed>> from the filter's output (if they were present).
* If a run has a `+` prefix, it receives the filter's output so far as its input. The filter's output is then completely <<.em replaced>> by the run's output. Any subsequent run reverts to receiving all tiddler titles as its input, unless it too has a `+` prefix.
In concise technical terms:
|!Run |!Interpretation |!Result |
|`run` |union of sets|result OR run |
|`+run` |intersection of sets |result AND run |
|`-run` |difference of sets|result AND NOT run |
|!Run |!Interpretation |!Output |
|`run` |union of sets |... OR run |
|`+run` |intersection of sets |... AND run |
|`-run` |difference of sets |... AND NOT run |
---
@ -46,34 +46,22 @@ In concise technical terms:
)
"""/>
The steps of a run are processed from left to right. Each step receives a source set. For the first step, this is the run's source set. For each subsequent step, the source is the result of the previous step.
The steps of a run are processed from left to right. The input to the first step is same as the input to the run. For each subsequent step, the input is the output of the previous step.
The result of a run depends on the operator involved:
{{Absolute Operators}}
* Most operators are <<doc-def filterers>>. They examine each item in their source set and discard any that don't match. Such steps serve to narrow down the result of their run.
* A few operators, called <<doc-def selectors>>, ignore the source they're given and generate an independent result instead. `title` is a good example. The result of `[title[A]title[B]]` is `B`. But `field` is a filterer, so the result of `[title[A]field:title[B]` is empty.
The lower three options in the diagram match items like `HelloThere`, `"HelloThere"` and `'HelloThere'`, and are short for `[title[HelloThere]]`. The two quoted options exist to support titles that contain square brackets, such as `"An [[[[Unusual]]]] Tiddler"`.
The lower three options in the diagram match `HelloThere`, `"HelloThere"` and `'HelloThere'`, and are short for `[title[HelloThere]]`. The two quoted options exist to support titles that contain square brackets: `"An [[[[Unusual]]]] Tiddler"`.
---
;step
: <$railroad text="""
[:"!"] [:method] parameter
[:"!"] [:operator [:":" suffix] ] parameter
"""/>
If a step's method is omitted, it defaults to `title`.
The <<.def operator>> is drawn from a list of [[predefined names|Filter Operators]], which can be extended by plugins. Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator. If a step's operator is omitted altogether, it defaults to `title`.
---
;method
: <$railroad text="""
operator [:":" suffix]
"""/>
The operator is drawn from a list of [[predefined names|FilterOperators]]. If it can't be found in that list, it is instead treated as the suffix to the <<doc-clink "field" "FilterOperator: field">> operator.
The suffix is additional information, usually the name of a [[field|TiddlerFields]], that extends the meaning of certain operators.
The <<.def suffix>> is additional text, usually the name of a [[field|TiddlerFields]], that extends the meaning of certain operators.
---
@ -87,8 +75,8 @@ The suffix is additional information, usually the name of a [[field|TiddlerField
)
"""/>
* `[`...`]` encloses a literal parameter
* `{`...`}` encloses a TextReference parameter
* `[`...`]` encloses a direct parameter
* `{`...`}` encloses a transcluded parameter
* `<`...`>` encloses a [[variable|Variables]] parameter
---
@ -96,4 +84,4 @@ The suffix is additional information, usually the name of a [[field|TiddlerField
;whitespace
: <$railroad text="""
{( "space" | "tab" | "linefeed" | "return" | "vertical tab" | "formfeed" )}
"""/>
"""/>

View File

@ -1,12 +1,12 @@
created: 20140410101941871
modified: 20141009180223576
modified: 20150117180519000
tags: Learning Filters
title: Introduction to filter notation
type: text/vnd.tiddlywiki
:(This explains the basics of writing a [[filter|Filters]] to select a set of tiddlers. For a more technical summary, see [[Filter Syntax]].)
<<.preamble """This explains the basics of writing a [[filter|Filters]] to select a set of tiddlers. For a more technical summary, see [[Filter Syntax]].)""">>
The simplest case is where you already know exactly which tiddlers you want. Type each title in double square brackets, with a space or linebreak between each one and the next:
The simplest case is where you already know exactly which tiddlers you want. Type each title in double square brackets, with a space between each one and the next:
```
[[Recipe book]] [[ScrambledEggs]] [[Mom's apple pie]]
@ -22,22 +22,22 @@ You can omit the square brackets when a title doesn't contain any spaces:
The double square brackets are actually a shorthand for this:
```
[title[Scrambled eggs]]
[title[ScrambledEggs]]
```
… which gives us the <<doc-def "general model">> 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 <<doc-tag Recipe>>:
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 <<doc-em not>> have the <<doc-tag Recipe>> tag:
We can reverse the meaning by adding an exclamation mark `!` just before the operator. For example, we can select any tiddlers that do <<.em not>> have the <<.tag Recipe>> tag:
```
[!tag[Recipe]]
@ -49,9 +49,9 @@ Tiddlers can be filtered by other fields than just title and tags:
[field:serving[4]]
```
That example will select any tiddlers that have <<doc-field-value 4>> in their <<doc-field serving>> field.
That example will select any tiddlers that have <<.value 4>> in their <<.field serving>> field.
As the word "serving" isn't a standard filter method (and isn't likely to become one), you can safely omit the `field:` prefix:
As the word "serving" isn't a standard filter operator (and isn't likely to become one), you can safely omit the `field:` prefix:
```
[serving[4]]
@ -59,7 +59,7 @@ As the word "serving" isn't a standard filter method (and isn't likely to become
!Combinations
The filters we've looked at so far have involved just one step each. But you can <<doc-def run>> several steps together like this:
The filters we've looked at so far have involved just one step each. But you can <<.def run>> several steps together like this:
```
[tag[Vegetarian]!tag[soup]serving[4]]
@ -67,9 +67,9 @@ The filters we've looked at so far have involved just one step each. But you can
Notice how the entire run is contained in a single pair of square brackets.
A tiddler has to match <<doc-em all>> 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 <<doc-em sequence>> of runs will select the tiddlers that match <<doc-em any>> of the runs. We can use this to find recipes that serve either 3, 4 or 5 people:
A sequence of separate runs will select the tiddlers that match <<.em any>> of the runs. We can use this to find recipes that serve either 3, 4 or 5 people:
```
[serving[3]] [serving[4]] [serving[5]]
@ -87,9 +87,9 @@ By default, each run considers every tiddler in the wiki. But we can use a `+` s
[serving[3]] [serving[4]] [serving[5]] +[tag[Vegetarian]] +[sort[title]]
```
This selects recipes for 3, 4 or 5 people, then filters <<doc-em those>> 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 <<doc-em remove>> a run's tiddlers from the result so far. Here we select all vegetarian recipes apart from two:
In a similar way, we can use a `-` sign to <<.em remove>> a run's tiddlers from the result so far. Here we select all vegetarian recipes apart from two:
```
[tag[Vegetarian]] -[title[ScrambledEggs]] -BeansOnToast
@ -99,7 +99,7 @@ In a similar way, we can use a `-` sign to <<doc-em remove>> 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:
<<doc-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 <<doc-field-value Vegetarian>>, we can say
<<.def "Curly brackets">> `{}` mean that the parameter is a TextReference, and that its value is to be looked up in a specified tiddler. For example, if we have a tiddler called <<.tid Preference>> whose text happens to be the word <<.value Vegetarian>>, we can say
```
[tag{Preference}]
@ -107,8 +107,8 @@ The parameter of each step we've seen so far has been in square brackets, meanin
as an alternative to `[tag[Vegetarian]]`. This allows the preference to change over time.
<<doc-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 <<doc-clink currentTiddler "WidgetVariable: currentTiddler">> 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<currentTiddler>]
```
```

View File

@ -0,0 +1,11 @@
created: 20150117192110000
modified: 20150118132010000
title: Days of the Week
type: text/vnd.tiddlywiki
list: Monday Tuesday Wednesday Thursday Friday Saturday Sunday
<<.this-is-operator-example>>
It has a <<.field list>> field containing the following items:
<<list-links "[list[]]">>

View File

@ -0,0 +1,6 @@
created: 20150117192111000
modified: 20150118131534000
title: Friday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -0,0 +1,6 @@
created: 20150117192113000
modified: 20150118131645000
title: Monday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -0,0 +1,6 @@
created: 20151620490000000
modified: 20150118131537000
title: Saturday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -0,0 +1,6 @@
created: 20150117192115000
modified: 20150118131539000
title: Sunday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -0,0 +1,13 @@
created: 20150117192116000
modified: 20150118131552000
title: Thursday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>
! <<.olink before>> and <<.olink after>>
<<.using-days-of-week>>
<<.operator-example "[list[Days of the Week]before{!!title}]">>
<<.operator-example "[list[Days of the Week]after{!!title}]">>

View File

@ -0,0 +1,6 @@
created: 20150117192118000
modified: 20150118131558000
title: Tuesday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -0,0 +1,6 @@
created: 20150117192119000
modified: 20150118131707000
title: Wednesday
type: text/vnd.tiddlywiki
<<.this-is-operator-example>>

View File

@ -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 ]]">>

View File

@ -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]]">>

View File

@ -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]]">>

View File

@ -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[]]">>

View File

@ -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">>

View File

@ -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]]">>

View File

@ -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]]">>

View File

@ -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[]]">>

View File

@ -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]].

View File

@ -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]].

View File

@ -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">>

View File

@ -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]]">>

View File

@ -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[]]">>

View File

@ -0,0 +1,8 @@
created: 20150118134611000
modified: 20150118183215000
tags: [[get Operator]] [[Operator Examples]]
title: get Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[all[current]get[draft.of]]" "the title of the tiddler of which the current tiddler is a draft">>
<<.operator-example 2 "[get[tags]]">>

View File

@ -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]]">>

View File

@ -1,5 +1,5 @@
created: 20140904075400000
modified: 20140919155913046
modified: 20150118182337000
tags: [[Working with TiddlyWiki]] Concepts
title: Tagging
type: text/vnd.tiddlywiki
@ -33,7 +33,7 @@ You can use the [[tag manager|$:/TagManager]], found on the ''Tags'' tab under '
! Change the order in which tags are listed
By default, tagged tiddlers are listed in the order they were added to the wiki. The [[sort operator|Filter operator: sort]] can change the order to alphabetical.
By default, tagged tiddlers are listed in the order they were added to the wiki. The <<.olink sort>> operator can change the order to alphabetical.
If you want any other order, add a [[field called ''list''|ListField]] to the tag tiddler, and set its value to be a [[TitleList]] of the tiddlers in that order.

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,140 +1,147 @@
created: 20150110182600000
modified: 20150117180524000
title: Documentation Macros
tags: [[Improving TiddlyWiki Documentation]]
The following macros are used throughout the documentation.
The following macros are used throughout ~TiddlyWiki's documentation.
!General
|!Macro |!Used for |!Example |
|doc-def |the defining instance of a term |<<doc-def widget>> |
|doc-em |minor emphasis within a sentence |<<doc-em not>> |
|doc-ph |a placeholder for the user to fill in |<<doc-ph tagname>> |
|doc-strong |major emphasis within a tiddler |<<doc-strong Important!>> |
|doc-w |a mention of an ordinary word or phrase |<<doc-w "hello world">> |
|.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-tiddler Example>> |
|doc-tag |a tag |<<doc-tag Example>> |
|doc-field|a field name|<<doc-field example>> |
|doc-field-value|a field value|<<doc-field-value "example value">> |
|doc-var|a variable or macro name|<<doc-var currentTiddler>> |
|doc-widget|a widget name|<<doc-widget list>> |
|.tid |a tiddler title|<<.tid Example>> |
|.tag |a tag |<<.tag Example>> |
|.field|a field name|<<.field example>> |
|.value|a field value|<<.value "example value">> |
|.op|a filter operator|<<.op backlinks>> |
|.var|a variable or macro name|<<.var currentTiddler>> |
|.wid|a widget name|<<.wid list>> |
!Links
|!Macro |!Used for |!Example |
|doc-link |a link containing WikiText |<<doc-link "^^an^^ ~~example~~" Example>> |
|doc-clink |a code link |<<doc-clink `<$list>` 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 Escape>> |
|doc-key-combo |a key combination |<<doc-key-combo Ctrl Enter>> |
|doc-input |text entered by the user |<<doc-input "npm install -g tiddlywiki">> |
|doc-output |text output by the system |<<doc-output "Serving on 127.0.0.1:8080">> |
|.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-sidebar-tab More>> |
|doc-more-tab |the name of a subtab of the More tab |<<doc-more-tab Shadows>> |
|doc-info-tab |the name of a tiddler info tab |<<doc-info-tab Fields>> |
|doc-controlpanel-tab |the name of a Control Panel tab |<<doc-controlpanel-tab Settings>> |
|doc-advancedsearch-tab |the name of an Advanced Search tab |<<doc-advancedsearch-tab Filter>> |
|doc-toc-tab |name of the tw5.com TOC tab |<<doc-toc-tab>> |
|doc-example-tab |an example tab name |<<doc-example-tab "Notes">> |
|.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 |<<doc-sidebar-tab Open>> |
|Recent |<<doc-sidebar-tab Recent>> |
|Tools |<<doc-sidebar-tab Tools>> |
|More |<<doc-sidebar-tab 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 |<<doc-more-tab All>> |
|Recent |<<doc-more-tab Recent>> |
|Tags |<<doc-more-tab Tags>> |
|Missing |<<doc-more-tab Missing>> |
|Drafts |<<doc-more-tab Drafts>> |
|Orphans |<<doc-more-tab Orphans>> |
|Types |<<doc-more-tab Types>> |
|System |<<doc-more-tab System>> |
|Shadows |<<doc-more-tab 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 |<<doc-info-tab Tools>> |
|References |<<doc-info-tab References>> |
|Tagging |<<doc-info-tab Tagging>> |
|List |<<doc-info-tab List>> |
|Listed |<<doc-info-tab Listed>> |
|Fields |<<doc-info-tab Fields>> |
|Advanced |<<doc-info-tab 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 |<<doc-controlpanel-tab Info>> |
|Appearance |<<doc-controlpanel-tab Appearance>> |
|Settings |<<doc-controlpanel-tab Settings>> |
|Saving |<<doc-controlpanel-tab Saving>> |
|Plugins |<<doc-controlpanel-tab 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 |<<doc-advancedsearch-tab Standard>> |
|System |<<doc-advancedsearch-tab System>> |
|Shadows |<<doc-advancedsearch-tab Shadows>> |
|Filter |<<doc-advancedsearch-tab 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 |<<doc-button "new-tiddler">> |
|.button |a standard button name and icon |<<.button "new-tiddler">> |
!!Parameters for doc-button
!!Parameters for .button
!!!Tiddler toolbar
|clone |<<doc-button "clone">> |
|close |<<doc-button "close">> |
|close-others |<<doc-button "close-others">> |
|edit |<<doc-button "edit">> |
|export-tiddler |<<doc-button "export-tiddler">> |
|info |<<doc-button "info">> |
|more-tiddler-actions |<<doc-button "more-tiddler-actions">> |
|new-here |<<doc-button "new-here">> |
|new-journal-here |<<doc-button "new-journal-here">> |
|permalink |<<doc-button "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 |<<doc-button "cancel">> |
|delete |<<doc-button "delete">> |
|save |<<doc-button "save">> |
|cancel |<<.button "cancel">> |
|delete |<<.button "delete">> |
|save |<<.button "save">> |
!!!Page toolbar
|advanced-search |<<doc-button "advanced-search">> |
|close-all |<<doc-button "close-all">> |
|control-panel |<<doc-button "control-panel">> |
|encryption |<<doc-button "encryption">> |
|export-page |<<doc-button "export-page">> |
|full-screen |<<doc-button "full-screen">> |
|home |<<doc-button "home">> |
|import |<<doc-button "import">> |
|language |<<doc-button "language">> |
|more-page-actions |<<doc-button "more-page-actions">> |
|new-journal |<<doc-button "new-journal">> |
|new-tiddler |<<doc-button "new-tiddler">> |
|permaview |<<doc-button "permaview">> |
|refresh |<<doc-button "refresh">> |
|save-wiki |<<doc-button "save-wiki">> |
|storyview |<<doc-button "storyview">> |
|tag-manager |<<doc-button "tag-manager">> |
|theme |<<doc-button "theme">> |
|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">> |

View File

@ -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]]
* [[Technical Prose Style]]

View File

@ -1,9 +1,9 @@
created: 20150110101500000
modified: 20150110181800000
modified: 20150117152550000
title: Instruction Tiddlers
tags: [[Improving TiddlyWiki Documentation]]
<<doc-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.
<<.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 <<doc-w "Find out more">> 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 <<doc-w you>>. 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 <<doc-w convenient>> or <<doc-w easy>>.
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>>.

View File

@ -1,9 +1,9 @@
created: 20141226192500000
modified: 20150110182100000
modified: 20150117152552000
title: Reference Tiddlers
tags: [[Improving TiddlyWiki Documentation]]
<<doc-def "Reference tiddlers">> 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:
* <<doc-w "the template is specified as a tiddler">> rather than <<doc-w "specify the template as a tiddler">>
* <<doc-w "the widget can be used for various purposes">> rather than <<doc-w "you can use the widget for various purposes">>
* But <<doc-w "this widget has several possible uses">> 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 <<doc-w "n't">> (<<doc-w "aren't">>, <<doc-w "doesn't">>, <<doc-w "hasn't">>, <<doc-w "isn't">>, etc) are acceptable, as they make it less easy to accidentally overlook the word <<doc-w not>>.
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>>.

View File

@ -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 <<doc-w customise>> are spelled <<doc-w -ise>>, not <<doc-w -ize>>.
Words like <<.word customise>> are spelled <<.word -ise>>, not <<.word -ize>>.
Standard technical acronyms are written in upper case, without dots: <<doc-w HTML>>, not <<doc-w html>> or <<doc-w H.T.M.L.>>
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:

View File

@ -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. <<doc-w "Execution of the macro is performed">> just means <<doc-w "The macro runs">>. <<doc-w "Your expectation might be...">> just means <<doc-w "You might expect...">>.
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: <<doc-w "Jane creates a tiddler">> rather than <<doc-w "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: <<doc-w "a tiddler is created">>. But it may be clearer to proceed from cause to effect and say <<doc-w "this creates a tiddler">> 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.

View File

@ -1,4 +1,5 @@
created: 20150110183300000
modified: 20150117152556000
title: Tiddler Structure
tags: [[Improving TiddlyWiki Documentation]]

View File

@ -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 <<doc-tiddler "List Widget">> or <<doc-tiddler "Tiddler Fields">>.
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 <<doc-w and>>, <<doc-w or>>, <<doc-w the>>, <<doc-w to>> and <<doc-w with>> 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. <<doc-tiddler "Keyboard Shortcuts">> or <<doc-tiddler "Tiddler Fields">>. 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. <<doc-tiddler "List Widget">>, <<doc-tiddler "Tag Operator">>.
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 <<doc-w the>>.
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 <<doc-tiddler ~JavaScript>> 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. <<doc-tiddler "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.
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 <<doc-w "How to">>, e.g. <<doc-tiddler "How to edit a tiddler">>. Avoid titles like <<doc-tiddler "Editing tiddlers">>, because a less fluent English speaker could misunderstand that as the name of a category of tiddlers.
[[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.

View File

@ -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 (<code>`...`</code>) for fragments of WikiText.
Use simple backticks (<code>&#96;...&#96;</code>) 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 `…`.

View File

@ -1,38 +1,48 @@
created: 20150117152607000
modified: 20150118182742000
title: $:/editions/tw5.com/doc-macros
tags: $:/tags/Macro
\define doc-if(cond,then,else) <$reveal type="nomatch" default="$cond$" text="">$then$</$reveal><$reveal type="match" default="$cond$" text="">$else$</$reveal>
\define .if(cond,then,else) <$reveal default="$cond$" type="nomatch" text="">$then$</$reveal><$reveal default="$cond$" type="match" text="">$else$</$reveal>
\define doc-def(_) <dfn class="doc-def">$_$</dfn>
\define doc-em(_) <em class="doc-em">$_$</em>
\define doc-strong(_) <strong class="doc-strong">$_$</strong>
\define doc-ph(_) <var class="doc-ph">$_$</var>
\define doc-w(_) "$_$"
\define .def(_) <dfn class="doc-def">$_$</dfn>
\define .em(_) <em class="doc-em">$_$</em>
\define .strong(_) <strong class="doc-strong">$_$</strong>
\define .place(_) <code class="doc-place">$_$</code>
\define .word(_) "$_$"
\define doc-tiddler(_) <code class="doc-tiddler">$_$</code>
\define doc-tag(_) <code class="doc-tag">$_$</code>
\define doc-field(_) <code class="doc-field">$_$</code>
\define doc-field-value(_) <code class="doc-field-value">$_$</code>
\define doc-var(_) <code class="doc-var">$_$</code>
\define doc-widget(_) <code class="doc-widget">$_$</code>
\define .preamble(_) :.doc-preamble $_$
\define doc-link(_,to) <$link to="$to$">$_$</$link>
\define doc-clink(_,to) <span class="doc-clink"><<doc-link """$_$""" "$to$">></span>
\define .tid(_) <code class="doc-tiddler">$_$</code>
\define .tag(_) <code class="doc-tag">$_$</code>
\define .field(_) <code class="doc-field">$_$</code>
\define .value(_) <code class="doc-value">$_$</code>
\define .op(_) <code class="doc-operator">$_$</code>
\define .var(_) <code class="doc-var">$_$</code>
\define .widget(_) <code class="doc-widget">$$_$</code>
\define doc-key(_) <span class="doc-key">$_$</span>
\define doc-combo-key(_) <$macrocall $name="doc-if" cond="$_$" then="<<doc-key '$_$'>>"/>
\define doc-key-combo(1,2,3,4) <<doc-combo-key "$1$">><<doc-if "$2$" +>><<doc-combo-key "$2$">><<doc-if "$3$" +>><<doc-combo-key "$3$">><<doc-if "$4$" +>><<doc-combo-key "$4$">>
\define .otitle(_) $_$ Operator
\define doc-input(_) `$_$`
\define doc-output(_) `$_$`
\define .link(_,to) <$link to="$to$">$_$</$link>
\define .clink(_,to) <span class="doc-clink"><<.link """$_$""" "$to$">></span>
\define .flink(to) <$macrocall $name=".link" _="<<.field {{$to$!!caption}}>>" to="$to$"/>
\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/>
\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/>
\define .wlink(to) <$macrocall $name=".link" _="<<.wid {{$to$!!caption}}>>" to="$to$"/>
\define doc-tab(_) <span class="doc-tab">{{$_$!!caption}}</span>
\define doc-sidebar-tab(_) <<doc-tab "$:/core/ui/SideBar/$_$">>
\define doc-more-tab(_) <<doc-tab "$:/core/ui/MoreSideBar/$_$">>
\define doc-info-tab(_) <<doc-tab "$:/core/ui/TiddlerInfo/$_$">>
\define doc-controlpanel-tab(_) <<doc-tab "$:/core/ui/ControlPanel/$_$">>
\define doc-advancedsearch-tab(_) <<doc-tab "$:/core/ui/AdvancedSearch/$_$">>
\define doc-toc-tab() <<doc-tab "TableOfContents">>
\define doc-example-tab(_) <span class="doc-tab">$_$</span>
\define .key(_) <span class="doc-key">$_$</span>
\define .combokey(_) <$macrocall $name=".if" cond="$_$" then="<<.key '$_$'>>"/>
\define .keycombo(1,2,3,4) <<.combokey "$1$">><<.if "$2$" +>><<.combokey "$2$">><<.if "$3$" +>><<.combokey "$3$">><<.if "$4$" +>><<.combokey "$4$">>
\define doc-button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span>
\define .tab(_) <span class="doc-tab">{{$_$!!caption}}</span>
\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(_) <span class="doc-tab">$_$</span>
\define .button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span>
\define .state-prefix() $:/state/editions/tw5.com/

View File

@ -1,3 +1,5 @@
created: 20150117152612000
modified: 20150118161750000
title: $:/editions/tw5.com/doc-styles
tags: $:/tags/Stylesheet
@ -22,7 +24,8 @@ tags: $:/tags/Stylesheet
font-style: italic;
}
.doc-ph {
.doc-place {
background-color: <<color background>>;
border: none;
color: <<color foreground>>;
font-style: italic;
@ -33,20 +36,38 @@ tags: $:/tags/Stylesheet
.doc-tag,
.doc-tiddler,
.doc-field,
.doc-field-value,
.doc-value,
.doc-operator,
.doc-var,
.doc-widget {
background: <<color background>>;
background-color: <<color background>>;
border: none;
color: <<color very-muted-foreground>>;
font-weight: bold;
padding: 0;
}
a .doc-place,
a .doc-button,
a .doc-tab,
a .doc-tag,
a .doc-tiddler,
a .doc-field,
a .doc-value,
a .doc-operator,
a .doc-var,
a .doc-widget {
color: <<color tiddler-link-foreground>>;
}
.doc-button svg {
height: 1em;
}
td svg {
height: 1em;
}
.doc-key {
color: <<color very-muted-foreground>>;
font-weight: bold;
@ -54,4 +75,25 @@ tags: $:/tags/Stylesheet
.doc-clink code {
color: <<colour tiddler-link-foreground>>;
}
}
.doc-preamble {
border: 2px solid <<colour very-muted-foreground>>;
color: <<colour very-muted-foreground>>;
font-size: 90%;
margin-left: 0;
padding: 0.5em 0.7em;
}
.doc-example {
margin: 1em 0;
padding: 0.8em 0;
}
.doc-example:hover {
background-color: <<colour code-background>>;
}
.doc-example ul {
margin-bottom: 0;
padding-bottom: 0;
margin-top: 0.2em;
}

View File

@ -0,0 +1,60 @@
created: 20150117152607000
modified: 20150118181923000
title: $:/editions/tw5.com/operator-macros
tags: $:/tags/Macro
\define .operator-def(input,parameter,paramName,output)
<table><tr>
<th align="left">input</th>
<td>$input$</td>
</tr><tr>
<th align="left">parameter <<.place "$paramName$">></th>
<td>$parameter$</td>
</tr><tr>
<th align="left">output</th>
<td>$output$</td>
</tr></table>
\end
\define .operator-def-suffix(input,suffix,suffixName,parameter,paramName,output)
<table><tr>
<th align="left">input</th>
<td>$input$</td>
</tr><tr>
<th align="left">suffix <<.place "$suffixName$">></th>
<td>$suffix$</td>
</tr><tr>
<th align="left">parameter <<.place "$paramName$">></th>
<td>$parameter$</td>
</tr><tr>
<th align="left">output</th>
<td>$output$</td>
</tr></table>
\end
\define .operator-examples(op) <$link to="$op$ Operator (Examples)">Examples</$link>
\define .operator-example(n,eg,ie)
<div class="doc-example">
`$eg$`
<<.if cond:"$ie$" then:"<dd>i.e. $ie$</dd>">>
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show">
<dl>
<dd><$button set=<<.state>> setTo="show">Try it</$button></dd>
</dl>
</$reveal>
<$reveal state=<<.state>> type="match" text="show">
<dl>
<dd><$button set=<<.state>> setTo="">Hide</$button></dd>
</dl>
<ul><$list filter="$eg$" emptyMessage="(empty)">
<li><$link><$view field="title"/></$link></li>
</$list></ul>
</$reveal>
</$list>
\end
\define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]].
\define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler.
\define .node-only-operator() This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser.

View File

@ -1,32 +1,38 @@
created: 20150117184156000
modified: 20150117184616000
title: $:/editions/tw5.com/wikitext-macros
tags: $:/tags/Macro
\define wikitext-example(src)
<div class="doc-example">
```
$src$
```
Renders as:
That renders as:
$src$
In HTML:
... and the underlying HTML is:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
</div>
\end
\define wikitext-example-without-html(src)
<div class="doc-example">
```
$src$
```
Renders as:
That renders as:
$src$
</div>
\end
\define tw-code(tiddler)

View File

@ -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 <<olink backlinks>> [[filter operator|Filter Operators]] to get all tiddlers linking to this one...
```
<<list-links filter:"[<currentTiddler>backlinks[]]">>
@ -76,4 +76,4 @@ Using the [[backlinks|FilterOperator: backlinks]] [[filter operator|FilterOperat
<<<
<<list-links filter:"[<currentTiddler>backlinks[]]">>
<<<
<<<