mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-08 03:36:38 +00:00
Docs for the inspect-filter macro
This commit is contained in:
parent
d29199ffa8
commit
3a2c81192e
@ -26,12 +26,3 @@ The JSON object contains the following properties:
|
||||
*** `input`: the input titles passed to the operator
|
||||
*** `output`: the output titles resulting from evaluating the operator
|
||||
|
||||
!! Examples
|
||||
|
||||
<$transclude $variable="inspect-filter" filter="1 2 3" inputFilter="[all[tiddlers]]"/>
|
||||
|
||||
<$transclude $variable="inspect-filter" filter="[title<currentTiddler>] [{$:/palette}length[]] [[marker]]" inputFilter="[all[tiddlers]]"/>
|
||||
|
||||
<$transclude $variable="inspect-filter" filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]]" inputFilter="[all[tiddlers]]"/>
|
||||
|
||||
<$transclude $variable="inspect-filter" filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]]" inputFilter="[all[tiddlers]]" orientation="vertical"/>
|
||||
|
21
editions/tw5.com/tiddlers/macros/InspectFilterMacro.tid
Normal file
21
editions/tw5.com/tiddlers/macros/InspectFilterMacro.tid
Normal file
@ -0,0 +1,21 @@
|
||||
caption: inspect-filter
|
||||
created: 20250401094200994
|
||||
modified: 20250401094200994
|
||||
tags: Macros [[Core Macros]]
|
||||
title: inspect-filter Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The <<.def inspect-filter>> [[macro|Macros]] displays a schematic representation of the filter evaluation process, including the input, output and intermediate results of evaluating the specified filter. It is based on the [[inspect operator|inspect Operator]].
|
||||
|
||||
By default the tabs are arranged horizontally above the content. To get vertical tabs, set the <<.param class>> parameter to <<.value tc-vertical>>.
|
||||
|
||||
!! Parameters
|
||||
|
||||
;filter
|
||||
: The [[filter|Filters]] to be inspected
|
||||
;inputFilter
|
||||
: Optionally, a filter defining the input titles for the filter to be inspected, defaulting to `[all[tiddlers]]`
|
||||
;orientation
|
||||
: Optionally, the orientation of the schematic representation, defaulting to `horizontal`. Set to `vertical` to display the tabs vertically. This is useful for narrow windows or when the content is too wide to fit in a horizontal tab layout
|
||||
|
||||
<<.macro-examples "inspect-filter">>
|
@ -0,0 +1,26 @@
|
||||
created: 20250401094200994
|
||||
modified: 20250401094200994
|
||||
tags: [[Macro Examples]]
|
||||
title: inspect-filter Macro (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
<$macrocall $name=".example" n="1" eg="""
|
||||
<$transclude $variable="inspect-filter" filter="[tags[]prefix[$:/]] :sort[length[]] +[first[2]tagging[]]" inputFilter="[all[tiddlers]]"/>
|
||||
"""/>
|
||||
|
||||
<$macrocall $name=".example" n="2" eg="""
|
||||
<$transclude $variable="inspect-filter" filter="1 2 3" inputFilter="[all[tiddlers]]"/>
|
||||
"""/>
|
||||
|
||||
<$macrocall $name=".example" n="3" eg="""
|
||||
<$transclude $variable="inspect-filter" filter="[title<currentTiddler>] [{$:/palette}length[]] [[marker]]" inputFilter="[all[tiddlers]]"/>
|
||||
"""/>
|
||||
|
||||
<$macrocall $name=".example" n="4" eg="""
|
||||
<$transclude $variable="inspect-filter" filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]]" inputFilter="[all[tiddlers]]"/>
|
||||
"""/>
|
||||
|
||||
<$macrocall $name=".example" n="5" eg="""
|
||||
<$transclude $variable="inspect-filter" filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]]" inputFilter="[all[tiddlers]]" orientation="vertical"/>
|
||||
"""/>
|
Loading…
x
Reference in New Issue
Block a user