[tw5] Re: Random tiddler viewer tiddler

2021-07-21 Thread A Gloom
Thank you very much Soren for showing me where the shuffle operator plugin 
is.  I saw mention of it in another thread and that it was to be included 
in a future version of TW.  This will be interesting, might also be useful 
for my sidebar Internet radio and jukebox*.  Does the shuffle operator have 
a history tracking feature?  I was thinking of making one for my random 
tiddler viewer creation.

What TW can do without a sidebar jukebox with glowing neon and old fashion 
html radio button menu selection and some nifty animations???
On Tuesday, July 20, 2021 at 7:46:03 AM UTC-4 Soren Bjornstad wrote:

> You might be interested in the shuffle operator plugin 
> , which can 
> accept a seed parameter to avoid this unexpected-change problem. You would 
> do, e.g.,
>
> <$list filter="[tag[*poem]shuffle{$:/seed}first[]]">
>
> ...and then have a random button that updates the seed. The order of the 
> inputs will stay the same as long as the seed is the same.
>
> On Tuesday, July 20, 2021 at 3:07:06 AM UTC-5 barro...@gmail.com wrote:
>
>> Amusing, any using the tiddler's upper right icon (fold, info, etc) and 
>> sidebar activity causes it change to the next random tiddler, but nothing 
>> to prevent it from being used to read randomly selected tiddlers.  Will 
>> have to think of an active trigger or pause button.
>>
>> On Tuesday, July 20, 2021 at 1:46:27 AM UTC-4 A Gloom wrote:
>>
>>> Why?  Why not?
>>>
>>> Based off the random filter idea of SS found at TW-Scripts...
>>>
>>> It is a tiddler designed to be used in the story river as the main focus 
>>> (for reading), so I haven't seen any issues with it being triggered by 
>>> other wiki activity that would cause a tiddler refresh and a new random 
>>> tiddler display (since it wouldn't be open during any editing).  The 
>>> tiddler gets opened by a button with a tm-navigate message in the top or 
>>> sidebar. The two buttons in the tiddler itself cause a new random tiddler 
>>> to display by writing "Next poem" to a field ( zzdatesort ) of the tiddler 
>>> which it is transcluded in the buttons text, causing a refresh of the 
>>> tiddler and triggering the random filter of the list widget controlling the 
>>> random tiddler display.
>>>
>>>
>>> \define randpoem()
>>> <$set name=r1 value=<>>
>>> <$set name=r2 filter="[splitregexp:title[]rest[]join[]]" >
>>> <$set name=nth filter="[tag[*poem]count[]multiplydivide[100]ceil[]]">
>>> <$list filter="[tag[*poem]nth]">
>>> <$view field="title"/>
>>> <$transclude field="text" mode="block"/>
>>> 
>>> 
>>> 
>>> 
>>> \end
>>> <$button set="!!zzdatesort" setTo="Next poem" 
>>> >{{!!zzdatesort}}
>>> <>
>>> <$button set="!!zzdatesort" setTo="Next poem" >{{!!zzdatesort}}
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/23b4f32c-768a-4bd3-bd2a-973b9481f2d8n%40googlegroups.com.


[tw5] Re: Random tiddler viewer tiddler

2021-07-20 Thread Soren Bjornstad
You might be interested in the shuffle operator plugin 
, which can 
accept a seed parameter to avoid this unexpected-change problem. You would 
do, e.g.,

<$list filter="[tag[*poem]shuffle{$:/seed}first[]]">

...and then have a random button that updates the seed. The order of the 
inputs will stay the same as long as the seed is the same.

On Tuesday, July 20, 2021 at 3:07:06 AM UTC-5 barro...@gmail.com wrote:

> Amusing, any using the tiddler's upper right icon (fold, info, etc) and 
> sidebar activity causes it change to the next random tiddler, but nothing 
> to prevent it from being used to read randomly selected tiddlers.  Will 
> have to think of an active trigger or pause button.
>
> On Tuesday, July 20, 2021 at 1:46:27 AM UTC-4 A Gloom wrote:
>
>> Why?  Why not?
>>
>> Based off the random filter idea of SS found at TW-Scripts...
>>
>> It is a tiddler designed to be used in the story river as the main focus 
>> (for reading), so I haven't seen any issues with it being triggered by 
>> other wiki activity that would cause a tiddler refresh and a new random 
>> tiddler display (since it wouldn't be open during any editing).  The 
>> tiddler gets opened by a button with a tm-navigate message in the top or 
>> sidebar. The two buttons in the tiddler itself cause a new random tiddler 
>> to display by writing "Next poem" to a field ( zzdatesort ) of the tiddler 
>> which it is transcluded in the buttons text, causing a refresh of the 
>> tiddler and triggering the random filter of the list widget controlling the 
>> random tiddler display.
>>
>>
>> \define randpoem()
>> <$set name=r1 value=<>>
>> <$set name=r2 filter="[splitregexp:title[]rest[]join[]]" >
>> <$set name=nth filter="[tag[*poem]count[]multiplydivide[100]ceil[]]">
>> <$list filter="[tag[*poem]nth]">
>> <$view field="title"/>
>> <$transclude field="text" mode="block"/>
>> 
>> 
>> 
>> 
>> \end
>> <$button set="!!zzdatesort" setTo="Next poem" 
>> >{{!!zzdatesort}}
>> <>
>> <$button set="!!zzdatesort" setTo="Next poem" >{{!!zzdatesort}}
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/dd0f14b0-3a6d-4a9c-bd14-2c0b71f7189an%40googlegroups.com.


[tw5] Re: Random tiddler viewer tiddler

2021-07-20 Thread A Gloom
Amusing, any using the tiddler's upper right icon (fold, info, etc) and 
sidebar activity causes it change to the next random tiddler, but nothing 
to prevent it from being used to read randomly selected tiddlers.  Will 
have to think of an active trigger or pause button.

On Tuesday, July 20, 2021 at 1:46:27 AM UTC-4 A Gloom wrote:

> Why?  Why not?
>
> Based off the random filter idea of SS found at TW-Scripts...
>
> It is a tiddler designed to be used in the story river as the main focus 
> (for reading), so I haven't seen any issues with it being triggered by 
> other wiki activity that would cause a tiddler refresh and a new random 
> tiddler display (since it wouldn't be open during any editing).  The 
> tiddler gets opened by a button with a tm-navigate message in the top or 
> sidebar. The two buttons in the tiddler itself cause a new random tiddler 
> to display by writing "Next poem" to a field ( zzdatesort ) of the tiddler 
> which it is transcluded in the buttons text, causing a refresh of the 
> tiddler and triggering the random filter of the list widget controlling the 
> random tiddler display.
>
>
> \define randpoem()
> <$set name=r1 value=<>>
> <$set name=r2 filter="[splitregexp:title[]rest[]join[]]" >
> <$set name=nth filter="[tag[*poem]count[]multiplydivide[100]ceil[]]">
> <$list filter="[tag[*poem]nth]">
> <$view field="title"/>
> <$transclude field="text" mode="block"/>
> 
> 
> 
> 
> \end
> <$button set="!!zzdatesort" setTo="Next poem" 
> >{{!!zzdatesort}}
> <>
> <$button set="!!zzdatesort" setTo="Next poem" >{{!!zzdatesort}}
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8022e04d-e847-49d5-9b17-f276547f3975n%40googlegroups.com.