--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2a1b2d50-e081-49fa-8d56-20387993dcb8%40googlegroups.com.
--
I've wondered about adding a variant of the sort operator that would take a subfilter and [...]
Why, specifically, a sort operator?
If this functionality was possible would think an unlimited number of use cases for "submanipulations" should come up.
--<:-)
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/18c91157-d57c-4ae1-b5b0-c7121c00dfb7%40googlegroups.com.
\define getitems()
<$list filter="[tag[task]]">
<$vars time={{!!time}} value={{!!value}}>
<$text text="[["/>{{{ [<value>divide<time>divide[10000]] }}};<<currentTiddler>><$text text="]]"/> </$vars>
</$list>
\end
<$wikify name="items" text=<<getitems>> >
<$list filter="[enlist<items>nsort[]]">
{{{ [<currentTiddler>split[;]last[]] }}}<br>
</$list>
</$wikify>
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/37d4d40b-ce4f-44ad-b2a0-8a4217ebf502%40googlegroups.com.
I’ve now implemented a new “subsort” filter that takes a subfilter and sorts the incoming titles by the result of running that filter on each one in turn:https://github.com/Jermolene/TiddlyWiki5/commit/619c0752bd3c6e71d1fcdb74daa03cfe8257afe4The OP should be achievable using a subfilter such as:[{!!value}divide{!!time}]With that filter in a variable called “cost” it could be used like this:[tag[tas]subsort:number<cost>]
\define cost() [{!!value}divide{!!time}]
<$list filter="[tag[job]sortsub:number<cost>]">
</$list>
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
Seems it is sortsub
Using tiddlywiki.com I made a test as below
\define cost() [{!!value}divide{!!time}]
<$list filter="[tag[job]sortsub:number<cost>]"></$list>
but it does not work! Please advise!
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f1c1af1d-9575-40f5-9081-22142c4ce070%40googlegroups.com.
<test-new-sortsub.json>
Hi Mohammad,Thank you, that’s helpful. I’m seeing the result Designer, Doctor, Engineer, is that not what you are seeing?Best wishesJeremy
On 25 Apr 2020, at 13:58, Mohammad <mohamma...@gmail.com> wrote:
Hi again Jeremy,I have attached the sample tiddlers tested on https://tiddlywiki.com/prerelease/using the new sortsub--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
On 25 Apr 2020, at 14:13, Mohammad <mohammad...@gmail.com> wrote:
Strangely NO!
<Slide-37.png>
On Saturday, April 25, 2020 at 5:30:51 PM UTC+4:30, Jeremy Ruston wrote:Hi Mohammad,Thank you, that’s helpful. I’m seeing the result Designer, Doctor, Engineer, is that not what you are seeing?Best wishesJeremyOn 25 Apr 2020, at 13:58, Mohammad <mohamma...@gmail.com> wrote:Hi again Jeremy,I have attached the sample tiddlers tested on https://tiddlywiki.com/prerelease/using the new sortsub--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f1c1af1d-9575-40f5-9081-22142c4ce070%40googlegroups.com.
<test-new-sortsub.json>
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/559e5dee-7a42-4dfd-a688-d71f8f3b1770%40googlegroups.com.
<Slide-37.png>
Hi MohammadThe reason we were getting different results is because I had built the index.html I was using on my Mac, whereas you were using the online version that had been built on servers run by TravisCI. Those two environments end up putting the tiddlers into the HTML file in a different order, which was the ordering we were seeing.The problem is my fault: I gave the expression [get{!!value}divide{!!time}] without testing it, and it won’t work in this context because it relies on the current tiddler. The trouble is that this filter is run once to convert every list item into the corresponding sort key. We can only set the current tiddler to a single value for that run of the filter, so it clearly can’t address every tiddler in the input set.The solution is to use the get operator to retrieve the field values from each item that is passed into the filter. Hence the examples in the docs such as [get[text]else[]length[]] not being written as [{!!text}length[]].The problem here is that we need to retrieve both field values, which can’t currently be done. We can do [get[cost]divide[23]] but nothing that will divide [get[cost]] by [get[value]].So, it turns out that at this point the subsort operator doesn’t actually meet the requirement in the OP. I’ll give it some thought.Best wishes
Jeremy
On 25 Apr 2020, at 14:13, Mohammad <mohamma...@gmail.com> wrote:
Strangely NO!I see Engineer, Doctor, Designer. I testing online on https://tiddlywiki.com/prerelease/<Slide-37.png>
On Saturday, April 25, 2020 at 5:30:51 PM UTC+4:30, Jeremy Ruston wrote:Hi Mohammad,Thank you, that’s helpful. I’m seeing the result Designer, Doctor, Engineer, is that not what you are seeing?Best wishesJeremyOn 25 Apr 2020, at 13:58, Mohammad <mohamma...@gmail.com> wrote:Hi again Jeremy,I have attached the sample tiddlers tested on https://tiddlywiki.com/prerelease/using the new sortsub--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f1c1af1d-9575-40f5-9081-22142c4ce070%40googlegroups.com.
<test-new-sortsub.json>--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/559e5dee-7a42-4dfd-a688-d71f8f3b1770%40googlegroups.com.
<Slide-37.png>
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ec65706c-bffe-44ba-aa73-be609f65c20a%40googlegroups.com.
Hi Mohammad,
I’ve pushed an update that switches to evaluating the subfilter once for each input item, setting the currentTiddler variable for each evaluation. This makes the expression [{!!value}divide{!!cost}] work properly. It’s a bit slower, but definitely more useful.The update will be available on https://tiddlywiki.com/prelease in a few minutes (you can check on build progress here: https://travis-ci.org/github/Jermolene/TiddlyWiki5/builds)Best wishes
Jeremy
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ec65706c-bffe-44ba-aa73-be609f65c20a%40googlegroups.com.