Compare commits

...

72 Commits

Author SHA1 Message Date
twMat 98def455ac
Merge 79bf9c6978 into 1d48909012 2024-04-25 23:33:20 +08:00
Jeremy Ruston 1d48909012 Docs: Remove reference to restrictions on field names
Fixes #8146
2024-04-16 10:34:49 +01:00
Joshua Fontany d3722a6602
Docs for use-browser-cache (#8142)
* docs for use-browser-cache

* Update WebServer Parameter_ use-browse-cache.tid

remove timestamps

* revert last change

* move to webserver folder

* clarify, typos

* dedupe
2024-04-13 10:08:40 +01:00
andjar 1fb9098c76
Update cla-individual.md (#8133)
Signing the CLA
2024-04-09 22:22:18 +01:00
Crystal Person 804f227815
Signing CLA (#8126) 2024-03-31 17:08:09 +01:00
Mario Pietsch b595651fe1
Fix hide-show button code needs to be transcluded mode=block (#8082) 2024-03-28 21:50:22 +00:00
Mario Pietsch 9cd6affcae
Minor changes to Widgets tiddler (#8107) 2024-03-28 19:29:57 +00:00
Jeremy Ruston d37d6595b5 Docs: Add link to Basic Auth example 2024-03-27 10:09:46 +00:00
Jeremy Ruston e02cafb938 Add docs about using Basic Authentication in HTTP requests 2024-03-27 08:35:56 +00:00
poc2go 09f04cb5a6
Signing the CLA (#8077) 2024-03-16 17:33:13 +00:00
Mario Pietsch 511d480a60
Fix wikitext-macros example block mode (#8071) 2024-03-15 18:08:37 +00:00
Mario Pietsch 3342cfc886
Docs: fix doubled list in: Deprecated - What does it mean (#8060) 2024-03-13 22:08:11 +00:00
Mario Pietsch ec0b264426
Docs: add Procedures railroad syntax description (#8061) 2024-03-13 22:07:39 +00:00
Mario Pietsch 8f741e8e67
Docs: deprecate Macro call railroad syntax (#8062) 2024-03-13 22:06:23 +00:00
Mario Pietsch 32bf9fd7a1
Docs - wikitext-macros new v5.3.x syntaxWikitext macros (#8059)
* docs - wikitext-macros new v5.3.x syntax

* fix flexcard macro wrong link
2024-03-13 22:02:56 +00:00
Mateusz Wilczek 21a5841aab
Add links to and instructions about Saq's PR Maker in docs (#8068) 2024-03-13 12:17:14 +00:00
Mateusz Wilczek edfd27fa45
Improve filter run prefix docs (#8067) 2024-03-12 20:54:45 +00:00
Jeremy Ruston 0e7d566df7 Add link to demo of TiddlyWiki as a library in other Node.js apps 2024-03-12 17:16:51 +00:00
Mario Pietsch 8481b7d137
Dev edition: change layout to fluid-fixed (#8063) 2024-03-12 08:56:12 +00:00
Mario Pietsch 0fbfdce4b6
Add $:/StoryList to gitignore for tiddlywiki-com branch (#8065) 2024-03-12 08:54:09 +00:00
Jeremy Ruston e67eaca030 Revert "Docs - wikitext-macros new v5.3.x syntax (#8033)"
This reverts commit 0fb10da8b3.
2024-03-11 12:13:25 +00:00
Mario Pietsch 78a09fcf56
Docs - download empty button new syntax - v5.3.x (#8034)
* docs - download empty button new syntax - want to keep stuff like this for the time beeing

* use \procedure instead of \define for consistency
2024-03-10 15:07:56 +00:00
Mario Pietsch 0f395ce81d
Add code-body field to doc-styles tiddler (#8054) 2024-03-10 15:07:28 +00:00
Mario Pietsch b28f420430
Some more tv-macros changed to new syntax. Plus adjusted doc tiddlers (#8056) 2024-03-10 15:06:04 +00:00
Mario Pietsch 0b7914785c
Minor adjustments to existing doc tiddlers without changing modified date (#8057) 2024-03-10 15:05:26 +00:00
Mario Pietsch 8d36ecd6bc
Add list-links to $:/deprecated tag (#8053) 2024-03-10 14:30:21 +00:00
Mario Pietsch c2b436371b
Docs: tiddler-info-source - change sources tab to new syntax and add link to pr-creator (#8029)
* tiddler-info-source - change sources tab to new syntax and add link to pr-creator

* remove class from plain text elements as requested
2024-03-10 11:08:00 +00:00
Mario Pietsch 24e474bd72
Doc-macros, styles and documentation overview tiddler (#8037) 2024-03-10 10:41:09 +00:00
Mario Pietsch a75d4ca003
Docs - operator macros, templates and filter-run template (#8035) 2024-03-10 10:39:16 +00:00
Mario Pietsch 0fb10da8b3
Docs - wikitext-macros new v5.3.x syntax (#8033) 2024-03-10 10:37:26 +00:00
Mario Pietsch 0202d7b463
Docs - make .from-version and .deprecated-since macros more readable (#8032) 2024-03-10 10:36:49 +00:00
Mario Pietsch b22570a91f
Doc-macros - variable-macros new v5.3.x syntax (#8031)
* doc-macros - variable-macros new v5.3.x syntax

* change modified back to old value
2024-03-10 10:35:31 +00:00
Télumire 35d1609a2b
Add a warning for potential image map scaling issues + responsive alternative with SVG (#8044)
* Add a warning for potential image map scaling issues + alternative with SVG

* Update ImageWidget.tid

fix phrasing
2024-03-09 14:39:15 +00:00
Jeremy Ruston a90b1dbb49 Docs for bags and recipes
Prompted by https://talk.tiddlywiki.org/t/whats-a-bag-and-whats-a-tiddlywebadaptor/9278
2024-03-09 14:24:42 +00:00
Jeremy Ruston 72c4b92a4c Move some docs tiddlers to the correct directories 2024-03-09 14:23:45 +00:00
Mario Pietsch 9082f36008
Docs: Add example for sha256 operator (#8042) 2024-03-08 17:29:17 +00:00
lin onetwo 6f9cabd352
DevDocs: about modern frameworks in TiddlyWiki (#8027)
* docs: abount modern frameworks

(cherry picked from commit 783547bac2d1bfaa20def3eeda0dc10b6b465d8d)

* docs: modified time

(cherry picked from commit c8db907fe273a414768f5292f61986800e092dfe)
2024-03-06 17:35:42 +00:00
TonyM f02fafe365
Update RefreshThrottling.tid (#8024)
Change word "preciously" to "previously" as I believe was intend.
2024-03-02 20:03:59 +00:00
Mario Pietsch 4fba206606
move tip to the end of the tiddler so it does not distract reading (#8019)
* move tip to the end of the tiddler so it does not distract reading

* reset modified
2024-02-29 19:26:19 +00:00
Jeremy Ruston 5b2d35e8d1 Revert "Update backtranscludes.tid (#8010)"
This reverts commit 32de6eca22.
2024-02-28 18:04:16 +00:00
catter-fly 4ae6f1ffd4
Adjusting saving w/r/t FireFox (#7669) 2024-02-28 11:38:00 +00:00
lin onetwo 32de6eca22
Update backtranscludes.tid (#8010)
* Update backtranscludes.tid

(cherry picked from commit dbce31764937e90ec0d678a29e426b22eacb122b)

* from-version 5.3.4
2024-02-26 14:33:17 +00:00
Mateusz Wilczek d29df793a4
Docs: Improve `.from-version` macro (#7874)
* Docs: Improve `.from-version` macro

* Restore icons in version badges
2024-02-24 09:26:41 +00:00
Bimba Laszlo 6236e7777c
Fix URLs of bimlas plugins (#7994) 2024-02-17 09:34:48 +00:00
Mario Pietsch a49436160d
Improve Filter Syntax documentation (#7368)
* Improve Filter Syntax documentaion / navigation

* update links and missing diagrams

* rename legacy prefix to shortcut prefix

* Update editions/tw5.com/tiddlers/filters/Filter Operators.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* add most changes a suggested by yaisog

* fix copy / paste from-version

* replace operand with parameter in the docs

* fix typo

* fix typos and improve railroad diagrams consistency

* move "new from version" info for filter run prefixes below the table

* fix typo transclusion and substitution

* Move Filters tiddler to the top level in the TOC

* wip-breadcrumbs

* breadcrumbs & breadcrumbsList macro final

* remove files that do not belong to this PR

* restore release banner

* add simple / story mode to breadcrumbs

* .breadcrumbs macro update comments

* new breadcrumbs CSS, woks with small screens

* make CSS configurable using hidden-settings

* improve CSS fro small screens

* remove the initial: recursiveParentTag macro

* improve location info for breadcrumbs nav. add "alt-text" for Edge ::after element

* breadcrumbs add mode=field

* bc add initial docs

* breadcrumbsField will also respect the story ordering

* add configurable global filterMode setting

* improve arrow CSS for browser zooming

* add bc links use bc-caption if caption field is non-empty

* breadcrumbs improve comments

* breadcrumbs aria-lable uses caption if there is one

* breadcrumbs improve documentation

* breadcrumbs improve docs for sort param

* fix showArrows docs

* remove .bc-link aria-label .. it's not needed if caption is resolved properly

* use subfilter instead of enlist to evaluate the "excluded" variable. Be consistent with toc-macros

* remove breadcrumbs macros - they have their own PR now

* resolve conflict

* add back doc-macros tiddler

* integrate :then filter run prefix

* remove .breadcrumbs macros and their config tiddlers

* fix typos as requested

---------

Co-authored-by: yaisog <m@rcuswinter.de>
2024-02-14 17:20:32 +01:00
eschlon abab9164c5
Signing the CLA (#7974) 2024-02-10 14:45:06 +01:00
Mateusz Wilczek bc3132ab2c
Add explicit docs on temporary tiddlers (#7957) 2024-02-02 17:15:51 +00:00
Jeremy Ruston eaa21589e6 Fix link to Nicolas Petton's Notebook theme 2024-01-31 14:34:17 +00:00
yaisog 2099e687cc
improve the documentation on transclusions (#7914) 2024-01-24 11:40:55 +00:00
Jeremy Ruston 22f7af05de Extend ScrollableWidget example to have buttons to scroll up/down by 10 pixels 2023-12-31 17:14:59 +00:00
Jeremy Ruston a8f477a3ab Revert "Temporary new release banner for v5.3.4"
This reverts commit 9d10e2b3a7.
2023-12-25 20:08:37 +00:00
Jeremy Ruston 9d10e2b3a7 Temporary new release banner for v5.3.4 2023-12-23 15:48:28 +00:00
Jeremy Ruston 907aed3eab Version number update for 5.3.3 2023-12-23 10:26:43 +00:00
Jeremy Ruston 83220be7d9 Preparing for release of v5.3.3 2023-12-23 10:25:50 +00:00
Jeremy Ruston a3cba681e0 Merge branch 'tiddlywiki-com' 2023-12-23 10:20:49 +00:00
Jeremy Ruston 4f01a53917 Include banner image in release note 2023-12-23 10:20:32 +00:00
Jeremy Ruston 5cb31b7adb New release banner for v5.3.3 2023-12-23 09:41:25 +00:00
Jeremy Ruston 6a9dc9dcd5 Update release note 2023-12-21 11:53:08 +00:00
Saq Imtiaz 46a22ef585
Fix: resolved issues with select widget after refactoring (#7905) 2023-12-21 11:50:33 +00:00
Jeremy Ruston 3d712127ad Update release note 2023-12-21 10:42:01 +00:00
Jeremy Ruston a3e5ace458
Remove whitespace immediately after pragmas (#7895)
This is intended to revert some of the behaviour introduced in #7835, see the discussion here: https://github.com/Jermolene/TiddlyWiki5/pull/7888#issuecomment-1856184592
2023-12-21 10:36:45 +00:00
Jeremy Ruston 6fa81feeba
Restore comma before skinny tiddlers (#7897)
* Restore comma before skinny tiddlers

Fixes #7896

* Fix problem that showed up in CI tests
2023-12-21 10:36:29 +00:00
yaisog 95e270a8a6
Fix per-tiddler previews (#7900)
* Initial commit

* Put SVG back into a span

Needed in case this is targeted in CSS; DOM structure should not be changed.

* Fix the fix

Do it once, do it right.
2023-12-21 10:36:08 +00:00
Jeremy Ruston e2d4388c48
Fix for list widget with an empty paragraph as inline template (#7903)
Fixes #7902
2023-12-21 10:35:40 +00:00
Mario Pietsch f68fa89a29
Docs: fix #7899 recursive "release" tabs problem (#7901) 2023-12-20 13:14:31 +00:00
Jeremy Ruston d2d00ffa4d Merge branch 'tiddlywiki-com' 2023-12-17 19:51:17 +00:00
Jeremy Ruston c6a72875ba Docs: Warn about textual substitution with nested macros 2023-12-17 18:57:16 +00:00
Jeremy Ruston aaf7dc355d Add docs for "remappable' attribute of genesis widget 2023-12-14 09:40:21 +00:00
Jeremy Ruston e131dd3761 Revert "Update ViewWidget.tid to include common variants (#3895)"
This reverts commit cdfa4b6082.
2023-12-14 09:05:48 +00:00
Drevarr f697f008b1
Signing the CLA (#7886) 2023-12-14 08:22:33 +00:00
Jeremy Ruston 267521ad1b Preparing for v5.3.3-prerelease 2023-12-13 08:16:59 +00:00
twMat 79bf9c6978
Update TranscludeWidget.tid
Clarifying the `$variable` attribute description
2023-07-14 12:13:37 +02:00
171 changed files with 1983 additions and 1074 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
$__StoryList.tid

View File

@ -5,7 +5,7 @@
# Default to the current version number for building the plugin library
if [ -z "$TW5_BUILD_VERSION" ]; then
TW5_BUILD_VERSION=v5.3.2
TW5_BUILD_VERSION=v5.3.3
fi
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"

View File

@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`.
filteroperator: Individual filter operator methods.
global: Global data to be inserted into `$tw`.
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
isfilteroperator: Operands for the ''is'' filter operator.
isfilteroperator: Parameters for the ''is'' filter operator.
library: Generic module type for general purpose JavaScript modules.
macro: JavaScript macro definitions.
parser: Parsers for different content types.

View File

@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize
Error/Filter: Filter error
Error/FilterSyntax: Syntax error in filter expression
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator
Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
Error/LoadingPluginLibrary: Error loading plugin library
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`

View File

@ -216,6 +216,8 @@ WikiParser.prototype.parsePragmas = function() {
subTree[0].children = [];
currentTreeBranch = subTree[0].children;
}
// Skip whitespace after the pragma
this.skipWhitespace();
}
return currentTreeBranch;
};

View File

@ -109,6 +109,7 @@ ListWidget.prototype.findExplicitTemplates = function() {
this.explicitJoinTemplate = null;
this.hasTemplateInBody = false;
var searchChildren = function(childNodes) {
var foundInlineTemplate = false;
$tw.utils.each(childNodes,function(node) {
if(node.type === "list-template") {
self.explicitListTemplate = node.children;
@ -118,12 +119,14 @@ ListWidget.prototype.findExplicitTemplates = function() {
self.explicitJoinTemplate = node.children;
} else if(node.type === "element" && node.tag === "p") {
searchChildren(node.children);
foundInlineTemplate = true;
} else {
self.hasTemplateInBody = true;
foundInlineTemplate = true;
}
});
return foundInlineTemplate;
};
searchChildren(this.parseTreeNode.children);
this.hasTemplateInBody = searchChildren(this.parseTreeNode.children);
}
ListWidget.prototype.getTiddlerList = function() {

View File

@ -43,7 +43,7 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
//Create element
var domNode = this.document.createElement("select");
if(this.selectClass) {
domNode.classname = this.selectClass;
domNode.className = this.selectClass;
}
// Assign data- attributes
this.assignAttributes(domNode,{
@ -62,8 +62,8 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
if(this.selectTooltip) {
domNode.setAttribute("title",this.selectTooltip);
}
this.renderChildren(domNode,nextSibling);
this.parentDomNode.insertBefore(domNode,nextSibling);
this.renderChildren(domNode,null);
this.domNodes.push(domNode);
this.setSelectValue();
if(this.selectFocus == "yes") {

View File

@ -1,3 +1,3 @@
title: $:/core/templates/html-json-skinny-tiddler
<$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>
<$text text=<<join>>/><$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes"/>

View File

@ -9,9 +9,7 @@ title: $:/core/templates/store.area.template.html
<$let newline={{{ [charcode[10]] }}} join=`,$(newline)$`>
<$text text=<<newline>>/>
<$list filter=<<saveTiddlerFilter>> join=<<join>> template="$:/core/templates/html-json-tiddler"/>
<$vars numTiddlers={{{ [subfilter<saveTiddlerFilter>count[]] }}}>
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} join=<<join>> template="$:/core/templates/html-json-skinny-tiddler"/>
</$vars>
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-json-skinny-tiddler"/>
<$text text=<<newline>>/>
</$let>
`]</script>`
@ -22,8 +20,8 @@ title: $:/core/templates/store.area.template.html
<!-- Old-style DIV/PRE-based store area -->
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
`<div id="storeArea" style="display:none;">`
<$list filter=<<saveTiddlerFilter>> template="$:/core/templates/html-div-tiddler"/>
<$list filter={{{ [<skinnySaveTiddlerFilter>] }}} template="$:/core/templates/html-div-skinny-tiddler"/>
<$list filter={{{ [<saveTiddlerFilter>] }}} template="$:/core/templates/html-div-tiddler"/>
<$list filter="[subfilter<skinnySaveTiddlerFilter>]" template="$:/core/templates/html-div-skinny-tiddler"/>
`</div>`
</$reveal>
</$list>

View File

@ -1,9 +1,5 @@
title: $:/core/ui/EditTemplate/body/default
\function edit-preview-state()
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] +[get[text]] :else[[no]]
\end
\define config-visibility-title()
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\end
@ -14,15 +10,16 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\whitespace trim
<$let
editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
importTitle=<<qualify $:/ImportImage>>
importState=<<qualify $:/state/ImportImage>> >
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
<div>
<div class={{{ [function[edit-preview-state]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
<div class={{{ [<editPreviewStateTiddler>get[text]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore">
<$list filter="[<editPreviewStateTiddler>get[text]match[yes]]" variable="ignore">
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>

View File

@ -9,17 +9,8 @@ button-classes: tc-text-editor-toolbar-item-start-group
shortcuts: ((preview))
\whitespace trim
<$let
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
>
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
{{$:/core/images/preview-open}}
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
</$reveal>
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
{{$:/core/images/preview-closed}}
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
</$reveal>
</$let>
<span>
<$transclude $tiddler={{{ [<editPreviewStateTiddler>get[text]match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} />
</span>
<$action-setfield $tiddler=<<editPreviewStateTiddler>> $value={{{ [<editPreviewStateTiddler>get[text]toggle[yes],[no]] }}} />
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>

View File

@ -1,6 +1,6 @@
title: $:/config/OfficialPluginLibrary
tags: $:/tags/PluginLibrary
url: https://tiddlywiki.com/library/v5.3.2/index.html
url: https://tiddlywiki.com/library/v5.3.3/index.html
caption: {{$:/language/OfficialPluginLibrary}}
{{$:/language/OfficialPluginLibrary/Hint}}

View File

@ -16,6 +16,7 @@ Welcome to the developer documentation for TiddlyWiki (https://tiddlywiki.com/).
** [[Adding Babel Polyfill to TiddlyWiki]]
** [[TiddlyWiki Drag and Drop Interoperability]]
** [[Javascript Widget Tutorial]]
** [[Using TiddlyWiki as a library in another Node.js application]]
* The original developer documentation from https://tiddlywiki.com:
** [[TiddlyWiki for Developers]]
** [[TiddlyWiki Coding Style Guidelines]]

View File

@ -1,5 +1,5 @@
created: 20190202035524804
modified: 20221029161501848
modified: 20240302110658300
tags:
title: Javascript Widget Tutorial
type: text/vnd.tiddlywiki
@ -9,21 +9,23 @@ This tutorial provides step-by-step, interactive examples of how to write code f
Intended audience:
# Those who know tiddlywiki well and know programming and javascript and want to write their own widget. I don't make any effort to explain javascript here. For that you will need other resources.
# Those who know tiddlywiki well and know programming and javascript and want to write their own widget.
# Those who know tiddlywiki well and don't know javascript, but want to understand more about how tiddlywiki works. You should be able to skim through and interact with the demos and learn something.
!The tutorial
*[[Undefined widget tutorial]]
*[[Do nothing widget tutorial]]
*[[Hello World widget tutorial]]
*[[Widget refresh tutorial part I]]
*[[Widget refresh tutorial part II]]
*[[Widget refresh tutorial part III]]
*[[Widget attributes tutorial part I]]
*[[Widget attributes tutorial part II]]
*[[Child widgets tutorial]]
We don't make any effort to explain javascript here. For that you will need other resources, like [[MDN|https://developer.mozilla.org/en-US/docs/Web/JavaScript]].
! Notes
!! The tutorial
* [[Undefined widget tutorial]]
* [[Do nothing widget tutorial]]
* [[Hello World widget tutorial]]
* [[Widget refresh tutorial part I]]
* [[Widget refresh tutorial part II]]
* [[Widget refresh tutorial part III]]
* [[Widget attributes tutorial part I]]
* [[Widget attributes tutorial part II]]
* [[Child widgets tutorial]]
!! Notes
tiddlywiki doesn't support dynamically reloading javascript. If you change a javascript tiddler, then you need to save and reload the wiki before the changes will take affect.
@ -31,7 +33,11 @@ To avoid the need for such reloads, the excellent [[innerwiki plugin|https://tid
Without the need for reloads, a tiddlywiki instance with the [[innerwiki plugin|https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/]] installed works great as a playground for interacting with tiddlywiki javascript.
! Other documentation on writing TW widgets
!! Other documentation on writing TW widgets
*WidgetModules
*[[Widgets]]
* WidgetModules
* [[Widgets]]
!! Full API doc
[[Github Pages of TW5-Typed|https://tiddly-gittly.github.io/TW5-Typed/api/classes/modules_widgets.widget]]

View File

@ -1,5 +1,5 @@
modified: 20160305222940000
created: 20160111034749658
modified: 20240302110735646
title: Using ES2016 for Writing Plugins
type: text/vnd.tiddlywiki
@ -7,7 +7,15 @@ With the advent of ES2015 (also known as ES6) and the availability of [[Babel.js
Please understand how the PluginMechanism works since this is all about writing a plugin using Babel to compile the output that will be included in the final TiddlyWiki (for example [[TiddlyWiki on Node.js]]).
!! Installing and Configuring Babel
!! Use a framework
It is recommended to use develop toolkit managed by community. For example,
# [[Modern.TiddlyDev|https://tiddly-gittly.github.io/Modern.TiddlyDev/]]
They are known as "~JavaScript Meta-Framework". With them, you can start developing in a few minutes, without hours of configuration and debugging the build steps.
!! Installing and Configuring Babel by yourself
You can install Babel using
@ -33,7 +41,9 @@ Inside your plugin project edit the file `.babelrc` and enter the following:
<<.tip "I found it easier to manage my plugins as if they were ''npm'' modules complete with a `package.json` that compiles the output via `npm run build`. See [[npm-scripts documentation|https://docs.npmjs.com/misc/scripts]] for details.">>
!! Compiling the Output
Another benefit of using such a "Meta-Framework" is that you can easily maintain your configuration, you will find it difficult to upgrade those config files after several months.
!!! Compiling the Output
Pick a folder to store the ES2015 JavaScript and a folder to output the TiddlyWiki ready JavaScript. In this example I will use `src` and `lib` respectively. With Babel installed and working I can compile all the JavaScript in the `src` folder to the `lib` folder by running this command:
@ -43,7 +53,7 @@ $ babel src -d lib
<<.warning "Babel will //not// copy over non-JavaScript files. It is up to the developer to include all the supporting files themselves. Babel only converts the ~JavaScript files (ending in `.js`) from the `src` folder to the `lib` folder.">>
!! Imports and Exports
!!! Imports and Exports
In a plugin written pre-ES2015 one would `require` a module through TiddlyWiki like so:
@ -71,7 +81,7 @@ export { MyWidget as mywidget };
It is important to understand that in ES2016 the ''default'' export is not supported in TiddlyWiki. This is mostly because the core code expects specific properties to be attached to the `exports` variable. Bable's `export` conversion plays well with this //except// with the default export.
!! Classes
!!! Classes
In the example of a widget ES2016 plays well with class inheritance. To contrast the typical Widget definition would look something like this:
@ -104,7 +114,7 @@ class NameWidget extends Widget {
}
```
!!! Non Class Modules
!!!! Non Class Modules
For non class modules you can use the `export` keyword. Here is a simple [[Startup Module|ModuleType]]:
@ -122,11 +132,11 @@ export const params = {};
export function run() {…}
```
!! Polyfills
!!! Polyfills
ES2015 comes with some features that are part of the JavaScript core objects. These are not supported by all browsers. To use these features in [[most browsers|BrowserCompatibility]] you will need a <<.def "polyfill">>. Babel has a polyfill package that you can include. See [[Adding Babel Polyfill to TiddlyWiki]] for how to accomplish this.
!! Example
!!! Example
Here is an example ES2015 plugin/widget that will show the time and update it:

View File

@ -0,0 +1,5 @@
title: Using TiddlyWiki as a library in another Node.js application
Node.js applications can include TiddlyWiki as a library so that they can use wikitext rendering.
See the demo at https://github.com/Jermolene/TiddlyWiki5DemoApp

View File

@ -0,0 +1,6 @@
created: 20240311150859344
modified: 20240311150859344
title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout
type: text/vnd.tiddlywiki
fluid-fixed

View File

@ -1,12 +1,15 @@
caption: 5.3.3
created: 20231213080754563
modified: 20231213080754563
caption: 5.3.4
created: 20231223102229103
modified: 20231223102229103
tags: ReleaseNotes
title: Release 5.3.3
title: Release 5.3.4
type: text/vnd.tiddlywiki
description: Under development
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.2...master]]//
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.3...master]]//
! Major Improvements
! Translation improvements

View File

@ -1,6 +1,6 @@
title: $:/config/OfficialPluginLibrary
tags: $:/tags/PluginLibrary
url: https://tiddlywiki.com/prerelease/library/v5.3.2/index.html
url: https://tiddlywiki.com/prerelease/library/v5.3.3/index.html
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.

View File

@ -0,0 +1,13 @@
title: ListWidget/WithEmptyParagraphTemplate
description: List widget with an empty paragraph as inline template
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
+
title: Output
<$list filter="1"><p/></$list>
+
title: ExpectedResult
<p><p></p></p>

View File

@ -0,0 +1,64 @@
title: Pragmas/WhitespaceAfterPragma
description: parsermode pragma
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree">
<$text text=<<parsetree>>/>
</$wikify>
+
title: Text
\procedure this-is-a-definition() Something
Now!
+
title: ExpectedResult
<p>
[
{
"type": "set",
"attributes": {
"name": {
"name": "name",
"type": "string",
"value": "this-is-a-definition"
},
"value": {
"name": "value",
"type": "string",
"value": "Something"
}
},
"children": [
{
"type": "text",
"text": "Now!\n",
"start": 48,
"end": 53
}
],
"params": [],
"orderedAttributes": [
{
"name": "name",
"type": "string",
"value": "this-is-a-definition"
},
{
"name": "value",
"type": "string",
"value": "Something"
}
],
"isProcedureDefinition": true
}
]
</p>

View File

@ -0,0 +1,32 @@
title: Pragmas/WhitespaceNoPragma
description: parsermode pragma
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree">
<$text text=<<parsetree>>/>
</$wikify>
+
title: Text
Now!
+
title: ExpectedResult
<p>
[
{
"type": "text",
"text": "\n\n\n\nNow!\n",
"start": 0,
"end": 9
}
]
</p>

View File

@ -6,7 +6,7 @@ tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$select tiddler='New Tiddler' field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
<$select tiddler='New Tiddler' class="myclass" field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked">
<option disabled>Choose a new text</option>
<option>A Tale of Two Cities</option>
<option>A New Kind of Science</option>
@ -24,4 +24,4 @@ Title1
+
title: ExpectedResult
<p><select data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>
<p><select class="myclass" data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p>

View File

@ -1,5 +0,0 @@
created: 20220728145919904
list: Brackets Base64 HelloThere GettingStarted Community
modified: 20220728145919904
title: $:/StoryList
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,12 @@
created: 20240313100515958
modified: 20240313103959789
tags: Editions
title: TiddlyWiki Docs PR Maker
''~TiddlyWiki Docs PR Maker'' is a special edition of tiddlywiki.com designed to help you contribute to and improve the documentation made by [[@saqimtiaz|https://github.com/saqimtiaz/]].
https://saqimtiaz.github.io/tw5-docs-pr-maker/
All changes made to the documentation can be very easily submitted to GitHub -- the pull request will be automatically made, hence the "PR Maker" name of the edition.
You will need to create a free ~GitHub account and sign the [[Contributor License Agreement]] before using the Docs PR Maker. You can find more details about contributing to the documentation [[here|Improving TiddlyWiki Documentation]].

View File

@ -1,5 +1,5 @@
created: 20140820151051019
modified: 20190115165616599
modified: 20240313114828368
tags: Community
title: Improving TiddlyWiki Documentation
type: text/vnd.tiddlywiki
@ -8,9 +8,29 @@ Anyone can submit improvements to the TiddlyWiki documentation that appears on h
<<.warning """If you already know GitHub, note that documentation updates must be directed to the `tiddlywiki-com` branch""">>
! Before you start editing
# Read and observe the [[Documentation Style Guide]]
# Create an account on https://github.com if you don't already have one
# If you haven't done so already, sign the [[Contributor License Agreement]] as described in [[Signing the Contributor License Agreement]]
! Editing and submitting your edits
You can choose to edit the documentation using the [[TiddlyWiki Docs PR Maker]] or directly in ~GitHub. The first method is especially recommended for users not familiar with ~GitHub.
!! Using [[Docs PR Maker|TiddlyWiki Docs PR Maker]] edition
# Go to https://saqimtiaz.github.io/tw5-docs-pr-maker/ or click the link displayed in the ribbon underneath the title when editing a tiddler on tiddlywiki.com
# Go through the quick introduction where you will need to provide your ~GitHub username and a ~GitHub access token (you will be guided in creating one)
# Edit or create tiddlers to update the documentation, the wiki will keep track of all changes
# Click the "Submit updates" button and check if all the tiddlers that you edited are included in the submission; if not, drag them into the box
# Provide a concise title and description of your changes (see the rules about titling pull requests in [[contribution guidelines|Contributing]])
# Submit your changes:
** "Save as draft" will create a //draft// pull request, this is useful if you don't want the changes to be merged //yet//, because you want to work on it later or discuss it first
** "Submit documentation update" will create a pull request, which will be immediately available for review and merging
!! Using ~GitHub
# On https://tiddlywiki.com, click "edit" on the tiddler you want to improve
# You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub//
# Click on the external link ...''this tiddler on ~GitHub''

View File

@ -3,7 +3,7 @@ modified: 20210106151027439
tags: [[Community Plugins]]
title: Disqus comments plugin by bimlas
type: text/vnd.tiddlywiki
url: https://bimlas.gitlab.io/tw5-disqus/
url: https://bimlas.github.io/tw5-disqus/
Use this plugin to give your visitors the opportunity to comment on your tiddlers without changing the wiki itself.

View File

@ -3,7 +3,7 @@ modified: 20210106151027488
tags: [[Community Plugins]]
title: Kin filter operator by bimlas
type: text/vnd.tiddlywiki
url: https://bimlas.gitlab.io/tw5-kin-filter/
url: https://bimlas.github.io/tw5-kin-filter/
The purpose of the kin operator with examples:

View File

@ -3,7 +3,7 @@ modified: 20210106151027508
tags: [[Community Plugins]]
title: Locator plugin by bimlas
type: text/vnd.tiddlywiki
url: https://bimlas.gitlab.io/tw5-locator/
url: https://bimlas.github.io/tw5-locator/
For those who use many tags or store many different topics in a common wiki the Locator plugin is a table of contents widget and an enhanced search engine that gives you the opportunity to filter results by related tags. Unlike table of contents, standard search and list of tags, this plugin offers these features in an organic, collaborative way.

View File

@ -1,9 +1,9 @@
created: 20210101154635213
modified: 20210110210929321
modified: 20240131143350890
tags: [[Community Themes]]
title: "Notebook theme" by Nicolas Petton
type: text/vnd.tiddlywiki
url: https://nicolas.petton.fr/tw/notebook.html
url: https://saqimtiaz.github.io/sq-tw/notebook.html
Notebook is a clean, uncluttered theme for ~TiddlyWiki.

View File

@ -0,0 +1,42 @@
created: 20240309135835396
modified: 20240309142156125
tags: Concepts
title: Bags and Recipes
type: text/vnd.tiddlywiki
The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008.
The principles of bags and recipes can be simply stated:
# Tiddlers are stored in named "bags"
# Bags have access controls that determines which users can read or write to them
# Recipes are named lists of bags, ordered from lowest priority to highest
# The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler
# Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template
A very simple example of the recipe/bag model might be for a single user who maintains the following bags:
* ''recipes'' - tiddlers related to cooking recipes
* ''work'' - tiddlers related to work
* ''app'' - common tiddlers for customising TiddlyWiki
Those bags would be used with the following recipes:
* ''recipes'' --> recipes, app - wiki for working with recipes, with common custom components
* ''work'' --> work, app - wiki for working with work, with common custom components
* ''app'' --> app - wiki for maintaining custom components
All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis.
A more complex example might be for a teacher working with a group of students:
* ''student-{name}'' bag for each students work
* ''teacher-course'' bag for the coursework, editable by the teacher
* ''teacher-tools'' bag for custom tools used by the teacher
Those bags would be exposed through the following hosted wikis:
* ''student-{name}'' hosted wiki for each students work, including the coursework material
* ''teacher-course'' hosted wiki for the coursework, editable by the teacher
* ''teacher'' hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work

View File

@ -1,7 +1,7 @@
created: 20130827080000000
list: [[Introduction to filter notation]] [[Filter Syntax]]
modified: 20220316145511797
tags: Reference Concepts
modified: 20230710074511095
tags: Reference Concepts TableOfContents
title: Filters
type: text/vnd.tiddlywiki
@ -15,7 +15,7 @@ You can think of TiddlyWiki as a database in which the records are tiddlers. A d
A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Title Selection]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them.
The following example passes a filter to the <<.mlink list-links>> macro to display a list of all tiddlers whose titles are <<.olink2 tagged tag>> with the word <<.word Filters>>:
The following example passes a filter to the <<.mlink list-links>> macro. It displays a list of all tiddlers using the <<.olink2 tag tag>> <<.word Filters>>:
<<wikitext-example-without-html """<<list-links "[tag[Filters]]">>""" >>

View File

@ -0,0 +1,8 @@
created: 20240202112358997
modified: 20240202120248326
tags: Concepts
title: Temporary Tiddlers
Temporary tiddlers are tiddlers that will be discarded when TiddlyWiki is saved. Under default configuration of the SavingMechanism (more specifically, the filter in [[$:/core/save/all]]), these are tiddlers prefixed with `$:/temp/`. This prefix makes them SystemTiddlers as well.
One example usage of temporary tiddlers is storing the search queries. The query typed in the [[$:/AdvancedSearch]] is stored in [[$:/temp/advancedsearch]].

View File

@ -1,5 +1,5 @@
created: 20130827075900000
modified: 20161216173541948
modified: 20230321130421587
tags: Concepts
title: TextReference
type: text/vnd.tiddlywiki
@ -27,7 +27,7 @@ Text references can be used in several places:
* As [[indirect parameters|Filter Parameter]] within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`)
* As [[indirect attributes|HTML in WikiText]] of an element or widget (eg, `<$widget attrib={{Title!!description}}/>`)
* As the operand of a shortcut transclusion (eg, `{{MyTiddler!!title}}`)
* As the parameter of a shortcut transclusion (eg, `{{MyTiddler!!title}}`)
* As the `state` attribute of the RevealWidget and the LinkCatcherWidget
<$macrocall $name=".tip" _="""Note the distinction between a text reference such as `foo!!bar` and a transclusion of a text reference such as `{{foo!!bar}}`"""/>

View File

@ -1,11 +1,11 @@
created: 20130825213300000
modified: 20220109101407050
modified: 20240416103247799
tags: Concepts
title: TiddlerFields
type: text/vnd.tiddlywiki
\define lingo-base() $:/language/Docs/Fields/
~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names must be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period).
~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names may contain any combination of characters (prior to [[v5.2.0|Release 5.2.0]], fields were constrained to be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period)).
The standard fields are:

View File

@ -0,0 +1,9 @@
created: 20230319131443509
modified: 20230319132235520
tags: Definitions
title: Legacy
type: text/vnd.tiddlywiki
>Legacy code is old computer source code that is no longer supported on the standard hardware and environments, and is a codebase that is in some respect obsolete or supporting something obsolete. Legacy code may be written in programming languages, use frameworks and external libraries, or use architecture and patterns that are no longer considered modern, increasing the mental burden and ramp-up time for software engineers who work on the codebase.
>
>https://en.wikipedia.org/wiki/Legacy_system

View File

@ -2,8 +2,9 @@ created: 201308300841
modified: 20170127221451610
tags: Definitions
title: TiddlyWeb
type: text/vnd.tiddlywiki
TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web.
TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web using the [[Bags and Recipes]] model.
It was created by a team led by Chris Dent at [[Osmosoft]] under [[BT]] from 2008 to 2012.
@ -16,5 +17,3 @@ Other implementations of the API include:
* [[TiddlyWiki App Engine Server|https://github.com/rsc/tiddly]], a 300-line Go implementation from Russ Cox
* [[TiddlyWiki 5 server module|https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/commands/server.js]], the bare-bones subset of the API implemented in TiddlyWiki version 5 for Node.js
* [[tiddly-wiki-server|https://github.com/nathanielknight/tiddly-wiki-server]], an implementation based on Rust and SQLite
As of early 2017, none is currently as complete as TiddlyWeb itself.

View File

@ -0,0 +1,9 @@
created: 20240309100338678
modified: 20240309135821423
tags: Definitions
title: TiddlyWebAdaptor
type: text/vnd.tiddlywiki
TiddlyWebAdaptor is a component of [[TiddlyWiki on Node.js]]. It provides the means to synchronise changes to tiddlers from the browser to a server, and from the server to the browser. It can be found in the plugin [[$:/plugins/tiddlywiki/tiddlyweb]].
TiddlyWebAdaptor was designed to be compatible both with TiddlyWeb and with TiddlyWiki's own built-in server mechanism. The [[Bags and Recipes]] model is fully supported by [[TiddlyWeb]], but TiddlyWiki's built-in server only supports a simplified model with a single bag and a single recipe.

View File

@ -1,10 +1,10 @@
created: 20190802113703788
modified: 20230501175143648
modified: 20230711082337975
tags: Filters
title: Conditional Operators
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>The conditional filter operators allow for ''if-then-else'' logic to be expressed within filters.
<<.from-version "5.1.20">> The conditional filter operators allow ''if-then-else'' logic to be expressed within filters.
The foundation is the convention that an empty list can be used to represent the Boolean value <<.value false>> and a list with at one (or more) entries to represent <<.value true>>.
@ -25,6 +25,8 @@ The <<.olink else>> operator can be used to apply a defaults for missing values.
<<.operator-example 2 "[[HelloThere]get[custom-field]else[default-value]]">>
! Filter Run Prefixes
''Filter Run Prefixes''
The [[:then|:then Filter Run Prefix]] and [[:else|:else Filter Run Prefix]] filter run prefixes serve a similar purpose as the conditional operators. Refer to their documentation for more information.
The [[:then|Then Filter Run Prefix]] and [[:else|Else Filter Run Prefix]] named filter run prefixes serve a similar purpose as the conditional operators.
Also see: [[Named Filter Run Prefix]]

View File

@ -1,5 +1,6 @@
breadcrumbs: [[Filter Step]]
created: 20140410103123179
modified: 20211217141224284
modified: 20230410114132501
tags: Filters
title: Filter Operators
type: text/vnd.tiddlywiki
@ -18,13 +19,19 @@ type: text/vnd.tiddlywiki
<tr class="doc-table-subheading"><th colspan="5" align="center">$_$</th></tr>
\end
A <<.def "filter operator">> is a predefined keyword attached to an individual [[step|Filter Step]] of a [[filter|Filters]]. It defines the particular action of that step.
A <<.def "filter operator">> is a predefined keyword attached to an individual step of a [[filter|Filters]]. It defines the particular action of that step.
''Important:'' Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input.
''Important:'' In general, each first [[filter step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input.
The following table lists all core operators, the most common ones marked ✓. The `!` column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>. For specifics as to each operator's negated output please refer to its documentation.
Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column. A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation.
''Table legend:''
|tc-table-no-border tc-first-col-min-width|k
|^ ✓|^... |,Used to mark the most common ones |
|^ `!`|^... |,The column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>.<br>For specifics as to each operator's negated output please refer to its documentation |
|^ `C`|^... |,Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column.<br>A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation |
The following table lists all core operators:
<table>
<tr>
@ -49,6 +56,6 @@ Most steps process the [[selection of titles|Title Selection]] that are supplied
<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">>
</table>
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]].
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]].
For the exact rules, see [[Filter Syntax]].

View File

@ -1,5 +1,5 @@
created: 20190206140446821
modified: 20220330133748666
modified: 20230321133008898
tags: Filters
title: Mathematics Operators
type: text/vnd.tiddlywiki
@ -22,7 +22,7 @@ The mathematics operators take three different forms:
** <<.inline-operator-example "=1 =2 =3 =4 +[negate[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[trunc[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[round[]]">>
* ''Binary operators'' apply an operation and operand to each number in the input list (e.g. add, multiply, remainder)
* ''Binary operators'' apply an operation and parameter to each number in the input list (e.g. add, multiply, remainder)
** <<.inline-operator-example "=1 =2 =3 =4 +[add[3]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[multiply[8]]">>
* ''Reducing operators'' apply an operation to all of the numbers in the input list, returning a single result (e.g. sum, product)

View File

@ -1,11 +1,11 @@
caption: add
created: 20190206140446821
modified: 20190611125053329
modified: 20230321130647487
op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with <<.place N>> added to each one
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, add to each the numeric value of the operand
op-purpose: treating each input title as a number, add to each the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: add Operator
type: text/vnd.tiddlywiki

View File

@ -1,6 +1,6 @@
caption: all
created: 20140410103123179
modified: 20211217135719266
modified: 20230321131457669
op-input: ignored, unless the parameter is empty
op-output: the titles that belong to all the specified categories
op-parameter: zero or more categories
@ -9,10 +9,14 @@ tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]] [[Sel
title: all Operator
type: text/vnd.tiddlywiki
The parameter specifies zero or more fundamental categories using the following syntax:
The parameter specifies zero or more fundamental categories using the following [[filter step|Filter Step]] syntax:
<$railroad text="""
[{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }]
\start none
\end none
<-"all"-> ( "[" | "<" | "{" )
[{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }]
( "]" | ">" | "}" )
"""/>
|!Category |!Members |!Sorted |
@ -25,7 +29,7 @@ The parameter specifies zero or more fundamental categories using the following
If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output.
As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is [[soft|Filter Parameter]].
As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is a [[soft parameter|Filter Parameter]].
The <<.olink is>> operator is similar, but its scope is restricted to its input.

View File

@ -1,9 +1,9 @@
caption: append
created: 20151017145358368
modified: 20151108051540981
modified: 20230321131631510
op-input: a list of items
op-neg-output: a list with items appended from the tail of the operand array
op-output: a list with items appended from the head of the operand array
op-neg-output: a list with items appended from the tail of the parameter array
op-output: a list with items appended from the head of the parameter array
op-parameter: the array of items to be appended to the tail of the list
op-parameter-name: list
op-purpose: append a range of items from an array to the list

View File

@ -2,7 +2,7 @@ caption: charcode
created: 20210622214425635
modified: 20210622214425635
op-input: ignored
op-output: a string formed from concatenating the characters specified by the numeric codes given in the operand(s)
op-output: a string formed from concatenating the characters specified by the numeric codes given in the parameter(s)
op-parameter: numeric character code
op-parameter-name: C
op-purpose: generates string characters from their numeric character codes
@ -12,6 +12,6 @@ type: text/vnd.tiddlywiki
<<.from-version "5.2.0">>
This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more operands. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`).
This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more parameters. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`).
<<.operator-examples "charcode">>

View File

@ -4,7 +4,7 @@ tags: [[Filter Operators]] [[Mathematics Operators]] [[String Operators]] [[Nega
title: compare Operator
type: text/vnd.tiddlywiki
caption: compare
op-purpose: filter the input by comparing each item against the operand
op-purpose: filter the input by comparing each item against the parameter
op-input: a [[selection of titles|Title Selection]]
op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details
op-parameter: the value to compare
@ -16,7 +16,7 @@ op-neg-output: those input titles <<.em not>> matching the specified comparison
The <<.op compare>> operator uses an extended syntax to specify all the options:
```
[compare:<type>:<mode>[<operand>]]
[compare:<type>:<mode>[<parameter>]]
```
The ''type'' can be:

View File

@ -4,7 +4,7 @@ modified: 20201118192136472
op-input: a list of items
op-output: the input list with the titles specified in the parameter toggled in a cyclical manner
op-parameter: the <<.op cycle>> operator accepts 1 or 2 parameters, see below for details
op-purpose: toggle in the input, the titles specified in the first operand in a cyclical manner
op-purpose: toggle the titles specified in the first parameter in a cyclical manner
tags: [[Filter Operators]] [[Listops Operators]] [[Order Operators]]
title: cycle Operator
type: text/vnd.tiddlywiki

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with each one divided by <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, divide them by the numeric value of the operand
op-purpose: treating each input title as a number, divide it by the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: divide Operator
type: text/vnd.tiddlywiki

View File

@ -7,14 +7,14 @@ op-neg-output: those input titles that are <<.em not>> listed in <<.place L>>
op-output: the titles stored as a [[title list|Title List]] at <<.place L>>
op-parameter: a [[title list|Title List]]
op-parameter-name: L
op-purpose: select titles from the operand interpreted as a [[title list|Title List]]
op-purpose: select titles from the parameter interpreted as a [[title list|Title List]]
op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
op-suffix-name: D
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]]
title: enlist Operator
type: text/vnd.tiddlywiki
<<.tip """Literal filter operands cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>>
<<.tip """Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>>
```
<$set name="myList" value="first [[second with a space]] third">

View File

@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki
<<.from-version "5.1.23">>
<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its operand as a title list">>
<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its parameter as a title list">>
```
<$vars days={{{ [[Days of the Week]get[list]] }}}>

View File

@ -1,5 +1,5 @@
created: 20151017151508135
modified: 20151108051743531
modified: 20230321130446467
tags: [[Operator Examples]] [[prepend Operator]]
title: prepend Operator (Examples)
type: text/vnd.tiddlywiki
@ -10,6 +10,6 @@ The operator may be used to prepend a number of items to the list.
<<.operator-example 1 "[list[Days of the Week]prepend[Yesterday Today Tomorrow]]">>
The operand may list only items without spaces -- to include items with spaces, use a reference to an array e.g. prepend the last three short days of the week to the list
The parameter may list only items without spaces -- to include items with spaces, use a reference to an array, e.g. prepend the last three short days of the week to the list
<<.operator-example 2 "[list[Days of the Week]!prepend:3{Days of the Week!!short}]">>

View File

@ -0,0 +1,9 @@
created: 20240308122813807
modified: 20240308122916812
tags: [[Operator Examples]] [[sha256 Operator]]
title: sha256 Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[test]sha256[]]">>
<<.operator-example 2 "[[test]sha256[64]]">>

View File

@ -9,7 +9,7 @@ type: text/vnd.tiddlywiki
''<$text text=<<__name__>>/>'': <code><$text text={{{ [<__name__>getvariable[]] }}}/></code>
\end
Literal filter operands can be used, but such cases are better rewritten without using <<.op subfilter>>:
Literal filter parameters can be used, but such cases are better rewritten without using <<.op subfilter>>:
<<.operator-example 1 "[subfilter[one two three]addsuffix[!]]" "same as `one two three +[addsuffix[!]]`">>
The <<.op subfilter>> operator can be used to dynamically define parts of a [[filter run|Filter Run]]. This is useful for sharing a common pieces of a filter across multiple filters.

View File

@ -1,23 +1,23 @@
caption: field
created: 20140410103123179
modified: 20150203184718000
modified: 20230316111901766
op-input: a [[selection of titles|Title Selection]]
op-neg-output: those input tiddlers in which field <<.place F>> does <<.em not>> have the value <<.place S>>
op-output: those input tiddlers in which field <<.place F>> has the value <<.place S>>
op-parameter: a possible value of field <<.place F>>
op-parameter-name: S
op-purpose: filter the input by field
op-suffix: the name of a [[field|TiddlerFields]]
op-suffix-name: F
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]]
title: field Operator
type: text/vnd.tiddlywiki
caption: field
op-purpose: filter the input by field
op-input: a [[selection of titles|Title Selection]]
op-suffix: the name of a [[field|TiddlerFields]]
op-suffix-name: F
op-parameter: a possible value of field <<.place F>>
op-parameter-name: S
op-output: those input tiddlers in which field <<.place F>> has the value <<.place S>>
op-neg-output: those input tiddlers in which field <<.place F>> does <<.em not>> have the value <<.place S>>
If <<.place S>> is empty, <<.op field>> will match both of the following:
* tiddlers that don't contain field <<.place F>>
* tiddlers in which field <<.place F>> exists but has an empty value
The syntax of a [[filter step|Filter Step]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.op field>> operator. See the <<.operator-examples "field" "examples">>.
The syntax of a [[filter step|Filter Step]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.op field>> operator.
<<.operator-examples "field">>

View File

@ -1,6 +1,6 @@
caption: format
created: 20201020100834443
modified: 20220611104737314
modified: 20230321132245053
op-input: a [[selection of titles|Title Selection]]
op-output: input strings formatted according to the specified suffix <<.place B>>
op-parameter: optional format string for the formats
@ -16,11 +16,11 @@ type: text/vnd.tiddlywiki
The suffix <<.place B>> is one of the following supported string formats:
|!Format |!Description |
|^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "YYYY MM DD 0hh:0mm") |
|^`json` |<<.from-version "5.2.4">> The input string is interpreted as JSON and displayed with standard formatting. The optional operator operand specifies the number of spaces to use for indenting, or a string to use for indenting. Nothing is returned if the input string is not valid JSON |
|^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored |
|^`timestamp` |<<.from-version "5.3.0">> The input string is interpreted as number of milliseconds since the [[ECMAScript epoch|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps]], 1 January 1970, and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "[UTC]YYYY0MM0DD0hh0mm0ss0XXX") |
|Format |Description |h
|^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional parameter <<.place C>>. (Defaults to "YYYY MM DD 0hh:0mm") |
|^`json` |<<.from-version "5.2.4">> The input string is interpreted as JSON and displayed with standard formatting. The optional parameter <<.place C>> specifies the number of spaces to use for indenting, or a string to use for indenting. Nothing is returned if the input string is not valid JSON |
|^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters <<.place C>> are ignored |
|^`timestamp` |<<.from-version "5.3.0">> The input string is interpreted as number of milliseconds since the [[ECMAScript epoch|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps]], 1 January 1970, and displayed according to the DateFormat specified in the optional operator parameter. (Defaults to "[UTC]YYYY0MM0DD0hh0mm0ss0XXX") |
|^`titlelist` |<<.from-version "5.2.0">> The input string wrapped in double square brackets if it contains a space. Appropriate for use in a [[title list|Title List]]. |
Invalid input strings are dropped by the <<.op format>> operator.

View File

@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the
The following examples assume that this JSON data is contained in a variable called `jsondata`.
The <<.op jsonextract>> operator uses multiple operands to specify the indexes of the property to retrieve. Values are returned as literal JSON strings:
The <<.op jsonextract>> operator uses multiple parameters to specify the indexes of the property to retrieve. Values are returned as literal JSON strings:
```
[<jsondata>jsonextract[a]] --> "one"
@ -67,7 +67,7 @@ Indexes can be dynamically composed from variables and transclusions:
[<jsondata>jsonextract<variable>,{!!field},[0]]
```
A subtlety is that the special case of a single blank operand is used to identify the root object. Thus:
A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus:
```
[<jsondata>jsonextract[]] --> {"a":"one","b":"","c":"three","d":{"e":"four","f":["five","six",true,false,null],"g":{"x":"max","y":"may","z":"maize"}}}

View File

@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the
The following examples assume that this JSON data is contained in a variable called `jsondata`.
The <<.op jsonget>> operator uses multiple operands to specify the indexes of the property to retrieve:
The <<.op jsonget>> operator uses multiple parameters to specify the indexes of the property to retrieve:
```
[<jsondata>jsonget[a]] --> "one"
@ -94,7 +94,7 @@ If the object or array contains nested child objects or arrays then the values a
[<jsondata>jsonget[d]] --> "four","five","six","true","false","null","max","may","maize"
```
A subtlety is that the special case of a single blank operand is used to identify the root object. Thus:
A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus:
```
[<jsondata>jsonindexes[]] --> "a", "b", "c", "d"

View File

@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the
The following examples assume that this JSON data is contained in a variable called `jsondata`.
The <<.op jsonindexes>> operator uses multiple operands to specify the indexes of the property to retrieve:
The <<.op jsonindexes>> operator uses multiple parameters to specify the indexes of the property to retrieve:
```
[<jsondata>jsonindexes[d],[f]] --> "0", "1", "2", "3", "4"
@ -58,7 +58,7 @@ Indexes can be dynamically composed from variables and transclusions:
Retrieving the indexes of JSON properties that are not objects or arrays will return nothing.
A subtlety is that the special case of a single blank operand is used to identify the root object. Thus:
A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus:
```
[<jsondata>jsonindexes[]] --> "a", "b", "c", "d"

View File

@ -52,7 +52,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the
The following examples assume that this JSON data is contained in a variable called `jsondata`.
The <<.op jsontype>> operator uses multiple operands to specify the indexes of the property whose type is to be retrieved:
The <<.op jsontype>> operator uses multiple parameters to specify the indexes of the property whose type is to be retrieved:
```
[<jsondata>jsontype[a]] --> "string"
@ -75,7 +75,7 @@ Indexes can be dynamically composed from variables and transclusions:
[<jsondata>jsontype<variable>,{!!field},[0]]
```
A subtlety is that the special case of a single blank operand is used to identify the root object. Thus:
A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus:
```
[<jsondata>jsontype[]] --> "object"

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the logarithm of each input title as numbers, with base <<.place N>> if specified otherwise base `e`
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, return its logarithm with base equal to the numeric value of the operand if specified, otherwise base `e`
op-purpose: treating each input title as a number, return its logarithm with base equal to the numeric value of the parameter if specified, otherwise base `e`
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: log Operator
type: text/vnd.tiddlywiki

View File

@ -1,11 +1,11 @@
caption: match
created: 20190731080209404
modified: 20190731081047732
modified: 20230711082432865
op-input: a [[selection of titles|Title Selection]]
op-neg-output: each item in the input list that does not match the operand string
op-output: each item in the input list that matches the operand string (potentially including duplicates)
op-neg-output: each item in the input list that does not match the parameter string
op-output: each item in the input list that matches the parameter string (potentially including duplicates)
op-parameter: the string to be matched
op-purpose: returns each item in the list that matches the operand string
op-purpose: returns each item in the list that matches the parameter string
op-suffix: the <<.op match>> operator uses a rich suffix, see below for details
tags: [[Filter Operators]]
title: match Operator
@ -16,11 +16,10 @@ type: text/vnd.tiddlywiki
The <<.op match>> operator uses an extended syntax that permits multiple flags to be passed:
```
[match:<flag list>[<operand>]]
[match:<flag list>[<parameter>]]
```
* ''flag list'': a comma delimited list of flags
* ''operand'': filter operand
The available flags are:

View File

@ -1,11 +1,11 @@
caption: max
created: 20190611130631390
modified: 20190611131047026
modified: 20230321133057297
op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, with any that are less than <<.place N>> being replaced by <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, take the maximum of its value and the numeric value of the operand
op-purpose: treating each input title as a number, take the maximum of its value and the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: max Operator
type: text/vnd.tiddlywiki

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, with any that are greater than <<.place N>> being replaced by <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, take the minimum of its value and the numeric value of the operand
op-purpose: treating each input title as a number, take the minimum of its value and the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: min Operator
type: text/vnd.tiddlywiki

View File

@ -2,7 +2,7 @@ caption: modulesproperty
created: 20210919201126246
modified: 20210919201347702
op-input: a [[selection|Title Selection]] of modules
op-output: the value of the module property as specified in the operand
op-output: the value of the module property as specified in the parameter
op-parameter: module property to retrieve
op-purpose: retrieve a module property
tags: [[Filter Operators]] [[Special Operators]]

View File

@ -9,6 +9,6 @@ tags: [[Filter Operators]] [[Special Operators]]
title: modules Operator
type: text/vnd.tiddlywiki
<<.from-version "5.2.0">>The <<.op modules>> filter allows two optional operands. When both are specified, it returns the modules with the module property specified in the first operand which has the value in the second operand.
<<.from-version "5.2.0">>The <<.op modules>> filter allows two optional parameters. When both are specified, it returns the modules with the module property specified in the first parameter which has the value in the second parameter.
<<.operator-examples "modules">>

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with each one multiplied by <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, multiply it by the numeric value of the operand
op-purpose: treating each input title as a number, multiply it by the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: multiply Operator
type: text/vnd.tiddlywiki

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with each one raised to the power of <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, raise it to the power of the numeric value of the operand
op-purpose: treating each input title as a number, raise it to the power of the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: power Operator
type: text/vnd.tiddlywiki

View File

@ -1,27 +1,26 @@
caption: prefix
created: 20140410103123179
modified: 20220218023400000
modified: 20230711082821266
op-input: a [[selection of titles|Title Selection]]
op-neg-output: those input tiddlers that do <<.em not>> start with <<.place S>>
op-output: those input titles that start with <<.place S>>
op-parameter: a string of characters
op-parameter-name: S
op-purpose: filter the input titles by how they start
op-suffix: the <<.op prefix>> operator uses a rich suffix, see below for details
tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]]
title: prefix Operator
type: text/vnd.tiddlywiki
caption: prefix
op-purpose: filter the input titles by how they start
op-input: a [[selection of titles|Title Selection]]
op-parameter: a string of characters
op-parameter-name: S
op-output: those input titles that start with <<.place S>>
op-neg-output: those input tiddlers that do <<.em not>> start with <<.place S>>
op-suffix: the <<.op prefix>> operator uses a rich suffix, see below for details
<<.from-version "5.2.2">>
The <<.op prefix>> operator uses an extended syntax that permits multiple flags to be passed:
```
[prefix:<flag list>[<operand>]]
[prefix:<flag list>[<parameter>]
```
* ''flag list'': a comma delimited list of flags
* ''operand'': filter operand
The available flags are:

View File

@ -2,8 +2,8 @@ caption: prepend
created: 20151017145439292
modified: 20151108051701587
op-input: a list of items
op-neg-output: a list with items prepended from the tail of the operand array
op-output: a list with items prepended from the head of the operand array
op-neg-output: a list with items prepended from the tail of the parameter array
op-output: a list with items prepended from the head of the parameter array
op-parameter: the array of items to be prepended to the head of the list
op-parameter-name: list
op-purpose: prepend a range of items from an array to the list

View File

@ -1,15 +1,15 @@
caption: range
created: 20171221184734665
modified: 20210907170339891
modified: 20230321133838310
op-input: ignored
op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` in reverse order
op-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>`
op-parameter: a range specification, like `[1],[5]`
op-parameter-name: N
op-purpose: generate a range of numbers
tags: [[Filter Operators]] [[Negatable Operators]] [[Selection Constructors]]
title: range Operator
type: text/vnd.tiddlywiki
caption: range
op-purpose: generate a range of numbers
op-input: ignored
op-parameter: a range specification, like `[1],[5]`
op-parameter-name: N
op-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>`
op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` in reverse order
\define range_example(range)
```
@ -21,7 +21,7 @@ op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end
The `range` operator produces a list of numbers counting up or down. It is useful for counting and numbering.
<<.from-version "5.2.0">> The range operator has been updated to use multiple operands to specify its parameters. Prior to this version, the range operator only had one operand, with the three parts delimited by `,`, `;` or `:`.
<<.from-version "5.2.0">> The range operator has been updated to use multiple parameters. Prior to this version, the range operator only had one parameter, with the three parts delimited by `,`, `;` or `:`.
```
[range[<begin>]]
@ -29,7 +29,7 @@ The `range` operator produces a list of numbers counting up or down. It is usef
[range[<begin>],[<end>],[<step>]]
```
The behaviour depends on the number of operands:
The behaviour depends on the number of parameters:
|Parameter |Output |h
|`<end>` |Whole numbers up to `<end>` |
@ -47,7 +47,7 @@ Each part must be a number, and works as follows:
** Cannot be zero.
** We always count from `<begin>` toward `<end>`, whether `<step>` is positive or negative.
The number of decimal points in the output is fixed, and based on the operand with the //most// decimal points.
The number of decimal points in the output is fixed, and based on the parameter with the //most// decimal points.
To prevent the browser from freezing, `range` is currently limited to 10,000 values.

View File

@ -1,6 +1,6 @@
caption: reduce
created: 20201004154131193
modified: 20210522162536854
modified: 20230321133918020
op-input: a [[selection of titles|Title Selection]] passed as input to the filter
op-output: the final result of running the subfilter <<.place S>>
op-parameter: a [[filter expression|Filter Expression]]. Optional second parameter for initial value for accumulator
@ -25,7 +25,7 @@ The following variables are available within the subfilter:
If the <<.op reduce>> operator receives no input, its output will be empty. The [[else Operator]] can be useful in such cases.
<<.tip "Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">>
<<.tip "Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable:">>
```
<$set name="sum-input" value="[add<accumulator>]">

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with each replaced by the remainder when dividing it by <<.place N>>
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, return the remainder when divided by the numeric value of the operand
op-purpose: treating each input title as a number, return the remainder when divided by the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: remainder Operator
type: text/vnd.tiddlywiki

View File

@ -2,12 +2,12 @@ caption: remove
created: 20151017144531676
modified: 20170125200005000
op-input: a list of items
op-neg-output: items removed from current list that appear at the tail of the operand array
op-output: items removed from current list that appear at the head of the operand array
op-neg-output: items removed from current list that appear at the tail of the parameter array
op-output: items removed from current list that appear at the head of the parameter array
op-parameter: an array of items to remove
op-parameter-name: array
op-prefix: causes N items from the end of the array to be removed
op-purpose: remove a list of titles specified in the operand from the input
op-purpose: remove a list of titles specified in the parameter from the input
op-suffix: an integer N, defaulting to all
tags: [[Filter Operators]] [[Order Operators]] [[Listops Operators]]
title: remove Operator

View File

@ -1,15 +1,15 @@
caption: removeprefix
created: 20140410103123179
modified: 20220218023400000
modified: 20230711082842515
op-input: a [[selection of titles|Title Selection]]
op-output: those input titles that start with <<.place S>>, but with those characters discarded
op-parameter: a string of characters
op-parameter-name: S
op-purpose: filter the input titles by how they start, deleting that prefix
op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for details
tags: [[Filter Operators]] [[String Operators]]
title: removeprefix Operator
type: text/vnd.tiddlywiki
caption: removeprefix
op-purpose: filter the input titles by how they start, deleting that prefix
op-input: a [[selection of titles|Title Selection]]
op-parameter: a string of characters
op-parameter-name: S
op-output: those input titles that start with <<.place S>>, but with those characters discarded
op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for details
<<.tip " This filters out input titles that do not start with S. For removing S without filtering out input titles that don't start with S, see [[trim|trim Operator]].">>
@ -18,11 +18,10 @@ op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for d
The <<.op removeprefix>> operator uses an extended syntax that permits multiple flags to be passed:
```
[removeprefix:<flag list>[<operand>]]
[removeprefix:<flag list>[<parameter>]]
```
* ''flag list'': a comma delimited list of flags
* ''operand'': filter operand
The available flags are:

View File

@ -1,15 +1,15 @@
caption: removesuffix
created: 20140828133830424
modified: 20220218023400000
modified: 20230711082859816
op-input: a [[selection of titles|Title Selection]]
op-output: those input titles that end with <<.place S>>, but with those characters discarded
op-parameter: a string of characters
op-parameter-name: S
op-purpose: filter the input titles by how they end, deleting that suffix
op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for details
tags: [[Filter Operators]] [[String Operators]]
title: removesuffix Operator
type: text/vnd.tiddlywiki
caption: removesuffix
op-purpose: filter the input titles by how they end, deleting that suffix
op-input: a [[selection of titles|Title Selection]]
op-parameter: a string of characters
op-parameter-name: S
op-output: those input titles that end with <<.place S>>, but with those characters discarded
op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for details
<<.tip " This filters out input titles that do not end with S. For removing S without filtering out input titles that don't end with S, see [[trim|trim Operator]].">>
@ -18,11 +18,10 @@ op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for d
The <<.op removesuffix>> operator uses an extended syntax that permits multiple flags to be passed:
```
[removesuffix:<flag list>[<operand>]]
[removesuffix:<flag list>[<parameter>]]
```
* ''flag list'': a comma delimited list of flags
* ''operand'': filter operand
The available flags are:

View File

@ -1,6 +1,6 @@
caption: search
created: 20140410103123179
modified: 20211129120739275
modified: 20230711084359603
op-input: a [[selection of titles|Title Selection]]
op-neg-output: those input tiddlers in which <<.em not>> all of the search terms can be found
op-output: those input tiddlers in which <<.em all>> of the search terms can be found in the value of field <<.place F>>
@ -16,7 +16,7 @@ type: text/vnd.tiddlywiki
The <<.op search>> operator uses an extended syntax that permits multiple fields and flags to be passed:
```
[search:<field list>:<flag list>[<operand>]]
[search:<field list>:<flag list>[<parameter>]]
```
* ''field list'': a comma delimited list of field names to restrict the search
@ -24,7 +24,7 @@ The <<.op search>> operator uses an extended syntax that permits multiple fields
** an asterisk `*` instead of the field list causes the search to be performed across all fields available on each tiddler
** preceding the list with a minus sign `-` reverses the order so that the search is performed on all fields except the listed fields
* ''flag list'': a comma delimited list of flags (defaults to `words` if blank)
* ''operand'': filter operand
* ''parameter'': filter parameter
This example searches the fields <<.field title>> and <<.field caption>> for a case-sensitive match for the literal string <<.op-word "The first">>:

View File

@ -5,7 +5,7 @@ op-input: a list of items
op-output: all items sorted by lookup list
op-parameter: a list specifying the order in which to sort the current list
op-parameter-name: order
op-purpose: sort the current list in the order of the list referenced in the operand
op-purpose: sort the current list in the order of the list referenced in the parameter
tags: [[Filter Operators]] [[Order Operators]] [[Listops Operators]]
title: sortby Operator
type: text/vnd.tiddlywiki

View File

@ -7,14 +7,14 @@ op-neg-output: those input titles that are <<.em not>> returned from the subfilt
op-output: the [[selection of titles|Title Selection]] returned from the subfilter <<.place S>>
op-parameter: a [[filter expression|Filter Expression]]
op-parameter-name: S
op-purpose: select titles from the operand interpreted as a [[filter expression|Filter Expression]]
op-purpose: select titles from the parameter interpreted as a [[filter expression|Filter Expression]]
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] [[Selection Constructors: Conditional]]
title: subfilter Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.18">> Note that the <<.op subfilter>> operator was introduced in version 5.1.18 and is not available in earlier versions.
<<.tip " Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">>
<<.tip " Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable:">>
```
<$set name="myFilter" value="[tag[one]]">
@ -24,6 +24,6 @@ type: text/vnd.tiddlywiki
<<.tip "Compare with the similar [[filter|filter Operator]] operator which runs a subfilter against each title, returning those titles that return a non-empty list (and discards the results of the subfilter)">>
The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its operand is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]].
The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its parameter is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]].
<<.operator-examples "subfilter">>

View File

@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with <<.place N>> subtracted from each one
op-parameter: a number
op-parameter-name: N
op-purpose: treating each input title as a number, subtract from each the numeric value of the operand
op-purpose: treating each input title as a number, subtract from each the numeric value of the parameter
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: subtract Operator
type: text/vnd.tiddlywiki

View File

@ -1,27 +1,26 @@
caption: suffix
created: 20140828133830424
modified: 20220218023400000
modified: 20230711083049169
op-input: a [[selection of titles|Title Selection]]
op-neg-output: those input tiddlers that do <<.em not>> end with <<.place S>>
op-output: those input titles that end with <<.place S>>
op-parameter: a string of characters
op-parameter-name: S
op-purpose: filter the input titles by how they end
op-suffix: the <<.op suffix>> operator uses a rich suffix, see below for details
tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]]
title: suffix Operator
type: text/vnd.tiddlywiki
caption: suffix
op-purpose: filter the input titles by how they end
op-input: a [[selection of titles|Title Selection]]
op-parameter: a string of characters
op-parameter-name: S
op-output: those input titles that end with <<.place S>>
op-neg-output: those input tiddlers that do <<.em not>> end with <<.place S>>
op-suffix: the <<.op suffix>> operator uses a rich suffix, see below for details
<<.from-version "5.2.2">>
The <<.op suffix>> operator uses an extended syntax that permits multiple flags to be passed:
```
[suffix:<flag list>[<operand>]]
[suffix:<flag list>[<parameter>]]
```
* ''flag list'': a comma delimited list of flags
* ''operand'': filter operand
The available flags are:

View File

@ -0,0 +1,18 @@
created: 20230316150731234
from-version: 5.1.23
modified: 20230711084644541
rp-input: all titles from previous filter runs
rp-output: output titles are appended to the output of previous filter runs without de-duplication.
rp-purpose: union of sets without de-duplication
tags: [[Named Filter Run Prefix]]
title: All Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":all" | - )
[[run|"Filter Run"]]
"""/>
This prefix has an optional [[shortcut syntax|Shortcut Filter Run Prefix]] symbol `=run`

View File

@ -0,0 +1,18 @@
created: 20230318142752854
from-version: 5.1.23
modified: 20230711084712170
op-purpose: accumulation of filter steps
rp-input: the filter output of all previous runs so far
rp-output: output titles replace the output of previous filter runs
tags: [[Named Filter Run Prefix]]
title: And Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":and" | - )
[[run|"Filter Run"]]
"""/>
This prefix has an optional [[shortcut syntax|Shortcut Filter Run Prefix]] symbol `+run`

View File

@ -2,8 +2,8 @@ created: 20211130114857532
filter1: [prefix[ca]then[ca]]
filter2: [suffix[at]then[at]]
filter3: other
modified: 20211204010918504
tags: [[Filter Run Prefix Examples]] [[Filter Syntax]] [[Cascade Filter Run Prefix]]
modified: 20230305125250563
tags: [[Cascade Filter Run Prefix]]
title: Cascade Filter Run Prefix (Examples)
type: text/vnd.tiddlywiki

View File

@ -1,20 +1,25 @@
created: 20211130114043280
modified: 20211130121544118
tags: [[Filter Syntax]] [[Filter Run Prefix]]
from-version: 5.2.1
modified: 20230710073343947
rp-input: the filter output of all previous runs so far
rp-output: the input titles as modified by the filters returned by this filter run
rp-purpose: modify input titles by successively evaluating a list of filters and applying the first result
tags: [[Named Filter Run Prefix]]
title: Cascade Filter Run Prefix
type: text/vnd.tiddlywiki
<<.from-version "5.2.1">>
|''purpose'' |modify input titles by evaluating in turn a list of filters - as returned by the filter expression for this run - for each input title. |
|''input'' |all titles from previous filter runs |
|''output''|the input titles as modified by the filters returned by this filter run |
<$railroad text="""
\start none
\end none
( ":cascade" | - )
[[run|"Filter Run"]]
"""/>
The [[filter expression|Filter Expression]] for this [[filter run|Filter Run]] is evaluated to return a list of filters. Each input title is then evaluated against each of the filters in turn, and the input title is replaced with the first result of the first filter that returns a non-empty list. If none of the filters return a result for an input title, it is replaced with an empty string.
The following variables are available within the filter run:
* <<.var currentTiddler>> - the input title
* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run.
* <<.var ..currentTiddler>> - the value of the variable <<.var currentTiddler>> outside the filter run.
[[Examples|Cascade Filter Run Prefix (Examples)]]
[[Cascade Filter Run Prefix (Examples)]]

View File

@ -0,0 +1,18 @@
created: 20230318142408662
from-version: 5.1.23
modified: 20230322140756821
rp-input: all titles from previous filter runs
rp-output: if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output.<br>if the filter output so far is not an empty list then the run is ignored.
rp-purpose: the filter run is only evaluated if the filter output of all previous runs so far is an empty list
tags: [[Named Filter Run Prefix]]
title: Else Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":else" | - )
[[run|"Filter Run"]]
"""/>
This prefix has a [[Shortcut Filter Run Prefix]] symbol `~run`

View File

@ -0,0 +1,18 @@
created: 20230318142056008
from-version: 5.1.23
modified: 20230322140643066
rp-input: all titles from previous filter runs
rp-output: output titles are removed from the filter's output (if such tiddlers exist)
rp-purpose: if output titles of this filter run are contained in the output of previous filter runs, they are removed, and otherwise ignored
tags: [[Named Filter Run Prefix]]
title: Except Filter Run Prefix
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":except" | - )
[[run|"Filter Run"]]
"""/>
This prefix has a [[Shortcut Filter Run Prefix]] symbol `-run`

View File

@ -1,73 +1,21 @@
created: 20150124182421000
modified: 20211129014550442
modified: 20230710074507466
tags: [[Filter Syntax]]
title: Filter Expression
type: text/vnd.tiddlywiki
A <<.def "filter expression">> is the outermost level of the [[filter syntax|Filter Syntax]]. It consists of [[filter runs|Filter Run]] with optional [[filter run prefixes|Filter Run Prefix]]. Multiple filter runs are separated by [[whitespace|Filter Whitespace]].
<$railroad text="""
[{:
[: [[whitespace|"Filter Whitespace"]] ]
("+"|"~"|:-|"-"|"="|":"[[named-prefix|"Named Filter Run Prefix"]])
{ (
- |
: [[<"prefix">|"Filter Run Prefix"]]
)
[[run|"Filter Run"]]
}]
+ [[whitespace|"Filter Whitespace"]]
}
"""/>
A <<.def "filter expression">> is the outermost level of the [[filter syntax|Filter Syntax]]. It consists of one or more [[runs|Filter Run]].
<<.tip """If the diagram has a single start and end line, as shown above, it means there is more info in the linked level above. The breadcrumbs can be used to navigate""">>
If a run has:
* no prefix, its output titles are [[dominantly appended|Dominant Append]] to the filter's output
* the prefix `=`, output titles are appended to the filter's output without de-duplication. <<.from-version "5.1.20">>
* the prefix `-`, output titles are <<.em removed>> from the filter's output (if such tiddlers exist)
* the prefix `+`, it receives the filter output so far as its input; its output then <<.em "replaces">> all filter output so far and forms the input for the next run
* the prefix `~`, if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output. If the filter output so far is not an empty list then the run is ignored. <<.from-version "5.1.18">>
* named prefixes for filter runs are available. <<.from-version "5.1.23">>
* named prefix `:filter`, it receives the filter output so far as its input. The next run is evaluated for each title of the input, removing every input title for which the output is an empty list. <<.from-version "5.1.23">>
** See [[Filter Filter Run Prefix]].
* named prefix `:intersection` replaces all filter output so far with titles that are present in the output of this run, as well as the output from previous runs. Forms the input for the next run. <<.from-version "5.1.23">>
** See [[Intersection Filter Run Prefix]].
* named prefix `:reduce` replaces all filter output so far with a single item by repeatedly applying a formula to each input title. A typical use is to add up the values in a given field of each input title. <<.from-version "5.1.23">>
** See [[Reduce Filter Run Prefix]].
* named prefix `:sort` sorts all filter output so far by applying this run to each input title and sorting according to that output. <<.from-version "5.2.0">>
** See [[Sort Filter Run Prefix]].
* named prefix `:map` transforms all filter output so far by applying this run to each input title and replacing the input title with the output of this run for that title.
** See [[Map Filter Run Prefix]]. <<.from-version "5.2.0">>
<<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">>
<<.tip "Compare named filter run prefix `:reduce` with [[reduce Operator]] which is used to used to flatten a list of items down to a single item by repeatedly applying a subfilter.">>
<<.tip """Within the filter runs prefixed with `:reduce`, `:sort`, `:map` and `:filter`, the "currentTiddler" variable is set to the title of the tiddler being processed. The value of currentTiddler outside the subfilter is available in the variable "..currentTiddler".<<.from-version "5.2.0">>""" >>
In technical / logical terms:
|!Run |!Equivalent named prefix |!Interpretation |!Output |
|`run` |`:or[run]` |de-duplicated union of sets |... OR run |
|`=run` |`:all[run]` |union of sets without de-duplication |... OR run |
|`+run` |`:and[run]` |accumulation of filter steps |... AND run |
|`-run` |`:except[run]` |difference of sets |... AND NOT run |
|`~run` |`:else[run]` |else |... ELSE run |
||`:intersection`|intersection of sets||
For the difference between `+` and `:intersection`, see [[Intersection Filter Run Prefix (Examples)]].
The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order). But the `+` prefix can change this:
|Prefix|Input|h
|`-`, `~`, `=`, `:intersection` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]|
|`+`, `:filter`, `:reduce`,`:sort`|the filter output of all previous runs so far|
Precisely because of varying inputs, be aware that both prefixes `-` and `+` do not behave inverse to one another!
For example, in both of the following, `$:/baz` will only be removed if it actually exists:
* <$link to="is Operator"> `foo bar $:/baz -[is[system]]`</$link>
* <$link to="prefix Operator">`foo bar $:/baz -[prefix[$:/]]`</$link>
To understand why, consider the input for both final runs with their `-` prefix.
In order to remove `$:/baz` in any case, existing or not, simply use the `+` prefix with [[negated filter operators|Filter Operators]]:
* <$link to="is Operator">`foo bar $:/baz +[!is[system]]`</$link>
* <$link to="prefix Operator">`foo bar $:/baz +[!prefix[$:/]]`</$link>
<<.tip """If the diagram has no start and no end, as used in lower levels, it means that higher level syntax elements have been removed, to increase readability and simplicity. The breadcrumbs can be used to navigate""">>

View File

@ -1,6 +1,6 @@
created: 20211129022707404
modified: 20211204154839890
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Filter Filter Run Prefix]]
modified: 20230305125338118
tags: [[Filter Filter Run Prefix]]
title: Filter Filter Run Prefix (Examples)
type: text/vnd.tiddlywiki

View File

@ -1,27 +1,32 @@
created: 20211129022455873
modified: 20211129022550425
tags: [[Filter Syntax]] [[Filter Run Prefix]]
from-version: 5.1.23
modified: 20230710073334078
rp-input: the filter output of all previous runs so far
rp-output: the input titles for which the filter run is not empty
rp-purpose: remove every input title for which the filter run output is an empty list
tags: [[Named Filter Run Prefix]]
title: Filter Filter Run Prefix
type: text/vnd.tiddlywiki
<<.from-version "5.1.23">>
|''purpose'' |remove every input title for which the filter run output is an empty list |
|''input'' |all titles from previous filter runs |
|''output''|the input titles for which the filter run is not empty |
<$railroad text="""
\start none
\end none
( ":filter" | - )
[[run|"Filter Run"]]
"""/>
It receives the filter output so far as its input. The next run is evaluated for each title of the input, removing every input title for which the output is an empty list.
Note that within the filter run, the "currentTiddler" variable is set to the title of the tiddler being processed. This permits filter runs like `:filter[{!!price}multiply{!!cost}compare:integer:gteq[5]]` to be used for computation. The value of currentTiddler outside the run is available in the variable "..currentTiddler".
Note that within the filter run, the <<.var currentTiddler>> variable is set to the title of the tiddler being processed. This permits filter runs like `:filter[{!!price}multiply{!!cost}compare:integer:gteq[5]]` to be used for computation. The value of currentTiddler outside the run is available in the variable <<.var ..currentTiddler>>.
The following variables are available within the filter run:
* ''currentTiddler'' - the input title
* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run.
* ''index'' - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list).
* ''revIndex'' - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list).
* ''length'' - <<.from-version "5.2.1">> the total length of the input list.
* <<.var currentTiddler>> - the input title
* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run.
* <<.var index>> - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list).
* <<.var revIndex>> - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list).
* <<.var length>> - <<.from-version "5.2.1">> the total length of the input list.
<<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">>
[[Examples|Filter Filter Run Prefix (Examples)]]
[[Filter Filter Run Prefix (Examples)]]

View File

@ -1,15 +1,17 @@
created: 20150220152540000
modified: 20210629215024053
tags: [[Filter Syntax]]
modified: 20230710074423650
tags: [[Filter Step]]
title: Filter Parameter
type: text/vnd.tiddlywiki
<$railroad text="""
( "[" [:{/"anything but ]"/}] "]"
\start none
\end none
( "[" [: <-"hard"-> /"anything but ]"/] "]"
|
"{" [:{/"anything but }"/}] "}"
"{" [: <-"indirect"-> /"anything but }"/] "}"
|
"<" [:{/"anything but >"/}] ">"
"<" [: <-"variable"-> /"anything but >"/] ">"
)
"""/>
@ -24,9 +26,11 @@ The parameter to a [[filter operator|Filter Operators]] can be:
:: The parameter is the text indicated by the [[text reference|TextReference]] whose name appears between the curly brackets, i.e. a [[field|TiddlerFields]] of a specified tiddler, or the value of a property of a specified [[data tiddler|DataTiddlers]].
: <<.def variable>>
:: `<like this>`
:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. Macro parameters are <<.em not>> supported up to and including ~TiddlyWiki v5.1.23.
:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. Macro parameters are <<.em not>> supported up to v5.2.0
::<<.from-version "5.2.0">> Literal macro parameters are supported. For example: `[<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]`.
<<.from-version "5.1.23">> Filter operators support multiple parameters which are separated by a ` , ` character.
---
<<.from-version "5.1.23">> [[Filter Step]]s support multiple parameters which are separated by a `,` character.
For example: `[param1],[param2]` or `<param1>,{param2}`

View File

@ -1,6 +1,6 @@
created: 20201117073343969
modified: 20211129032537195
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]]
modified: 20230315152812472
tags:
title: Filter Run Prefix (Examples)
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,18 @@
created: 20230305130600148
modified: 20230711090913687
tags: [[Filter Expression]]
title: Filter Run Prefix
type: text/vnd.tiddlywiki
There are 2 types of filter run prefixes that are interchangeable. Named prefixes and shortcut prefixes.
<$railroad text="""
\start none
\end none
(
- |
: [[<":named prefix"> /"starting with v5.1.23"/ |"Named Filter Run Prefix"]] |
[[<"shortcut prefix"> /"prior to v5.1.23"/ |"Shortcut Filter Run Prefix"]]
)
[[run|"Filter Run"]]
"""/>

View File

@ -1,11 +1,13 @@
created: 20150124182117000
modified: 20150129133716000
tags: [[Filter Syntax]]
modified: 20230710074357002
tags: [[Filter Expression]]
title: Filter Run
type: text/vnd.tiddlywiki
<$railroad text="""
( "[" { [[step|"Filter Step"]] } "]"
\start none
\end none
( "[" { [[<"Filter Step">|"Filter Step"]] } "]"
|
[:{/"anything but [ ] or whitespace"/}]
|
@ -19,7 +21,6 @@ A <<.def run>> consists of [[steps|Filter Step]], and it outputs a [[selection|T
The steps are processed from left to right. The input to the first step is same as the input to the run. For each subsequent step, the input is the output of the previous step.
{{Selection Constructors}}
The lower three options in the diagram match syntax like `HelloThere`, `"HelloThere"`, `'HelloThere'` and `"Filter Operators"`. They are short for `[title[...]]`.

View File

@ -1,23 +1,35 @@
created: 20150124182127000
modified: 20201103111044922
tags: [[Filter Syntax]]
modified: 20230710074414361
tags: [[Filter Run]]
title: Filter Step
type: text/vnd.tiddlywiki
A <<.def "filter step">> represents a single operation within a <<.def "filter run">>.
In programming terms, it is akin to a function call to which the step's input is passed as a parameter. A step's output is a [[title selection|Title Selection]] that contributes to a [[filter run|Filter Run]] and hence to the entire [[filter expression|Filter Expression]] that contains it.
<$railroad text="""
\start none
\end none
[:"!"]
[: [[operator|"Filter Operators"]] [:":" suffix] ]
[[parameter|"Filter Parameter"]]
( / "if omitted, defaults to: title" /|:
( - | :[[operator|"Filter Operators"]] )
{ [:":" [[suffix|"Filter Operators"]] ] } )
{ [[parameter|"Filter Parameter"]] + "," }
"""/>
A <<.def step>> represents a single operation within a [[filter|Filter Syntax]].
The step's <<.def operator>> is drawn from a list of predefined keywoards which are known as [[filter operators|Filter Operators]].
In programming terms, it is akin to a function call to which [[the step's input|Filter Run]] is passed as an implicit parameter. A step's output is a [[selection|Title Selection]] that contributes to a [[run|Filter Run]] and hence to the entire [[filter expression|Filter Expression]] that contains it.
The step's <<.def operator>> is drawn from a list of [[predefined keywords|Filter Operators]], which can be extended by plugins. Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator. If a step's operator is omitted altogether, it defaults to `title`.
Many steps require an explicit <<.def parameter>>, that further defines what the step is to do.
The <<.def suffix>> is additional text, often the name of a [[field|TiddlerFields]], that extends the meaning of certain operators.
Many steps require an explicit <<.def parameter>> value, also known as an <<.def operand>>, that further defines what the step is to do.
If a step's <<.def operator>> and <<.def suffix>> are //omitted// altogether, it defaults to the [[title|title Operator]] operator.
<<.from-version "5.1.23">> Some steps accept multiple parameters which are separated by a ` , ` character.
<<.from-version "5.1.23">> Some steps accept multiple <<.def parameter>>s which are separated by a `,` character.
Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator.
Filter operators can be extended by plugins.
{{Selection Constructors}}

View File

@ -1,18 +1,24 @@
created: 20140210141217955
modified: 20150124184229000
list: [[Filter Expression]] [[Filter Run]] [[Filter Step]] [[Filter Parameter]] [[Filter Whitespace]]
modified: 20230710074340943
tags: Filters
title: Filter Syntax
type: text/vnd.tiddlywiki
list: [[Filter Expression]] [[Filter Run]] [[Filter Step]] [[Filter Parameter]] [[Filter Whitespace]]
<<.preamble """[[Filters]] follow a grammar that is presented here, using [[railroad diagrams|Railroad Diagrams]], for those who find formal syntax descriptions helpful. However, you can [[learn to write filters|Introduction to filter notation]] without needing to understand this group of tiddlers.""">>
A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets of titles|Title Selection]] of things like tiddlers and fields.
A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets of titles|Title Selection]] of tiddlers and fields.
Filters are [[expressions|Filter Expression]] constructed from smaller building blocks, called [[runs|Filter Run]] and [[steps|Filter Step]], each of which also transforms an input to an output.
Filters are ''expressions'' constructed from smaller building blocks, called ''runs'', which are built using ''steps''. Eeach of which also transforms an input to an output.
A filter starts with an empty output. Its runs are processed from left to right, progressively modifying the output.
Here are details of the various building blocks involved:
The "Filter Syntax" description starts with:
<<list-links "[tag[Filter Syntax]]">>
<$railroad text="""
\start double
\end double
[[<"Filter Expression">|"Filter Expression"]]
"""/>
<<.tip "The railroad boxes as the one above can be used to navigate">>

View File

@ -1,11 +1,13 @@
created: 20150124182304000
modified: 20150125105243000
tags: [[Filter Syntax]]
modified: 20230710074447240
tags: [[Filter Expression]]
title: Filter Whitespace
type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
{( "space" | "tab" | "linefeed" | "return" | "vertical tab" | "formfeed" )}
"""/>
Whitespace characters can appear between each [[run|Filter Run]] of a [[filter expression|Filter Expression]].
Whitespace characters can appear between each run of a [[filter expression|Filter Expression]].

View File

@ -0,0 +1,44 @@
created: 20230316151518640
modified: 20230327130626715
tags: [[Filter Run Prefix]]
title: Interchangeable Filter Run Prefixes
type: text/vnd.tiddlywiki
!! Interchangeable Filter Run Prefixes
In technical / logical terms:
|!Run |!Equivalent named prefix |!Interpretation |!Output |
|`[run]` |`:or[run]` |de-duplicated union of sets |... OR run |
|`+[run]` |`:and[run]` |accumulation of filter steps |... AND run |
|`-[run]` |`:except[run]` |difference of sets |... AND NOT run |
|`~[run]` |`:else[run]` |else |... ELSE run |
|`=[run]` |`:all[run]` |union of sets without de-duplication |... OR run |
The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order).<br>But the `+` prefix can change this:
|Prefix|Input|h
|`-`, `~`, `=`, `:intersection` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]|
|`+`, `:filter`, `:map`, `:reduce`,`:sort` |the filter output of all previous runs so far|
Precisely because of varying inputs, be aware that both prefixes `-` and `+` do not behave inverse to one another!
For example, in both of the following, `$:/baz` will only be removed if it actually exists:
* <$link to="is Operator"> `foo bar $:/baz -[is[system]]`</$link>
* <$link to="prefix Operator">`foo bar $:/baz -[prefix[$:/]]`</$link>
To understand why, consider the input for both final runs with their `-` prefix.
In order to remove `$:/baz` in any case, existing or not, simply use the `+` prefix with [[negated filter operators|Filter Operators]]:
* <$link to="is Operator">`foo bar $:/baz +[!is[system]]`</$link>
* <$link to="prefix Operator">`foo bar $:/baz +[!prefix[$:/]]`</$link>
!! Difference between + and intersection
For the difference between `+` and `:intersection`, see [[Intersection Filter Run Prefix (Examples)]].
!! For Developers
To create a new filter run prefix, create a [[Javascript module|Modules]] with a [[module-type|ModuleType]] of `filterrunprefix`.

View File

@ -1,6 +1,6 @@
created: 20211128212902292
modified: 20211128233320674
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Intersection Filter Run Prefix]]
modified: 20230305125354209
tags: [[Intersection Filter Run Prefix]]
title: Intersection Filter Run Prefix (Examples)
type: text/vnd.tiddlywiki

View File

@ -1,15 +1,20 @@
created: 20211128212902292
modified: 20211128212904721
tags: [[Filter Syntax]] [[Filter Run Prefix]]
from-version: 5.1.23
modified: 20230710073322863
rp-input: all titles from previous filter runs
rp-output: the titles that are present in both the result of this filter run and the output from previous runs
rp-purpose: find the intersection of titles from previous runs with titles in this filter
tags: [[Named Filter Run Prefix]]
title: Intersection Filter Run Prefix
type: text/vnd.tiddlywiki
<<.from-version "5.1.23">>
|''purpose'' |find the intersection of titles from previous runs with titles in this filter run |
|''input'' |all titles from previous filter runs |
|''output''|the titles that are present in both the result of this filter run and the output from previous runs |
<$railroad text="""
\start none
\end none
( ":intersection" | - )
[[run|"Filter Run"]]
"""/>
The filter output from previous runs is set aside. The `:intersection` filter run is started with all tiddler titles as input. Once this latest filter run has completed, the latest output is compared to the set-aside output. A new output is produced that contains only titles that appeared in both the set-aside output and the latest output.
[[Examples|Intersection Filter Run Prefix (Examples)]]
[[Intersection Filter Run Prefix (Examples)]]

View File

@ -1,6 +1,6 @@
created: 20210618134753828
modified: 20220724162340642
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Map Filter Run Prefix]]
modified: 20230305125405422
tags: [[Map Filter Run Prefix]]
title: Map Filter Run Prefix (Examples)
type: text/vnd.tiddlywiki

Some files were not shown because too many files have changed in this diff Show More