1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-30 09:13:16 +00:00
Commit Graph

345 Commits

Author SHA1 Message Date
Joshua Fontany
1d0af90ba2
Extend lookup operator to work with fields and indexes (#5742)
* extend lookup op flexibility with 2 parameters

* bumped .from macro to .24

* aligned syntax

* lookup fixes

* bugfix

* docs

* messed up the tests somehow

* docs fix

* lookup bugfix

* docs

* docs

* call self.displayError

* Revert "call self.displayError"

This reverts commit 5d599aa979.

* storylist

* tests

* tests pass
2022-02-21 09:48:29 +00:00
jeremy@jermolene.com
1a0c831216 Add sha256 operator 2022-01-29 11:02:47 +00:00
Louis Davout
5cab75f4a7
In 'Filter Operators' add column to indicate those operators that construct an entirely new selection. (#6351) 2022-01-09 14:44:19 +00:00
twMat
f477e90192
Update Cascade Filter Run Prefix.tid (#6340) 2021-12-14 22:21:49 +00:00
jeremy@jermolene.com
804bc9e9c0 Merge branch 'tiddlywiki-com' 2021-12-06 17:05:43 +00:00
jeremy@jermolene.com
4514a67a1f Add user documentation for cascade mechanism 2021-12-06 16:59:13 +00:00
btheado
44ad8c770f
Added documentation tiddlers for intersection filter run prefix (#6307) 2021-12-05 17:27:35 +00:00
btheado
2dd4fa41a5
Add documentation tiddlers for filter filter run prefix (#6310)
* Added documentation tiddlers for filter filter run prefix

* Added examples to compare :filter filter run prefix to :and prefix
2021-12-04 20:44:04 +00:00
btheado
f88e3939e1
Add a cascade filter run example (#6302) 2021-12-04 10:25:43 +00:00
Saq Imtiaz
485730483b
Docs: reference documentation for :cascade filter run prefix (#6294)
* docs: formal documentation for :cascade filter run prefix

* fix: typos

* fix: typos
2021-11-30 15:07:10 +00:00
jeremy@jermolene.com
b6c8cdae64 Merge branch 'tiddlywiki-com' 2021-11-26 11:19:28 +00:00
btheado
6512b038c5
Added examples to compare :map filter run prefix to + prefix (#6282)
* Added examples to compare :map filter run prefix to + prefix

* Prefer ':and' over '+'
2021-11-25 18:03:30 +00:00
btheado
7b311b0e4a
Fix duplicate example id for map filter run prefix (#6281) 2021-11-25 15:20:30 +00:00
btheado
2f86779a27
Add doc tiddlers for reduce filter run prefix functionality (#6277)
* Added documentation tiddlers for reduce filter run prefix

* Make filter text box wider so long filters fit better

* removed some duplicate words

* Restored the :reduce filter run prefix tip
2021-11-24 20:02:40 +00:00
jeremy@jermolene.com
05606f72ad Merge branch 'tiddlywiki-com' 2021-11-24 10:07:17 +00:00
Marxsal
f828a582c3
Adding tags for file paths (#6240) 2021-11-18 08:45:20 +00:00
jeremy@jermolene.com
cce18d8e2e Merge branch 'tiddlywiki-com' 2021-11-17 09:33:55 +00:00
eiro10
3ff165402c
tw5.com : Fix typo in list.tid (#6217)
* tw5.com : Fix typo in list.tid

* tw5.com : update modified field of list.tid

When editing a tiddler outside TW itself, this doesn't change automatically the modified field.
2021-11-15 21:15:59 +00:00
jeremy@jermolene.com
2475e1b501 Merge branch 'tiddlywiki-com' 2021-11-04 20:34:01 +00:00
Saq Imtiaz
b6ce353a7d
Fix: resolved search-replace operator regexp encoding bug (#6162)
* fix: resolved search-replace operator bug with $ character in replacement strings, added test and more examples

* fix: reset regexp after each title
2021-11-01 13:24:30 +00:00
btheado
d21fabca4b
Docs: Fix filters selection constructors tag (#6154)
Add constructor tag to these filter operators:
* deserializers
* range
* storyviews

Remove constructor tag from
* enlist-input
2021-10-31 10:36:45 +00:00
btheado
daa9a8ae45
Add subfilter operator examples and mention when it is a constructor (#6155) 2021-10-31 10:36:03 +00:00
btheado
d9eb5499a3
Ensure the operator examples have unique id (#6153)
The first parameter of the operator examples macro is used for
constructing unique state tiddler titles. The cycle, log, and
match operators had duplicates, causing examples to share state
with each other.
2021-10-30 15:54:57 +01:00
Saq Imtiaz
c099bf9893
Extends :map filter run prefix to provide missing variables (#6149)
* Extends :map filter run prefix to provide the variables index, revIndex and length to bring it into line with :reduce

* update :maps examples

* docs: fix formatting issue with documentation
2021-10-30 10:04:50 +01:00
Saq Imtiaz
4f65953da9
Added zero based zth[] operator and documentation (#6150) 2021-10-30 09:52:38 +01:00
Telumire
2f133a08aa
Add documentation and examples for the trigonometric filter operators (#6131)
* Added missing trigonometrics filter operators

This PR adds support to trigonometry operators, allowing to create spider graphs and other geometric shapes with filters.

* Adds the missing trigonometric filter operators

This PR adds support to the missing trigonometric filter operators (cos, sin, tan, acos, asin, atan, atan2), allowing to create spider graphs, [pie charts, donut charts, polar charts](https://ffoodd.github.io/chaarts/pie-charts.html) and other geometric shapes with filters, which was previously not possible without add-ons.

Example :

`[[2]cos[]] = -0.4161468365471424`

See also this radar chart made in wikitext by @saqimtiaz using the new trigonometric operators :
https://saqimtiaz.github.io/sq-tw/temp/radar-chart-demo.html

* Add documentation for the Trigonometric Operators 

Accompanies code changes #6127

* Fix formatting of atan2 Operator.tid

Removed two empty lines at the end of the tiddler

* Add examples for the trigonometric operators 

Accompanies code changes Jermolene#6127

* Fix version in the doc for trigonometric operators

This PR fix the content of the documentation tiddlers regarding trigonometric operators (#6131). 

<<.from-version "5.1.20">> was changed to <<.from-version "5.1.21">>

* Fix formatting of atan2 Operator.tid

Removed two empty lines at the end of the tiddler
2021-10-22 11:35:47 +01:00
Saq Imtiaz
ef2aeac7de
Added modulesproperty filter operator and extended modules operator (#6055)
* Added modulesproperty filter operator and extended modules operator. Docs included

* Removed spurious new line
2021-09-20 08:25:53 +01:00
Soren Bjornstad
baf0ee9cde
Remove stray characters in example of :map prefix (#5963)
The `get[` here isn't valid and looks like a copy-paste error.
2021-09-18 15:04:50 +01:00
jeremy@jermolene.com
e6fd0caf6b Update range operator to use multiple operands
We still also support the old way of packing all three parameters into one operand with a delimiter
2021-09-07 17:16:09 +01:00
jeremy@jermolene.com
137df37bc7 Merge branch 'tiddlywiki-com' 2021-09-07 11:02:03 +01:00
Marxsal
03228d8d20
Allow compare operator to appear on filter list (#6008) 2021-08-30 08:58:26 +01:00
jeremy@jermolene.com
33be326ef6 Add from-version banner to search-replace operator "m" flag 2021-08-29 17:45:59 +01:00
Simon Huber
c13f04d838
Add m flag for multiline matches to search-replace filter operator (#5968)
* add m flag to search-replace operator and add tests

* update documentation

* Update test-filters.js

* Update test-filters.js

* Update search-replace Operator (Examples).tid

* Fix "Hello There" title (HelloThere)
2021-08-29 17:44:34 +01:00
Saq Imtiaz
1e5601ca31
Fix inaccuracies in documentation for duplicateslugs[] (#5918) 2021-07-29 11:39:20 +01:00
jeremy@jermolene.com
53c247b9a1 Merge branch 'tiddlywiki-com' 2021-07-27 19:30:44 +01:00
jeremy@jermolene.com
dbfd45814d Search and replace "v5.1.24" to "v5.2.0"
As discussed in #5708
2021-07-14 09:21:37 +01:00
Saq Imtiaz
f1f951e849
Docs for macro parameters in filter operands (#5837) 2021-06-29 23:25:44 +01:00
jeremy@jermolene.com
83ee363cb4 Add charcode operator to make it easier to generate strings containing control characters
Avoids some confusing hacks. @saqimtiaz I'm guessing you might have already done something like this?
2021-06-22 21:52:00 +01:00
Saq Imtiaz
021e9b8c4d
:map filter run prefix with docs and tests (#5813) 2021-06-21 20:59:58 +01:00
jeremy@jermolene.com
082aeb92ac Revert "extend lookup op flexibility with 2 parameters (#5315)"
This reverts commit 81b5fe944a.

See https://github.com/Jermolene/TiddlyWiki5/pull/5315#issuecomment-848725198 for explanation
2021-05-26 13:25:19 +01:00
Mario Pietsch
f342fdc41d
improve setwidget examples and add a link to and from enlist operator (#5666) 2021-05-25 22:19:28 +01:00
Saq Imtiaz
7a41283c6b
Format:titlelist operator (#5665) 2021-05-24 19:28:43 +01:00
Saq Imtiaz
3fc7895af2
CurrentTiddler variable consistency in subfilters and prefixes (#5691)
* Make currentTiddler variable consistent in subfilters and filter run prefixes

* Updated filterun prefix and subfilter operators to use ..currentTiddler instead of outerCurrentTiddler
2021-05-22 19:43:37 +01:00
Saq Imtiaz
10b20657cc
Deserializers[] filter operator (#5673) 2021-05-22 10:50:11 +01:00
Joshua Fontany
81b5fe944a
extend lookup op flexibility with 2 parameters (#5315) 2021-05-21 10:11:23 +01:00
Saq Imtiaz
cb44cc0f2b
Add :sort filter run prefix (#5653)
* Add :sort filter run prefix, docs and tests. Also extended .utils.makeCompareFunction with a flag for caseSensitivity.

* Documentation updates

* Move case sensitivity handling entirely to utils method so it is reusable
2021-05-01 13:58:40 +01:00
Chris Nicoll
41200ab6d7
Fix #5310: docs for unique[] filter operator (#5651)
Co-authored-by: clutterstack <clutterstack@gmail.com>
2021-04-29 13:14:28 +01:00
Jeremy Ruston
bf773eb39a
Add "average" filter operator for arithmetic mean (#5612) 2021-04-27 10:09:13 +01:00
jeremy@jermolene.com
625c3de6f7 Merge branch 'tiddlywiki-com' 2020-12-22 11:49:18 +00:00
twMat
c0a56e790d
Update title.tid (#5292) 2020-12-18 20:19:02 +00:00
Robin Munn
3c3cd4673e
Railroad diagram for filter expression now includes named prefixes (#5278) 2020-12-14 19:18:51 +00:00
Robin Munn
f60d0ef109
reduce and :reduce handle empty input identically (#5255)
Fixes #5246. Now the reduce operator and :reduce filter run prefix will
both return empty output when their input is empty, so that both can be
chained together with the else operator or :else prefix.
2020-12-11 10:07:52 +00:00
Saq Imtiaz
da5d12d6fb
Docs for :reduce filter run prefix (#5238) 2020-12-09 11:11:14 +00:00
Saq Imtiaz
8799911162
Reduce operator: second optional parameter instead of suffix (#5193)
* Tweak reduce operator to use an optional second parameter instead of a suffix

* Updated docs
2020-12-04 18:31:23 +00:00
Robin Munn
8ffe138942
Add rawunicode suffix to (json)stringify operators (#5191)
Default with no suffix is pre-5.1.23 behavior, escaping all Unicode
characters for maximum compatibility (avoids encoding issues). New
"rawunicode" suffix allows passing through Unicode characters U+0080
and up unchanged, for cases where you know your tools are handling
encoding correctly and you want less verbose escaping.
2020-12-04 13:19:59 +00:00
Robin Munn
c92f9dd404
Docs for trim operator suffix use from-version (#5161)
Trim suffix was introduced in version 5.1.23; docs should mention that.
2020-12-03 21:20:23 +00:00
Robin Munn
fd3e77d38f
"dedupe" and "raw" suffixes for enlist-input operator (#5152)
Includes unit tests.
2020-11-30 17:52:46 +00:00
saqimtiaz
8fc6910c03
Added string operator pad[] along with tests and docs (#5146) 2020-11-30 17:43:50 +00:00
Robin Munn
4623c45d29
Tag trim operator as a string operator (#5147)
* Tag trim operator as a string operator

With the new functionality of the trim operator in 5.1.23, it's now a
general-purpose string manipulation tool. So it should be given the
"String operators" tag so that people see it in the same list as
removeprefix and removesuffix, etc.

* Document suffix of trim operator
2020-11-30 17:30:51 +00:00
Robin Munn
5887c6621e
Create "Filter Run Prefix (Examples)" tiddler (#5144)
Move the `+` vs `:intersection` example into a separate Examples tiddler
which can be expanded on later.
2020-11-29 15:45:39 +00:00
saqimtiaz
a0f145197c
Correct error in operator documentation (#5084) 2020-11-20 21:34:43 +00:00
saqimtiaz
4f07539164
Cycle operator improvements plus docs (#5069)
* Tweak cycle operator to support step size parameter and add docs for toggle and cycle

* Mention that title list should have no duplicates
2020-11-20 18:37:23 +00:00
saqimtiaz
89541edcff
Added mathematics filter operators power and log (#5080) 2020-11-20 14:00:20 +00:00
jeremy@jermolene.com
0d434583ec Merge branch 'tiddlywiki-com' 2020-11-19 10:01:23 +00:00
saqimtiaz
1a8c6fdc4b
Docs: Added example of how to remove stop words (#5066)
* Added example of how to remove stop words

* Moved filter operator example tiddlers to correct folder
2020-11-18 15:56:38 +00:00
Robin Munn
ffd6a8cce7
More documentation for :intersection filter prefix (#5051) 2020-11-16 16:32:28 +00:00
saqimtiaz
568990409a
Fix typo in toggle operator docs (#5020) 2020-11-09 20:43:44 +00:00
saqimtiaz
445c15e719
Extend toggle operator (#5015)
* Extend toggle operator to support optional second operand to toggle a value pair

* Added tests for extended toggle filter

* Updated docs for toggle operator
2020-11-09 18:27:45 +00:00
Robin Munn
e72d90c227
More examples for enlist-input operator (#4968)
The examples should also show what would happen without the operator, to
give a better feel for why it's useful.
2020-11-08 11:47:15 +00:00
saqimtiaz
66636d1a86
Docs for new operators (#4994)
* Docs for is[draft]

* Better error handling for suffixes

* Docs for search-replace operator

* Added tests for search-replace operator

* Docs for toggle operator
2020-11-08 09:34:05 +00:00
saqimtiaz
2a7cdb22c0
Documentation for multiple filter operands (#4969) 2020-11-08 09:32:37 +00:00
saqimtiaz
70561bd481
Added docs for enlist-input filter operator (#4966) 2020-11-02 22:50:22 +00:00
saqimtiaz
2f5f0db00f
Added docs for :intersection filter run prefix (#4967) 2020-11-02 22:49:50 +00:00
Robin Munn
c0b021f509
Typo fix (#4951) 2020-11-01 11:03:59 +00:00
Robin Munn
cae32d39a5
Improve documentation for reduce operator (#4936) 2020-10-29 13:00:49 +00:00
saqimtiaz
f5ad5010bc
Added documentation for ':filter' prefix for filter runs. (#4920) 2020-10-28 12:00:18 +00:00
saqimtiaz
d0081a7247
Updated Filter docs for named filter run prefixes (#4917) 2020-10-27 16:49:56 +00:00
saqimtiaz
adf0c1a12a
Documentation for format filter operator (#4895)
* Documentation for format operator

* Examples for format operator
2020-10-23 16:25:05 +01:00
jeremy@jermolene.com
14a28b7779 Add "reduce" and "filter" operators 2020-10-06 19:20:03 +01:00
jeremy@jermolene.com
0027b990e4 Move tw5.com docs tiddlers to the correct folders 2020-10-04 17:36:08 +01:00
Robin Munn
5202441769
Add suffix and parameter to trim operator (#4811)
* Add suffix and parameter to trim operator

Fixes #4809

* Unit tests for new trim operator parameters

* Mention trim operator in 5.1.23 release notes

* Address review comments

* Move regex escaping into utils.js trim functions

This way the trimPrefix and trimSuffix functions from utils.js are safe
to call without regex-escaping their parameters, which should make them
easier to use from other parts of the Javascript code.
2020-08-29 12:27:58 +01:00
jeremy@jermolene.com
918e52b37b Merge branch 'tiddlywiki-com' 2020-08-28 15:25:47 +01:00
twMat
b16f5592fc
Update contains Operator.tid (#4746) 2020-08-28 14:44:40 +01:00
twMat
05de5b4c49
Update fixed Operator (examples).tid (#4763)
To clarify it zero pads.
2020-08-27 15:47:05 +01:00
twMat
8b5a4faa07
Update Filter Operators.tid (#4739) 2020-06-27 13:13:10 +01:00
jeremy@jermolene.com
41a7d98e17 Merge branch 'tiddlywiki-com' 2020-05-16 20:13:38 +01:00
mocsa
1812cbbb7c
Clarify Introduction to filter notation.tid (#4639)
I'm reading the documentation for the first time and I'm trying to clarify parts which are hard to understand for first-time users.
2020-05-14 14:30:48 +01:00
jeremy@jermolene.com
4966f6ab62 Add slugify and duplicateslugs operators
Fixes #3379
2020-05-09 15:54:44 +01:00
jeremy@jermolene.com
ad575efdcc Update sortsub to evaluate the subfilter for each item in the list
See the discussion here https://groups.google.com/d/msg/tiddlywiki/BqUFQ3v-fZw/U0F04CFFBQAJ
2020-04-25 15:22:24 +01:00
jeremy@jermolene.com
619c0752bd Add new sortsub operator 2020-04-25 11:26:19 +01:00
Mario Pietsch
de5b0062b5
Add new parameters to fields-widget and fields-operator. (#4433)
* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* extend fields-widget with include/exclude/sort/reverse and fields-filter with include and exclude params plus DOCS

* remove new-line

* remove eslint settings

* restore old eslint settings

* remove typo
2020-04-15 12:36:48 +01:00
Joshua Fontany
69c8058b72
Add has:index (#4540)
* has:index

* has:index

* has:index docs

* has op examples

* has op examples

* operator macros typo missing </div>

* possible mistake
2020-04-14 16:52:56 +01:00
Jeremy Ruston
27ab7d81b7 Merge branch 'tiddlywiki-com' 2020-04-14 15:16:38 +01:00
Jeremy Ruston
7b53f5724c Add new compare filter operator
Fixes #4554
2020-04-13 10:03:01 +01:00
Matt Lauber
d2f2d7a11b
Update jsonstringify Operator.tid (#4348) 2020-04-07 20:44:08 +01:00
Jeremy Ruston
9ae2c15638 Merge branch 'tiddlywiki-com' 2020-03-30 14:29:55 +01:00
twMat
cead051c73
Docs: Update sign Operator.tid (#4426) 2020-01-29 17:18:33 +00:00
twMat
35178f41b0
Docs: Update length Operator.tid (#4428) 2020-01-29 17:14:02 +00:00
TonyM
8145caa104 Add a new example that shows using all before to determine the nummeric position of a title in a list. (#4412)
See discussion https://groups.google.com/forum/?hl=en#!topic/tiddlywiki/wY6haW2cYMA
2020-01-14 16:55:53 +00:00
Jeremy Ruston
0671bc5afd Tweak docs for each filter 2019-12-12 17:39:23 +00:00