tiddlywiki 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/boot/boot.js +40 -3
- package/contributing.md +1 -1
- package/core/language/en-GB/ControlPanel.multids +15 -0
- package/core/modules/editor/engines/framed.js +1 -1
- package/core/modules/editor/engines/simple.js +1 -1
- package/core/modules/editor/factory.js +1 -1
- package/core/modules/editor/operations/text/focus-editor.js +17 -0
- package/core/modules/filterrunprefixes/cascade.js +53 -0
- package/core/modules/filterrunprefixes/filter.js +16 -9
- package/core/modules/filterrunprefixes/map.js +16 -9
- package/core/modules/filterrunprefixes/reduce.js +16 -18
- package/core/modules/filterrunprefixes/sort.js +10 -8
- package/core/modules/filters/listops.js +12 -0
- package/core/modules/filters/math.js +29 -0
- package/core/modules/filters/strings.js +11 -9
- package/core/modules/parsers/wikiparser/rules/html.js +4 -2
- package/core/modules/parsers/wikiparser/wikiparser.js +11 -8
- package/core/modules/server/routes/put-tiddler.js +1 -1
- package/core/modules/utils/dom/dragndrop.js +8 -2
- package/core/modules/utils/utils.js +0 -18
- package/core/modules/widgets/action-sendmessage.js +17 -7
- package/core/modules/widgets/action-setmultiplefields.js +86 -0
- package/core/modules/widgets/codeblock.js +7 -1
- package/core/modules/widgets/dropzone.js +2 -1
- package/core/modules/widgets/let.js +96 -0
- package/core/modules/widgets/link.js +2 -1
- package/core/modules/widgets/setmultiplevariables.js +81 -0
- package/core/modules/widgets/vars.js +2 -4
- package/core/modules/widgets/widget.js +20 -16
- package/core/modules/wiki.js +9 -4
- package/core/ui/Components/tag-link.tid +1 -1
- package/core/ui/ControlPanel/Cascades/EditTemplateBody.tid +9 -0
- package/core/ui/ControlPanel/Cascades/StoryTiddler.tid +9 -0
- package/core/ui/ControlPanel/Cascades/TiddlerColour.tid +9 -0
- package/core/ui/ControlPanel/Cascades/TiddlerIcon.tid +9 -0
- package/core/ui/ControlPanel/Cascades/ViewTemplateBody.tid +9 -0
- package/core/ui/ControlPanel/Cascades/ViewTemplateTitle.tid +9 -0
- package/core/ui/ControlPanel/Cascades.tid +9 -0
- package/core/ui/EditTemplate/body/canonical-uri.tid +13 -0
- package/core/ui/EditTemplate/body/default.tid +38 -0
- package/core/ui/EditTemplate/body.tid +1 -51
- package/core/ui/EditTemplate/tags.tid +1 -1
- package/core/ui/EditorToolbar/link-dropdown.tid +1 -1
- package/core/ui/EditorToolbar/preview.tid +4 -4
- package/core/ui/ListTaggedCascade.tid +14 -0
- package/core/ui/PageTemplate/story.tid +1 -1
- package/core/ui/PluginListItemTemplate.tid +13 -3
- package/core/ui/StoryTiddlerTemplate.tid +3 -0
- package/core/ui/TagPickerTagTemplate.tid +3 -3
- package/core/ui/TagTemplate.tid +1 -1
- package/core/ui/TiddlerIcon.tid +8 -0
- package/core/ui/ViewTemplate/body/blank.tid +3 -0
- package/core/ui/ViewTemplate/body/code.tid +3 -0
- package/core/ui/ViewTemplate/body/default.tid +7 -0
- package/core/ui/ViewTemplate/{import.tid → body/import.tid} +1 -2
- package/core/ui/ViewTemplate/body/plugin.tid +10 -0
- package/core/ui/ViewTemplate/body.tid +1 -9
- package/core/ui/ViewTemplate/title/default.tid +6 -0
- package/core/ui/ViewTemplate/title/system.tid +6 -0
- package/core/ui/ViewTemplate/title.tid +4 -17
- package/core/wiki/config/EditTemplateBodyFilters.multids +5 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core/wiki/config/StoryTiddlerTemplateFilters.multids +5 -0
- package/core/wiki/config/TiddlerColourFilters.multids +5 -0
- package/core/wiki/config/TiddlerIconFilters.multids +5 -0
- package/core/wiki/config/ViewTemplateBodyFilters.multids +8 -0
- package/core/wiki/config/ViewTemplateTitleFilters.multids +5 -0
- package/core/wiki/debugstylesheets.tid +9 -0
- package/core/wiki/macros/tag.tid +3 -1
- package/core/wiki/peek-stylesheets.tid +3 -0
- package/core/wiki/tags/EditTemplateBodyFilter.tid +2 -0
- package/core/wiki/tags/StoryTiddlerTemplateFilter.tid +2 -0
- package/core/wiki/tags/TiddlerColourFilter.tid +3 -0
- package/core/wiki/tags/TiddlerIconFilter.tid +3 -0
- package/core/wiki/tags/ViewTemplateBodyFilter.tid +3 -0
- package/core/wiki/tags/ViewTemplateTitleFilter.tid +3 -0
- package/editions/fr-FR/tiddlers/HelloThumbnail - Latest Version.tid +1 -1
- package/editions/prerelease/tiddlers/{Release 5.2.1.tid → Release 5.2.2.tid } +10 -18
- package/editions/test/tiddlers/tests/test-filters.js +4 -0
- package/editions/test/tiddlers/tests/test-html-parser.js +17 -11
- package/editions/test/tiddlers/tests/test-prefixes-filter.js +50 -0
- package/editions/test/tiddlers/tests/test-widget.js +34 -0
- package/editions/test/tiddlers/tests/test-wikitext-parser.js +30 -30
- package/editions/tw5.com/tiddlers/$__StoryList.tid +3 -3
- package/editions/tw5.com/tiddlers/{License.tid → about/License.tid} +0 -0
- package/editions/tw5.com/tiddlers/commands/NamedCommandParameters.tid +2 -2
- package/editions/tw5.com/tiddlers/community/Contributing.tid +2 -2
- package/editions/tw5.com/tiddlers/community/TW Icons by morosanuae.tid +2 -2
- package/editions/tw5.com/tiddlers/community/TiddlyWiki Hangouts.tid +2 -2
- package/editions/tw5.com/tiddlers/community/editions/_Noteself_ by Danielo Rodriguez.tid +2 -2
- package/editions/tw5.com/tiddlers/community/examples/Reveal.js by Devin Weaver.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/Encrypt single tiddler plugin.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/TiddlyMap by Felix Kuppers.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/TW5 Magick.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/_Dynamic Tables_ by Jed Carty.tid +2 -2
- package/editions/tw5.com/tiddlers/community/resources/_TiddlyServer_ by Matt Lauber.tid +5 -3
- package/editions/tw5.com/tiddlers/community/resources/_muritest_ by Simon Huber.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/Cascades.tid +47 -0
- package/editions/tw5.com/tiddlers/concepts/Concepts.tid +5 -3
- package/editions/tw5.com/tiddlers/concepts/Edit Template Body Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Messages.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/ModuleType.tid +2 -2
- package/editions/tw5.com/tiddlers/concepts/Order of Tagged Tiddlers.tid +1 -1
- package/editions/tw5.com/tiddlers/concepts/Railroad Diagrams.tid +2 -1
- package/editions/tw5.com/tiddlers/concepts/Story Tiddler Template Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Story Tiddler Template.tid +13 -0
- package/editions/tw5.com/tiddlers/concepts/TagTiddlers.tid +1 -1
- package/editions/tw5.com/tiddlers/concepts/Tiddler Colour Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/Tiddler Icon Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/concepts/View Template Body Cascade.tid +19 -0
- package/editions/tw5.com/tiddlers/concepts/View Template Title Cascade.tid +16 -0
- package/editions/tw5.com/tiddlers/customising/Alternative page layouts.tid +1 -1
- package/editions/tw5.com/tiddlers/customising/Creating new toolbar buttons.tid +35 -0
- package/editions/tw5.com/tiddlers/customising/Customise TiddlyWiki.tid +3 -3
- package/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid +75 -0
- package/editions/tw5.com/tiddlers/definitions/BT.tid +3 -2
- package/editions/tw5.com/tiddlers/definitions/MathML.tid +2 -2
- package/editions/tw5.com/tiddlers/definitions/Osmosoft.tid +3 -2
- package/editions/tw5.com/tiddlers/definitions/node-webkit.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Alice in Wonderland.tid +4 -3707
- package/editions/tw5.com/tiddlers/demonstrations/Apple.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/Caruso - Ave Maria.tid +1 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Demo Tiddler List with Custom Story Tiddler Template.tid +10 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Styles.tid +31 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/Template.tid +25 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomStoryTiddlerTemplateDemo.tid/TiddlerTemplateFilter.tid +5 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomTiddlerColourCascadeDemo/CustomTiddlerColourCascadeDemo.tid +9 -0
- package/editions/tw5.com/tiddlers/demonstrations/CustomTiddlerIconCascadeDemo/CustomTiddlerIconCascadeDemo.tid +9 -0
- package/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid +5 -16
- package/editions/tw5.com/tiddlers/demonstrations/KeyboardDrivenInput/Demonstration_ keyboard-driven-input Macro.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/KeyboardDrivenInput/kdi-demo-configtid.tid +4 -3
- package/editions/tw5.com/tiddlers/demonstrations/SampleNotification.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerFirst.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerSecond.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleTiddlerThird.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleWizard.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/SampleWizard2.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Contents.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/First.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/FirstTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Second.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThree.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdOne.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdThree.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/ThirdTwo.tid +2 -2
- package/editions/tw5.com/tiddlers/demonstrations/Tagged with TagMacro.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Compose ballad.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Get the Ring.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Go to Mordor.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Kill the Dragon.tid +4 -4
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/Make the beds.tid +3 -3
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/done.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/task.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Days of the Week.tid +5 -4
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Friday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Monday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Saturday.tid +3 -2
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Sunday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Thursday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Tuesday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/Weekdays/Wednesday.tid +2 -1
- package/editions/tw5.com/tiddlers/demonstrations/sampletag1.tid +3 -0
- package/editions/tw5.com/tiddlers/demonstrations/sampletag2.tid +3 -0
- package/editions/tw5.com/tiddlers/features/DateFormat.tid +7 -1
- package/editions/tw5.com/tiddlers/features/LazyLoading.tid +2 -3
- package/editions/tw5.com/tiddlers/features/Scalability.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/acos Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/asin Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/atan Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/atan2 Operator.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/cos Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/deserializers Operator.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/acos Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/asin Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/atan Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/atan2 Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/cos Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/cycle Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/log Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/lookup Operator (Examples).tid +2 -1
- package/editions/tw5.com/tiddlers/filters/examples/match Operator (Examples).tid +1 -1
- package/editions/tw5.com/tiddlers/filters/examples/search-replace Operator (Examples).tid +8 -2
- package/editions/tw5.com/tiddlers/filters/examples/sin Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid +25 -3
- package/editions/tw5.com/tiddlers/filters/examples/tan Operator (Examples).tid +7 -0
- package/editions/tw5.com/tiddlers/filters/examples/zth Operator (Examples).tid +10 -0
- package/editions/tw5.com/tiddlers/filters/list.tid +2 -2
- package/editions/tw5.com/tiddlers/filters/nth.tid +9 -7
- package/editions/tw5.com/tiddlers/filters/range.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/sin Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/storyviews.tid +1 -1
- package/editions/tw5.com/tiddlers/filters/subfilter Operator.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid +46 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid +20 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid +4 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid +30 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid +27 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid +7 -36
- package/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid +36 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid +15 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid +26 -1
- package/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid +9 -1
- package/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid +2 -2
- package/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid +27 -0
- package/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid +38 -0
- package/editions/tw5.com/tiddlers/filters/tan Operator.tid +13 -0
- package/editions/tw5.com/tiddlers/filters/zth Operator.tid +18 -0
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Android.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Node.js.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Online.tid +2 -2
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Safari.tid +2 -1
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - iOS.tid +2 -1
- package/editions/tw5.com/tiddlers/{AllTiddlers.tid → hellothere/AllTiddlers.tid} +0 -0
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/Some of the things you can do with TiddlyWiki.tid +2 -2
- package/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Badge.svg.tid +1 -0
- package/editions/tw5.com/tiddlers/hellothere/badges/ProductHunt-Link.tid +1 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting NewImageType.tid +3 -1
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting ShowEditPreviewPerTiddler.tid +10 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ Typin Refresh Delay.tid +2 -2
- package/editions/tw5.com/tiddlers/howtos/Creating SubStories.tid +21 -33
- package/editions/tw5.com/tiddlers/howtos/Debugging Stylesheets.tid +11 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom story tiddler template.tid +40 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom tiddler colour rule.tid +36 -0
- package/editions/tw5.com/tiddlers/howtos/How to create a custom tiddler icon rule.tid +36 -0
- package/editions/tw5.com/tiddlers/howtos/How to create dynamic editor toolbar buttons.tid +2 -2
- package/editions/tw5.com/tiddlers/howtos/Simple ways to write protect tiddlers.tid +4 -5
- package/editions/tw5.com/tiddlers/howtos/Text preview.tid +6 -2
- package/editions/tw5.com/tiddlers/howtos/Using Stylesheets.tid +8 -4
- package/editions/tw5.com/tiddlers/images/Icon Gallery.tid +14 -0
- package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
- package/editions/tw5.com/tiddlers/languages/LanguageGallery.tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/colour-picker Macro (Example 1).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/image-picker Macro (Example 1).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/image-picker Macro (Example 2).tid +2 -2
- package/editions/tw5.com/tiddlers/macros/examples/unusedtitle Macro (Examples 1).tid +2 -2
- package/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid +2 -2
- package/editions/tw5.com/tiddlers/mechanisms/StateMechanism.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/SampleModal.tid +2 -1
- package/editions/tw5.com/tiddlers/messages/SampleWindowTemplate.tid +10 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid +3 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid +22 -4
- package/editions/tw5.com/tiddlers/nodejs/Environment Variables on Node.js.tid +4 -2
- package/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid +10 -3
- package/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid +6 -5
- package/editions/tw5.com/tiddlers/nodejs/tiddlywiki.info_Files.tid +2 -2
- package/editions/tw5.com/tiddlers/platforms/TiddlyFox Apocalypse.tid +2 -2
- package/editions/tw5.com/tiddlers/platforms/TiddlyWiki in the Sky for TiddlyWeb.tid +3 -8
- package/editions/tw5.com/tiddlers/plugins/Plugin Types.tid +2 -2
- package/editions/tw5.com/tiddlers/reference/Reference.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid +2 -2
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.1.tid +118 -0
- package/editions/tw5.com/tiddlers/releasenotes/ReleaseTemplate.tid +3 -0
- package/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid +2 -2
- package/editions/tw5.com/tiddlers/saving/Example config-tiddlyweb-host for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example package.json for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example tiddlywiki.info for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Example web.config for IIS.txt.meta +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving via WebDAV.tid +31 -1
- package/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +6 -2
- package/editions/tw5.com/tiddlers/{TableOfContents.tid → system/TableOfContents.tid} +0 -0
- package/editions/tw5.com/tiddlers/system/doc-macros.tid +17 -0
- package/editions/tw5.com/tiddlers/system/doc-styles.tid +32 -1
- package/editions/tw5.com/tiddlers/system/operator-macros.tid +12 -5
- package/editions/tw5.com/tiddlers/system/operator-template.tid +8 -8
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Image.tid +2 -2
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 1-2-3.tid +2 -1
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 3-4-5.tid +2 -1
- package/editions/tw5.com/tiddlers/variables/examples/Sample Headings 4-5-6.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 1.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 2.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 3.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Example 4.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget Template.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionCreateTiddlerWidget_Example.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid +52 -2
- package/editions/tw5.com/tiddlers/widgets/ActionSendMessageWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ActionSetMultipleFieldsWidget.tid +31 -0
- package/editions/tw5.com/tiddlers/widgets/ActionWidget Execution Modes.tid +5 -2
- package/editions/tw5.com/tiddlers/widgets/ActionWidgets.tid +4 -4
- package/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/DropzoneWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +8 -19
- package/editions/tw5.com/tiddlers/widgets/EditWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/EventCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/FieldManglerWidget.tid +3 -3
- package/editions/tw5.com/tiddlers/{Keyboard Codes.tid → widgets/Keyboard Codes.tid} +0 -0
- package/editions/tw5.com/tiddlers/widgets/KeyboardWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/LetWidget.tid +57 -0
- package/editions/tw5.com/tiddlers/widgets/LinkCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/ListopsData.tid +1 -0
- package/editions/tw5.com/tiddlers/widgets/MessageCatcherWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/MessageHandlerWidgets.tid +13 -0
- package/editions/tw5.com/tiddlers/widgets/NavigatorWidget.tid +5 -2
- package/editions/tw5.com/tiddlers/widgets/RadioWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/RangeWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +15 -2
- package/editions/tw5.com/tiddlers/widgets/SetMultipleVariablesWidget.tid +33 -0
- package/editions/tw5.com/tiddlers/widgets/The Extended Listops Filters.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/TriggeringWidgets.tid +13 -0
- package/editions/tw5.com/tiddlers/widgets/VarsWidget.tid +7 -5
- package/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid +3 -2
- package/languages/pl-PL/ControlPanel.multids +1 -1
- package/languages/pl-PL/Docs/PaletteColours.multids +1 -1
- package/languages/pl-PL/Import.multids +1 -1
- package/languages/pl-PL/Misc.multids +2 -2
- package/languages/pl-PL/SideBar.multids +1 -1
- package/languages/zh-Hans/ControlPanel.multids +15 -0
- package/languages/zh-Hant/ControlPanel.multids +15 -0
- package/licenses/cla-individual.md +10 -0
- package/package.json +1 -1
- package/plugins/tiddlywiki/codemirror/engine.js +55 -2
- package/readme.md +2 -2
- package/themes/tiddlywiki/vanilla/ThemeTweaks.tid +7 -3
- package/themes/tiddlywiki/vanilla/base.tid +6 -0
- package/themes/tiddlywiki/vanilla/reset.tid +1 -1
- package/core/ui/ViewTemplate/plugin.tid +0 -15
- package/editions/tw5.com/tiddlers/customising/Page and tiddler layout customisation.tid +0 -63
- package/editions/tw5.com/tiddlers/demonstrations/SampleAlert.tid +0 -9
@@ -0,0 +1,15 @@
|
|
1
|
+
caption: acos
|
2
|
+
created: 20211019211936842
|
3
|
+
modified: 20211021222835888
|
4
|
+
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the arccosine (in radians) of the input numbers
|
6
|
+
op-purpose: calculate the arccosine value (in radians) of a list of numbers
|
7
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Trigonometric Operators]] [[Unary Mathematics Operators]]
|
8
|
+
title: acos Operator
|
9
|
+
type: text/vnd.tiddlywiki
|
10
|
+
|
11
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
12
|
+
|
13
|
+
<<.tip " This is the inverse operation of [[cos|cos Operator]]: cos calculate the cosine of an angle (in radian), but acos calculate the angle (in radian) of a cosine.">>
|
14
|
+
|
15
|
+
<<.operator-examples "acos">>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
caption: asin
|
2
|
+
created: 20211019212120548
|
3
|
+
modified: 20211021222841479
|
4
|
+
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the arcsine (in radians) of the input numbers
|
6
|
+
op-purpose: calculate the arcsine value (in radians) of a list of numbers
|
7
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Trigonometric Operators]] [[Unary Mathematics Operators]]
|
8
|
+
title: asin Operator
|
9
|
+
type: text/vnd.tiddlywiki
|
10
|
+
|
11
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
12
|
+
|
13
|
+
<<.tip " This is the inverse operation of [[sin|sin Operator]]: sin calculate the sine of an angle (in radian), but asin calculate the angle (in radian) of a sine.">>
|
14
|
+
|
15
|
+
<<.operator-examples "asin">>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
caption: atan
|
2
|
+
created: 20211019211516128
|
3
|
+
modified: 20211021222847610
|
4
|
+
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the arctangent (in radians) of the input numbers
|
6
|
+
op-purpose: calculate the arctangent value (in radians) of a list of numbers
|
7
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Trigonometric Operators]] [[Unary Mathematics Operators]]
|
8
|
+
title: atan Operator
|
9
|
+
type: text/vnd.tiddlywiki
|
10
|
+
|
11
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
12
|
+
|
13
|
+
<<.operator-examples "atan">>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
caption: atan2
|
2
|
+
created: 20211019222810994
|
3
|
+
modified: 20211021222853123
|
4
|
+
op-input: a [[selection of titles|Title Selection]] = coordinate Y (<<.place Y>>)
|
5
|
+
op-output: the angle in radians (in [ - π , π ] ) between the positive x-axis and the ray from (0,0) to the point (x,y)
|
6
|
+
op-parameter: coordinate X
|
7
|
+
op-parameter-name: X
|
8
|
+
op-purpose: returns the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y), for [<<.place Y>>]atan2[<<.place X>>]
|
9
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] [[Trigonometric Operators]]
|
10
|
+
title: atan2 Operator
|
11
|
+
type: text/vnd.tiddlywiki
|
12
|
+
|
13
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
14
|
+
|
15
|
+
<<.operator-examples "atan2">>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
caption: cos
|
2
|
+
created: 20211019211007324
|
3
|
+
modified: 20211021222900121
|
4
|
+
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the cosine of the input angles (numeric value between -1 and 1)
|
6
|
+
op-purpose: calculate the cosine value of a list of angles (given in radians)
|
7
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Trigonometric Operators]] [[Unary Mathematics Operators]]
|
8
|
+
title: cos Operator
|
9
|
+
type: text/vnd.tiddlywiki
|
10
|
+
|
11
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
12
|
+
|
13
|
+
<<.operator-examples "cos">>
|
@@ -5,7 +5,7 @@ modified: 20210506130322593
|
|
5
5
|
op-input: ignored
|
6
6
|
op-output: the title of each available deserializer
|
7
7
|
op-parameter: none
|
8
|
-
tags: [[Filter Operators]] [[Special Operators]]
|
8
|
+
tags: [[Filter Operators]] [[Special Operators]] [[Selection Constructors]]
|
9
9
|
title: deserializers Operator
|
10
10
|
type: text/vnd.tiddlywiki
|
11
11
|
|
@@ -6,7 +6,7 @@ op-output: the titles stored as a [[title list|Title List]] in each input title
|
|
6
6
|
op-purpose: select titles by interpreting each input title as a [[title list|Title List]]
|
7
7
|
op-suffix: `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
|
8
8
|
op-suffix-name: D
|
9
|
-
tags: [[Filter Operators]] [[String Operators]]
|
9
|
+
tags: [[Filter Operators]] [[String Operators]]
|
10
10
|
title: enlist-input Operator
|
11
11
|
type: text/vnd.tiddlywiki
|
12
12
|
|
@@ -18,4 +18,4 @@ Cycle through a list of values to add as a tag, in reverse order:
|
|
18
18
|
|
19
19
|
<<.using-days-of-week>>
|
20
20
|
<<.operator-example 1 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list}]""">>
|
21
|
-
<<.operator-example
|
21
|
+
<<.operator-example 2 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list},[2]]""">>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
created: 20201107112846692
|
2
|
-
modified:
|
2
|
+
modified: 20211101125225197
|
3
3
|
tags: [[Operator Examples]] [[search-replace Operator]]
|
4
4
|
title: search-replace Operator (Examples)
|
5
5
|
type: text/vnd.tiddlywiki
|
@@ -25,8 +25,14 @@ You can also use regular expression capture groups in the replacement string:
|
|
25
25
|
`\define names() (\w+)\s(\w+)`
|
26
26
|
<<.operator-example 4 """[[John Smith]search-replace::regexp<names>,[$2,$1]]""" >>
|
27
27
|
|
28
|
+
You can reference the portion of the input that matches the regular expression with `$&`:
|
29
|
+
<<.operator-example 5 """[[John Smith]search-replace::regexp[John .*],[His name is $&]]""">>
|
30
|
+
|
31
|
+
<<.operator-example 6 """[[This is an exciting feature]search-replace::regexp[exciting],[amazing and $&]]""">>
|
32
|
+
|
28
33
|
To replace everything but a match using a regular expression and the ''multiline'' (m) flag:
|
29
34
|
`\define myregexp2() ^(?!Unlike).*$`
|
30
|
-
<<.operator-example
|
35
|
+
<<.operator-example 7 """[[HelloThere]get[text]search-replace:gm:regexp<myregexp2>,[]]""">>
|
36
|
+
|
31
37
|
|
32
38
|
{{How to remove stop words}}
|
@@ -1,8 +1,30 @@
|
|
1
1
|
created: 20181031175129475
|
2
|
-
modified:
|
2
|
+
modified: 20211030223407188
|
3
3
|
tags: [[subfilter Operator]] [[Operator Examples]]
|
4
4
|
title: subfilter Operator (Examples)
|
5
5
|
type: text/vnd.tiddlywiki
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
\define recent-mods() [has[modified]!sort[modified]limit[5]]
|
8
|
+
\define display-variable(name)
|
9
|
+
''<$text text=<<__name__>>/>'': <code><$text text={{{ [<__name__>getvariable[]] }}}/></code>
|
10
|
+
\end
|
11
|
+
|
12
|
+
Literal filter operands can be used, but such cases are better rewritten without using <<.op subfilter>>:
|
13
|
+
<<.operator-example 1 "[subfilter[one two three]addsuffix[!]]" "same as `one two three +[addsuffix[!]]`">>
|
14
|
+
|
15
|
+
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.
|
16
|
+
|
17
|
+
For example, this variable:
|
18
|
+
|
19
|
+
* <<display-variable recent-mods>>
|
20
|
+
|
21
|
+
can be used in one filter like this:
|
22
|
+
|
23
|
+
<<.operator-example 2 "[tag[Filter Operators]subfilter<recent-mods>addsuffix[!]]" "same as `[tag[Filter Operators]has[modified]!sort[modified]limit[5]addsuffix[!]]`">>
|
24
|
+
|
25
|
+
and in another similar filter like this:
|
26
|
+
<<.operator-example 3 "[tag[ActionWidgets]subfilter<recent-mods>addprefix[!]]">>
|
27
|
+
|
28
|
+
Variables are not the only way to define dynamic subfilters. [[Text references|TextReference]] can be used to load a subfilter from a tiddler field (see also [[Filter Parameter]]):
|
29
|
+
<<.operator-example 4 "[subfilter{$:/StoryList!!list}limit[5]]">>
|
30
|
+
<<.operator-example 5 "[subfilter{$:/StoryList!!list}subfilter<recent-mods>]">>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
created: 20211029023246203
|
2
|
+
modified: 20211029023559616
|
3
|
+
tags: [[Operator Examples]] [[zth Operator]]
|
4
|
+
title: zth Operator (Examples)
|
5
|
+
type: text/vnd.tiddlywiki
|
6
|
+
|
7
|
+
<<.using-days-of-week>>
|
8
|
+
|
9
|
+
<<.operator-example 1 "[list[Days of the Week]zth[]]">>
|
10
|
+
<<.operator-example 2 "[list[Days of the Week]zth[5]]">>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
created: 20140410103123179
|
2
|
-
modified:
|
2
|
+
modified: 20211115092315020
|
3
3
|
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]]
|
4
4
|
title: list Operator
|
5
5
|
type: text/vnd.tiddlywiki
|
@@ -14,7 +14,7 @@ op-neg-output: those input titles that are <<.em not>> mentioned at <<.place R>>
|
|
14
14
|
|
15
15
|
<<.place R>> can reference either a field or a property. See [[TextReference]] for the syntax.
|
16
16
|
|
17
|
-
* If neither is specified, the <<.field list>> field is used by default. So `[list[T]]` outputs the titles listed in the <<.field list>> of tiddler T.
|
17
|
+
* If neither is specified, the <<.field list>> field is used by default. So `[list[T]]` outputs the titles listed in the <<.field list>> field of tiddler T.
|
18
18
|
* If <<.place R>> consists of <<.em only>> a field or a property, the tiddler part of the reference defaults to the [[current tiddler|Current Tiddler]]. So `[list[!!tags]]` outputs the titles listed in the <<.field tags>> field of the current tiddler.
|
19
19
|
|
20
20
|
<<.operator-examples "list">>
|
@@ -1,15 +1,17 @@
|
|
1
|
-
created: 20150122204111000
|
2
|
-
modified: 20150203192048000
|
3
|
-
tags: [[Filter Operators]] [[Order Operators]]
|
4
|
-
title: nth Operator
|
5
|
-
type: text/vnd.tiddlywiki
|
6
1
|
caption: nth
|
7
|
-
|
2
|
+
created: 20150122204111000
|
3
|
+
modified: 20211029023739450
|
8
4
|
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the <<.place N>>th input title
|
9
6
|
op-parameter: an integer, defaulting to 1
|
10
7
|
op-parameter-name: N
|
11
|
-
op-
|
8
|
+
op-purpose: select the <<.place N>>th input title
|
9
|
+
tags: [[Filter Operators]] [[Order Operators]]
|
10
|
+
title: nth Operator
|
11
|
+
type: text/vnd.tiddlywiki
|
12
12
|
|
13
13
|
<<.place N>> is one-based. In other words, `nth[1]` has the same effect as the <<.olink first>> operator.
|
14
14
|
|
15
|
+
<<.tip "See <<.olink zth>> for an equivalent operator with a 0 based parameter">>
|
16
|
+
|
15
17
|
<<.operator-examples "nth">>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
caption: sin
|
2
|
+
created: 20211019203650938
|
3
|
+
modified: 20211021222816944
|
4
|
+
op-input: a [[selection of titles|Title Selection]]
|
5
|
+
op-output: the sine of the input angles (numeric value between -1 and 1)
|
6
|
+
op-purpose: calculate the sine value of a list of angles (given in radians)
|
7
|
+
tags: [[Filter Operators]] [[Mathematics Operators]] [[Trigonometric Operators]] [[Unary Mathematics Operators]]
|
8
|
+
title: sin Operator
|
9
|
+
type: text/vnd.tiddlywiki
|
10
|
+
|
11
|
+
<<.from-version "5.1.21">> See [[Mathematics Operators]] for an overview.
|
12
|
+
|
13
|
+
<<.operator-examples "sin">>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
caption: subfilter
|
2
2
|
created: 20181031175129475
|
3
|
-
modified:
|
3
|
+
modified: 20211030223407188
|
4
4
|
op-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
|
5
5
|
op-neg-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
|
6
6
|
op-neg-output: those input titles that are <<.em not>> returned from the subfilter <<.place S>>
|
@@ -12,7 +12,7 @@ tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Nega
|
|
12
12
|
title: subfilter Operator
|
13
13
|
type: text/vnd.tiddlywiki
|
14
14
|
|
15
|
-
<<.from-version "5.1.18">> Note that the subfilter operator was introduced in version 5.1.18 and is not available in earlier versions.
|
15
|
+
<<.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.
|
16
16
|
|
17
17
|
<<.tip " Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">>
|
18
18
|
|
@@ -24,4 +24,6 @@ type: text/vnd.tiddlywiki
|
|
24
24
|
|
25
25
|
<<.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)">>
|
26
26
|
|
27
|
+
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]].
|
28
|
+
|
27
29
|
<<.operator-examples "subfilter">>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
created: 20211130114857532
|
2
|
+
filter1: [prefix[ca]then[ca]]
|
3
|
+
filter2: [suffix[at]then[at]]
|
4
|
+
filter3: other
|
5
|
+
modified: 20211204010918504
|
6
|
+
tags: [[Filter Run Prefix Examples]] [[Filter Syntax]] [[Cascade Filter Run Prefix]]
|
7
|
+
title: Cascade Filter Run Prefix (Examples)
|
8
|
+
type: text/vnd.tiddlywiki
|
9
|
+
|
10
|
+
The <<.op ":cascade">> filter run prefix is used by the ~TiddlyWiki core to choose the colour for each tiddler as used in the tag pill generated by the tag macro.
|
11
|
+
|
12
|
+
`:cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]]`
|
13
|
+
|
14
|
+
The filter expression inside the above <<.op :cascade>> filter run returns a list of filters from the text fields of tiddlers tagged <<tag $:/tags/TiddlerColourFilter>> as shown below:
|
15
|
+
|
16
|
+
<ul>
|
17
|
+
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]]">
|
18
|
+
<li><pre><$text text=<<currentTiddler>>/></pre></li>
|
19
|
+
</$list>
|
20
|
+
</ul>
|
21
|
+
|
22
|
+
For each input title, each of these filters is now applied to in turn until the first filter that returns a non-empty list. The first result from this non-empty list replaces that input title and is used as the colour for that tiddler.
|
23
|
+
|
24
|
+
<<.operator-example 1 """[all[shadows+tiddlers]] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] +[!is[blank]limit[10]]""">>
|
25
|
+
|
26
|
+
!! Extended example
|
27
|
+
|
28
|
+
This example illustrates step-by-step how the <<.op :cascade>> filter run works.
|
29
|
+
|
30
|
+
A filter expression whose output returns a list of filters is required. Typically such a filter expression will construct the list of filters by querying some field in a set of tiddlers (likely via tag). To keep this example self-contained, 3 filters are stored in the //filter1//, //filter2// and //filter3// fields of this tiddler. [[Text references|TextReference]] and instances of the [[append operator|append Operator]] are used to combine the fields into a list of filters.
|
31
|
+
|
32
|
+
The filter `[{!!filter1}append{!!filter2}append{!!filter3}]`, generates this list of filters:
|
33
|
+
|
34
|
+
<ul>
|
35
|
+
<$list filter="[{!!filter1}append{!!filter2}append{!!filter3}]">
|
36
|
+
<li><pre><$text text=<<currentTiddler>>/></pre></li>
|
37
|
+
</$list>
|
38
|
+
</ul>
|
39
|
+
|
40
|
+
For this example, `cat can bat bug` will be used as the input titles. Each input title will be evaluated by <<.op :cascade>> against each of the above filters in turn. To help understand what <<.op :cascade>> sees internally, the following table uses the [[Map Filter Run Prefix]] to show the result of each individual filter.
|
41
|
+
|
42
|
+
|^<<.operator-example c1.1 "cat can bat bug :map[prefix[ca]then[ca]]">>|^<<.operator-example c1.2 "cat can bat bug :map[suffix[at]then[at]]">>|^<<.operator-example c1.3 "cat can bat bug :map[[other]]">>|
|
43
|
+
|
44
|
+
Click "Try it" on the above 3 examples. The first non-blank value from each row as read from left to right will be returned when <<.op :cascade>> is used. Click "Try it" below to see the final result:
|
45
|
+
|
46
|
+
<<.operator-example c1.4 "cat can bat bug :cascade[{!!filter1}append{!!filter2}append{!!filter3}]">>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
created: 20211130114043280
|
2
|
+
modified: 20211130121544118
|
3
|
+
tags: [[Filter Syntax]] [[Filter Run Prefix]]
|
4
|
+
title: Cascade Filter Run Prefix
|
5
|
+
type: text/vnd.tiddlywiki
|
6
|
+
|
7
|
+
<<.from-version "5.2.1">>
|
8
|
+
|
9
|
+
|''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. |
|
10
|
+
|''input'' |all titles from previous filter runs |
|
11
|
+
|''output''|the input titles as modified by the filters returned by this filter run |
|
12
|
+
|
13
|
+
The filter expression for this 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.
|
14
|
+
|
15
|
+
The following variables are available within the filter run:
|
16
|
+
|
17
|
+
* <<.var currentTiddler>> - the input title
|
18
|
+
* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run.
|
19
|
+
|
20
|
+
[[Examples|Cascade Filter Run Prefix (Examples)]]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
created: 20150124182421000
|
2
|
-
modified:
|
2
|
+
modified: 20211129014550442
|
3
3
|
tags: [[Filter Syntax]]
|
4
4
|
title: Filter Expression
|
5
5
|
type: text/vnd.tiddlywiki
|
@@ -23,9 +23,11 @@ If a run has:
|
|
23
23
|
* 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">>
|
24
24
|
* named prefixes for filter runs are available. <<.from-version "5.1.23">>
|
25
25
|
* 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">>
|
26
|
+
** See [[Filter Filter Run Prefix]].
|
26
27
|
* 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">>
|
28
|
+
** See [[Intersection Filter Run Prefix]].
|
27
29
|
* 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">>
|
28
|
-
** [[
|
30
|
+
** See [[Reduce Filter Run Prefix]].
|
29
31
|
* 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">>
|
30
32
|
** See [[Sort Filter Run Prefix]].
|
31
33
|
* 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.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
created: 20211129022707404
|
2
|
+
modified: 20211204154839890
|
3
|
+
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Filter Filter Run Prefix]]
|
4
|
+
title: Filter Filter Run Prefix (Examples)
|
5
|
+
type: text/vnd.tiddlywiki
|
6
|
+
|
7
|
+
<<.operator-example 1 "[tag[HelloThere]] :filter[get[text]length[]compare:integer:gteq[1000]]">>
|
8
|
+
<<.operator-example 2 "[tag[HelloThere]] :filter[get[text]length[]compare:integer:lteq[2000]]">>
|
9
|
+
<<.operator-example 3 "[tag[HelloThere]] :filter[get[text]length[]compare:integer:gteq[1000]] :filter[get[text]length[]compare:integer:lteq[2000]]">>
|
10
|
+
<<.operator-example 4 "[tag[Features]] :filter[links[]!is[shadow]is[missing]]">>
|
11
|
+
|
12
|
+
<<.operator-example 5 "A B C D E F :filter[<index>remainder[2]compare:integer:eq[0]]" "Return every other element of the input list">>
|
13
|
+
|
14
|
+
<<.operator-example 6 "[tag[shopping]] :filter[{!!quantity}compare:integer:gt[4]] :map[addprefix[ ]addprefix{!!quantity}]">>
|
15
|
+
<<.operator-example 7 "[tag[shopping]] :filter[{!!quantity}compare:integer:lteq[4]] :map[addprefix[ ]addprefix{!!quantity}]">>
|
16
|
+
|
17
|
+
!! Comparison between `:filter` and `:and`/`+` filter run prefixes
|
18
|
+
|
19
|
+
The functionality of the <<.op :filter>> filter run prefix has some overlap with the <<.op :and>> prefix (alias <<.op +>>). Notice the filter expressions above all have the following two properties:
|
20
|
+
|
21
|
+
# The start of the filter expression transforms the input titles (i.e. `get[text]length[]`, `links[]`, `<index>remainder[2]`, `{!!quantity}`.
|
22
|
+
# The end of the filter expression only sends input items to the output if they meet some condition (i.e. `compare`, `is`).
|
23
|
+
|
24
|
+
The purpose of the <<.op :filter>> prefix is to return the original input titles despite property #1 causing those input titles to be transformed. That way, the "meet some condition" check can be performed on something other than the original input. If some filter expression does not require property #1, then the <<.op :and>> prefix can be used instead.
|
25
|
+
|
26
|
+
| <<.op :filter>> | <<.op :and>> |
|
27
|
+
|^<<.operator-example c1.1 "[tag[HelloThere]] :filter[get[text]length[]compare:integer:gteq[1000]]">>|^<<.operator-example c1.2 "[tag[HelloThere]] :and[get[text]length[]compare:integer:gteq[1000]]">>|
|
28
|
+
|^<<.operator-example c2.1 "[tag[Features]] :filter[links[]!is[shadow]is[missing]]">>|^<<.operator-example c2.2 "[tag[Features]] :and[links[]!is[shadow]is[missing]]">>|
|
29
|
+
|!results are the same|<|
|
30
|
+
|^<<.operator-example c3.1 "cat can bat bug :filter[suffix[at]minlength[3]]">>|^<<.operator-example c3.2 "cat can bat bug :and[suffix[at]minlength[3]]">>|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
created: 20211129022455873
|
2
|
+
modified: 20211129022550425
|
3
|
+
tags: [[Filter Syntax]] [[Filter Run Prefix]]
|
4
|
+
title: Filter Filter Run Prefix
|
5
|
+
type: text/vnd.tiddlywiki
|
6
|
+
|
7
|
+
<<.from-version "5.1.23">>
|
8
|
+
|
9
|
+
|''purpose'' |remove every input title for which the filter run output is an empty list |
|
10
|
+
|''input'' |all titles from previous filter runs |
|
11
|
+
|''output''|the input titles for which the filter run is not empty |
|
12
|
+
|
13
|
+
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.
|
14
|
+
|
15
|
+
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".
|
16
|
+
|
17
|
+
The following variables are available within the filter run:
|
18
|
+
|
19
|
+
* ''currentTiddler'' - the input title
|
20
|
+
* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run.
|
21
|
+
* ''index'' - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list).
|
22
|
+
* ''revIndex'' - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list).
|
23
|
+
* ''length'' - <<.from-version "5.2.1">> the total length of the input list.
|
24
|
+
|
25
|
+
<<.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">>
|
26
|
+
|
27
|
+
[[Examples|Filter Filter Run Prefix (Examples)]]
|
@@ -1,50 +1,21 @@
|
|
1
1
|
created: 20201117073343969
|
2
|
-
modified:
|
2
|
+
modified: 20211129032537195
|
3
3
|
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]]
|
4
4
|
title: Filter Run Prefix (Examples)
|
5
5
|
type: text/vnd.tiddlywiki
|
6
6
|
|
7
|
-
!!
|
7
|
+
!! `:filter` examples
|
8
8
|
|
9
|
-
|
9
|
+
See [[Filter Filter Run Prefix (Examples)]]
|
10
10
|
|
11
|
-
|
11
|
+
!! `:intersection` examples
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
For cases like this, the `:intersection` prefix is what you need. It takes the filter output so far, //sets it aside//, and starts the next filter run with all tiddler titles as input. Then once the latest filter run has completed, it takes the latest output, compares it to the set-aside output, and produces a new output that contains only titles that appeared in both the set-aside output and the latest output. So to get only the tags that the `field Operator` and `compare Operator` tiddlers have in common, you would write a filter expression like this:
|
16
|
-
|
17
|
-
* <$link to="tags Operator">`[[field Operator]tags[]] :intersection[[compare Operator]tags[]]`</$link>
|
18
|
-
|
19
|
-
The following examples use the [[field Operator]] and [[compare Operator]] tiddlers and their respective tags.
|
20
|
-
|
21
|
-
<<.operator-example 1 "[[field Operator]tags[]]">>
|
22
|
-
<<.operator-example 2 "[[compare Operator]tags[]]">>
|
23
|
-
|
24
|
-
<<.operator-example 3 "[[field Operator]tags[]] +[[compare Operator]tags[]]" """The "field Operator" tiddler's tags are lost, so only the "compare Operator" tiddler's tags are returned""">>
|
25
|
-
|
26
|
-
<<.operator-example 4 "[[field Operator]tags[]] :intersection[[compare Operator]tags[]]" """Returns the tags that both tiddlers have in common""">>
|
13
|
+
See [[Intersection Filter Run Prefix (Examples)]]
|
27
14
|
|
28
15
|
!! `:reduce` examples
|
29
16
|
|
30
|
-
|
31
|
-
[tag[shopping]] :reduce[get[quantity]add<accumulator>]
|
32
|
-
```
|
33
|
-
|
34
|
-
is equivalent to:
|
35
|
-
|
36
|
-
```
|
37
|
-
\define num-items() [get[quantity]add<accumulator>]
|
38
|
-
|
39
|
-
[tag[shopping]reduce<num-items>]
|
40
|
-
```
|
41
|
-
|
42
|
-
Specifying a default value when input is empty:
|
43
|
-
|
44
|
-
`[tag[non-existent]] :reduce[get[price]multiply{!!quantity}add<accumulator>] :else[[0]]`
|
45
|
-
|
46
|
-
<$macrocall $name=".tip" _="""Unlike the [[reduce Operator]], the `:reduce` prefix cannot specify an initial value for the accumulator, so its initial value will always be empty (which is treated as 0 by mathematical operators). So `=1 =2 =3 :reduce[multiply<accumulator>]` will produce 0, not 6. If you need to specify an initial accumulator value, use the [[reduce Operator]]."""/>
|
17
|
+
See [[Reduce Filter Run Prefix (Examples)]]
|
47
18
|
|
48
19
|
!! `:sort` examples
|
49
20
|
|
50
|
-
See [[Sort Filter Run Prefix (Examples)]]
|
21
|
+
See [[Sort Filter Run Prefix (Examples)]]
|
package/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
created: 20211128212902292
|
2
|
+
modified: 20211128233320674
|
3
|
+
tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Intersection Filter Run Prefix]]
|
4
|
+
title: Intersection Filter Run Prefix (Examples)
|
5
|
+
type: text/vnd.tiddlywiki
|
6
|
+
|
7
|
+
<<.operator-example 1 "A B C D :intersection[enlist[C D E F]]">>
|
8
|
+
|
9
|
+
<<.operator-example 2 "A B C D :intersection[enlist[A B C D]]">>
|
10
|
+
|
11
|
+
<<.operator-example 3 "A B C D :intersection[enlist[E F G H]]">>
|
12
|
+
|
13
|
+
<<.operator-example 4 ":intersection[enlist[A B C D]]" "Using intersection in the first filter run is of little use. The result will always be empty.">>
|
14
|
+
|
15
|
+
!! Difference between `+` and `:intersection`
|
16
|
+
|
17
|
+
The `+` prefix should be thought of as an "AND" in formal logic, e.g. "give me all titles that satisfy condition A ''and'' condition B". But it's not suitable for all cases; if condition B uses a filter operator that replaces its input, then it will be difficult to use the `+` prefix. For example, if you wanted to find out what tags two tiddlers have in common, you might try to write a filter expression like:
|
18
|
+
|
19
|
+
* <$link to="tags Operator">`[[field Operator]tags[]] +[[compare Operator]tags[]]`</$link>
|
20
|
+
|
21
|
+
But that won't work, because the second filter run will end up throwing away its input and replacing it with an input consisting of the single title `[[compare Operator]]`. So the result you'd get from that filter expression would be just the tags of the `compare Operator` tiddler.
|
22
|
+
|
23
|
+
For cases like this, the `:intersection` prefix is what you need. It takes the filter output so far, //sets it aside//, and starts the next filter run with all tiddler titles as input. Then once the latest filter run has completed, it takes the latest output, compares it to the set-aside output, and produces a new output that contains only titles that appeared in both the set-aside output and the latest output. So to get only the tags that the `field Operator` and `compare Operator` tiddlers have in common, you would write a filter expression like this:
|
24
|
+
|
25
|
+
* <$link to="tags Operator">`[[field Operator]tags[]] :intersection[[compare Operator]tags[]]`</$link>
|
26
|
+
|
27
|
+
The following examples use the [[field Operator]] and [[compare Operator]] tiddlers and their respective tags.
|
28
|
+
|
29
|
+
<<.operator-example 5 "[[field Operator]tags[]]">>
|
30
|
+
<<.operator-example 6 "[[compare Operator]tags[]]">>
|
31
|
+
|
32
|
+
<<.operator-example 7 "[[field Operator]tags[]] +[[compare Operator]tags[]]" """The "field Operator" tiddler's tags are lost, so only the "compare Operator" tiddler's tags are returned""">>
|
33
|
+
|
34
|
+
<<.operator-example 8 "[[field Operator]tags[]] :intersection[[compare Operator]tags[]]" """Returns the tags that both tiddlers have in common""">>
|
35
|
+
|
36
|
+
|