TiddlyWiki5/editions/tw5.com/tiddlers/filters/is.tid

38 wiersze
1.7 KiB
Plaintext
Czysty Zwykły widok Historia

2014-04-10 18:56:51 +00:00
created: 20140410103123179
2015-01-19 19:37:26 +00:00
modified: 20150119192457000
tags: [[Filter Operators]] [[Common Operators]] [[Category Operators]]
title: is Operator
2014-04-10 18:56:51 +00:00
type: text/vnd.tiddlywiki
2015-01-19 19:37:26 +00:00
caption: is
purpose: filter the input tiddlers by basic category
<$macrocall $name=".operator-def"
input="a [[selection|Title Selections]] of titles"
parameter="see below"
paramName="p"
output="the [[subselection|Title Selections]] of the input tiddlers that belong to the specified basic category"
/>
The parameter is one of the following categories:
|!Category |!Matches any tiddler that... |
|^`current`|is the [[current tiddler|CurrentTiddler]] |
|^`image`|has an image ContentType |
|^`missing` |does not exist (other than possibly as a non-shadow tiddler), regardless of whether there are any links it |
|^`orphan` |has no [[Observable Links]] to it |
|^`shadow` |is a [[shadow tiddler|ShadowTiddlers]], regardless of whether it has been overridden with a non-shadow tiddler |
|^`system` |is a [[system tiddler|SystemTiddlers]], i.e. its title starts with `$:/` |
|^`tag` |is in use as a tag |
|^`tiddler` |exists as a non-shadow tiddler |
2014-04-10 18:56:51 +00:00
2015-01-19 19:37:26 +00:00
;Negation
: `!is` outputs the subselection of the input tiddlers that are <<.em not>> in the specified category. `!is[tiddler]` is a synonym for `is[missing]`, and vice versa.
2014-04-10 18:56:51 +00:00
2015-01-19 19:37:26 +00:00
An unrecognised category outputs an error string.
2014-04-10 18:56:51 +00:00
2015-01-19 19:37:26 +00:00
When <<.op is[missing]>> is the first operator in a [[run|Filter Syntax]], its output is always empty. And when <<.op is[shadow]>> comes first, it outputs only those shadow tiddlers that have been overridden. This is because the [[initial input to a run|Filter Syntax]] contains only <<.em non>>-shadow tiddlers.
2014-04-10 18:56:51 +00:00
2015-01-19 19:37:26 +00:00
The <<.op all>> operator is similar, but its scope is the whole wiki.
2014-04-10 18:56:51 +00:00
2015-01-19 19:37:26 +00:00
<<.operator-examples "is">>