[tw5] Re: [TW5] Delete tiddler on click/mass delete

2024-03-06 Thread Eric Shulman
If you can use a filter to get the list the tiddlers you want to delete, 
then you can use the delete button (“trash can”) in $:/AdvancedSearch > 
Filters tab to bulk delete all matching tiddlers.

If you want to exclude a few specific tiddlers from your filtered list, you 
can add -[[NameOfTiddler]] to the filter.

Alternatively, if you install 
https://tiddlytools.com/#TiddlyTools%2FSearch%2FFilters, you can enter your 
desired filter and press the delete tiddlers button (“trash can” - upper 
right of the TiddlyTools/Search/Filters interface). This will then display 
a modal dialog with a checkboxes for all matching tiddler titles. You can 
then clear the checkmarks for any tiddlers you want to keep, and then press 
the “delete” button to delete the rest of the listed tiddlers.

enjoy,
-e

On Wednesday, March 6, 2024 at 12:38:31 AM UTC-8 Marc J. Cawood wrote:

> OK, solved it using this info: 
> https://talk.tiddlywiki.org/t/is-there-a-quick-way-to-delete-old-tiddlers-i-copied-from-main-tw/6143
>
> Make a tiddler called Purge1 with this content (making sure to adapt the 
> filter on the Make Purge2 List button):
>
>
> 1. Edit this Purge1 tiddler and set the filter
> 1. Click this "Make Purge2 List" button
> 1. Edit the [[Purge2]] tiddler and verify the list is correct
> 1. Click the "Delete Purge2 List" button
>
> <$button>Make Purge2 List
> <$action-listops $tiddler="Purge2" 
> $filter="[search[foo]!is[system]!search[Purge]]-twhelp"/>
> 
>
>
> <$button>Delete Purge2 List
> <$action-deletetiddler $filter="[list[Purge2]]"/>
> 
>
> In this example all tiddlers containing the word foo (except the word 
> Purge so this tiddler isn't also deleted) are listed into Purge2 and can 
> then be deleted.
>
> On Wednesday, March 6, 2024 at 8:53:58 AM UTC+1 Marc J. Cawood wrote:
>
>> Found this thread searching for "mass delete tiddlywiki".
>> Does anyone know how we can mass delete a list of tiddlers without 
>> clicking (and confirming) on 1000's of delete icons?
>>
>> On Thursday, December 11, 2014 at 5:14:05 PM UTC+1 Tobias Beer wrote:
>>
>>> Hi Danielo,
>>>  
>>>
 maybe you want to update your example for: 

>>> class="tc-btn-invisible tc-btn-mini"

 instead of 

 class="btn-invisible btn-mini"


>>> Ah, thanks for that. I actually deleted the classes now, since I don't 
>>> quite like the look of that bin in b/w. I think it would be reasonable to 
>>> have the toolbar button styles, except size and margins applied to any 
>>> *tc-image-button* without being restricted to the toobar itself.
>>>
>>> And to put the >> inside a button that actually reveals the tiddler 
 content. Currently it does nothing, but you have a button to close the 
 reveal, which will never be opened.

>>>
>>> Not sure what you mean, the button in that template only clears the 
>>> filter bar as is done in the advanced search templates.
>>> Would you want to preview the tiddlers, too?
>>>
>>> Best wishes, Tobias.
>>>
>>

-- 
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/8bfc1c30-c595-4346-aa54-cb10232e0184n%40googlegroups.com.


Re: [tw5] Re: controlling the background image

2024-02-15 Thread Eric Shulman
Try this:
Create a new tiddler (e.g., "SetPageBackground"), tagged with `
$:/tags/Stylesheet`, containing:
```
<$let curr={{$:/HistoryList!!current-tiddler}}>
body.tc-body {
background-image:url(<$macrocall $name="datauri" title={{{ [get[bg]] 
}}} $output="text/plain"/>);
background-size:{{{ [get[bgsize]] }}};
}

```
Then, in any tiddler, added a field named "bg" containing the name of an 
image tiddler,
and optionally, a field named "bgsize" containing desired CSS 
`background-size` attributes (e.g., "cover", "auto auto", "100% auto", 
etc.).  When that tiddler is navigated to (by clicking its link in the 
sidebar or from another tiddler), the specfied "bg" image (and bgsize 
attributes) will be applied to the `body.tc-body` background.

See https://developer.mozilla.org/en-US/docs/Web/CSS/background-size for 
valid "bgsize" values.

Note for GoogleGroups: do not include the single or tripled "backticks" 
when entering the tag or tiddler body text.  Those are only entered here to 
provide formatting for this response when displayed in 
https://talk.tiddlywiki.org/

enjoy,
-e
On Thursday, February 15, 2024 at 1:37:58 PM UTC-8 pbr wrote:

> Hi Scott,
>
> For the typical end user browsing experience, I think "whichever tiddler 
> is opened most recently" would work fine.
>
> I can imagine situations where a single-tiddler story would be preferable, 
> but my hope is that it wouldn't be required.
>
> I'll check out talk.tiddlywiki.org and if this doesn't get traction here 
> in the google group I'll follow up over there.
>
> Thank you!
> -Paul
>
>
> On Thu, Feb 15, 2024, 1:50 PM Scott Sauyet  wrote:
>
>> (Note that most of the discussion for TW is being held at 
>> https://talk.tiddlywiki.org/.  You might get more response there.)
>>
>> One question: Are  you using a story view that opens just one tiddler at 
>> a time?  If not, what's your expected behavior when there are multiple 
>> tiddlers open with `background` images?
>>
>> On Wednesday, February 14, 2024 at 12:57:18 PM UTC-5 pbr wrote:
>>
>>> Greetings Tiddly Wickers,
>>>
>>> I want to implement something in TW and I'm not at all sure how to do it.
>>>
>>> The goal is, when a tiddler is added to the story, if it has a field 
>>> "background" with the name of an image tiddler, the page background would 
>>> get set to that image. Possibly another fieldwork (backgroundoptions?) 
>>> could specify span, cover, scroll, and such.
>>>
>>> I had originally thought it could be done when a tiddler becomes the 
>>> current tiddler, but Jeremy mentioned TW doesn't have a notion of the 
>>> "current tiddler' in the sense of the tiddler that is currently being 
>>> viewed. He mentioned the core Dynannotate plugin, but I'm hopeful to avoid 
>>> that level of complexity.
>>>
>>> The specific trigger isn't important to me, as long as when the end user 
>>> clicks around and opens tiddlers, the background can be changed on a 
>>> per-tiddler basis.
>>>
>>> What do you think?
>>>
>>> Thanks!
>>> -Paul
>>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/tiddlywiki/dA2DlbW1syg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> tiddlywiki+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/5a9e7b91-f102-4d34-9bfb-0bc41317683fn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/ea942aed-c191-44a8-93fd-42e340870971n%40googlegroups.com.


[tw5] Re: is it possible to list fields that have a specific prefix ?

2023-07-09 Thread Eric Shulman
Try this:
```
<$list filter="[tag[Song]sort[]] :filter[get[year]prefix[198]]">


```
On Sunday, July 9, 2023 at 3:59:21 PM UTC-7 odda...@gmail.com wrote:

> How about listing fields whose value has a specific prefix?
>
> Right now I have a list filter that looks like this:
>
> <$list filter="[field:year[1980]] [field:year[1981]] [field:year[1982]] 
> [field:year[1983]] [field:year[1984]] [field:year[1985]] [field:year[1986]] 
> [field:year[1987]] [field:year[1988]] [field:year[1989]] 
> +[tag[Song]get[title]sort[title]]">
>
> It would be so much nicer if I could do something like:
>
> <$list filter="[field:year][prefix[198]][tag[Song]get[title]sort[title]]">
>
> I'll even take any suggestion that lets me use a list or range of years 
> instead of having to specify each one with its own [field:year[]] wrapper.
>
> Thanks,
> Todd
>
>
>
> On Saturday, July 20, 2019 at 2:34:26 AM UTC-5 Sebastian Ovide wrote:
>
>> great thanks !
>>
>>
>> On Saturday, 20 July 2019 02:20:04 UTC+1, Mark S. wrote:
>>>
>>> Example of fetching fields and values in current tiddler where field 
>>> name starts with "my" :
>>>
>>> <$list filter="[all[current]fields[]prefix[my]]" variable="field">
>>> <$list filter="[all[current]get]" variable="value">
>>> <> : <> 
>>> 
>>> 
>>>
>>> On Friday, July 19, 2019 at 5:19:38 PM UTC-7, Sebastian Ovide wrote:

 Hello

 I have a tiddler with several fields. Some have a specific prefix. Is 
 it possible to list them ?

 example

 tiddler!!prefix_aaa, tiddler!!prefix_bbb, tiddler!!prefix_ccc

 thanks

>>>

-- 
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/68c4b6d9-9a35-4f48-9810-58ba0166eaafn%40googlegroups.com.


[tw5] Re: It would be nice if drag and drop mechanism didn't happen everywhere

2023-05-28 Thread Eric Shulman
The `$dropzone` widget used to trigger drag-and-drop $:/Import handling is 
defined in `$:/core/ui/PageTemplate`:
```
<$dropzone enable=<>>
```
which also defines the `tv-enable-drag-and-drop` variable, which gets it's 
value from the contents of `$:/config/DragAndDrop/Enable`, and has a 
default value of "yes".  To disable the default $dropzone, create a tiddler 
named `$:/config/DragAndDrop/Enable`, with a text field value of "no".  
After doing this, you will no longer be able to use drag-and-drop to import 
tiddlers.  You will still be able to use the "Import" PageToolbar button 
(see the sidebar "Tools" tab, or `$:/ControlPanel > Appearance > Toolbars > 
Page Toolbar` settings) to initiate a "browse for file" system dialog to 
import tiddlers from locally saved .JSON files.

You can define your own custom dropzone "hotspot" by creating a tiddler 
containing something like `<$dropzone>drop here to import 
tiddlers`.  When that tiddler is displayed, you can then 
drag-and-drop onto the "drop here to import tiddlers" text to initiate the 
TWCore's usual $:/Import handling.  To add a nice visible "import tiddlers" 
$button interface into the SideBar, try this:
* Create a tiddler (e.g., SidebarImportZone)
* Enter text content: `<$dropzone><$button>drop here to import 
tiddlers`
* Tag it with `$:/tags/SideBarSegment`
* Add a field named 'list-before' with a value of 
`$:/core/ui/SideBarSegments/tabs`

Important note: Setting `$:/config/DragAndDrop/Enable` to "no" also 
disables use of drag-and-drop for re-ordering items within tag dropdowns.  
To avoid this side-effect, instead of setting 
`$:/config/DragAndDrop/Enable` to "no", you can disable the drag-and-drop 
$:/Import handling by editing the `$:/core/ui/PageTemplate` shadow tiddler 
and completely removing the `<$dropzone ...>` and `` widgets 
from that tiddler.  This leaves the tag dropdown handling intact, while 
still preventing page-wide drag-and-drop $:/Import handling from being 
triggered.

enjoy,
-e

On Sunday, May 28, 2023 at 8:56:37 AM UTC-7 cj.v...@gmail.com wrote:

> https://youtu.be/-UNSlUzdAY8
>

-- 
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/4b549298-2a36-411a-b51b-328bcb9890c5n%40googlegroups.com.


[tw5] Re: TW Gadget: Tiddler Editor Text Resizer

2023-05-19 Thread Eric Shulman
The TWCore setting `$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize` 
assumes that it includes the CSS units (e.g., “px”). However, the $range 
widget only sets a numeric value, thus losing the default “px” suffix.

To work around this, try the following:
```
<$let target="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize">
<$range tiddler="$:/temp/bodyfontsize" class="slider"
   min="14" max="44" increment="1" default={{{ 
[get[text]multiply[1]] }}}
   actions="<$action-setfield $tiddler=<> text={{{ 
[addsuffix[px]] }}}/>"/>
```

   - Have the $range widget store its result in a temp tiddler (e.g., 
   $:/temp/bodyfontsize)
   - Set the default value to the contents of 
   $:/themes/tiddlywiki/vanilla/metrics/bodyfontsize and multiply by 1 to 
   remove any CSS units suffix while retaining the numeric portion of the 
   current setting value.
   - Add an actions="..." parameter that copies the temp tiddler value to 
   the actual target tiddler while also adding the desired “px” suffix.

In addition, the “reset” button should delete both the temp tiddler and the 
target tiddler, so the default TWCore shadow is re-applied and is also used 
as the default value for the $range widget:
```
<$action-deletetiddler $filter="[[$:/temp/bodyfontsize]] []"/>
```
On Friday, May 19, 2023 at 12:49:40 AM UTC-7 S² wrote:

>
> Hi Charlie,
> if I do the same for Font size for tiddler body 
> 
>  
> I'm loosing the suffix "px" when using the slider.
>
> 
>  Schriftgröße (Anzeige):  
> <$range tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize" 
> min="14" max="44" default="20" increment="1" class="slider"/> 
>  
>  
> {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}} 
>
> <$button class="tc-btn-invisible" tooltip="Reset">
> <$action-setfield 
> $tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize" 
> text="20px"/>
>
> ''↺''
> 
>
> (Actual I put "20px" to the reset button.)
>
> Any idea how to keep it?
> Thanks, Stefan
> Charlie Veniot schrieb am Donnerstag, 18. Mai 2023 um 22:39:18 UTC+2:
>
>> There are a few problems in your TW scripting.
>>
>> The first line, action-setfield.   All action widgets have to be the 
>> result of something happening (like clicking on a button).  That action 
>> doesn't have anything to trigger it, so it will never happen.
>>
>> The other action-setfield does happen when pushing on the button.  It 
>> correctly sets the "bodyfontsize" metric.
>>
>> The slider, though, sets the text value for a tiddler that is used in 
>> your CSS to set the font size of tc-edit-text-editor-body.
>>
>> tc-edit-text-editor-body and "bodyfontsize" are two different things.
>>
>> If you use the TiddlyWiki control panel, setting the bodyfontsize does 
>> have an impact on the font size for tc-edit-text-editor-body (have a 
>> tiddler in edit mode while changing things in the control panel to see what 
>> happens), but it isn't a 1-1 relationship.
>>
>> What "one" thing are you trying to accomplish here?
>>
>> On Thursday, May 18, 2023 at 4:54:18 PM UTC-3 S² wrote:
>>
>>> Hello forum,
>>>
>>> inspired by @Charlie Veniot I tried to add the reset button to my wiki - 
>>> but no effect when clicking on the button.
>>> Any idea why?
>>>
>>> Also tested on https://tiddlywiki.com/
>>> [image: code.png]
>>> *Code:*
>>> <$action-setfield 
>>> $tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize" 
>>> text={{fontsizeValue}}/>
>>> Schriftgröße 
>>> (Editor):  
>>> <$range tiddler="fontsizeEditor" min="16" max="24" default="18" 
>>> increment="0.5" class="slider"/> 
>>> 
>>>  {{fontsizeEditor}} px 
>>> <$button class="tc-btn-invisible" tooltip="Reset">
>>> <$action-setfield 
>>> $tiddler="$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize" 
>>> text="18px"/>
>>> ''↺''
>>> 
>>>
>>> with 
>>> [image: Stylesheet.png] 
>>>
>>> Thanks for help.
>>> Stefan
>>>
>>> Charlie Veniot schrieb am Donnerstag, 18. Mai 2023 um 19:20:47 UTC+2:
>>>
 Done.  Plus a "reset" button.

 [image: Screenshot 2023-05-18 2.19.38 PM.png]

 On Thursday, May 18, 2023 at 10:50:52 AM UTC-3 Scott Sauyet wrote:

>  Charlie Veniot wrote:
> > Just for the giggles to figure out how I would go about it.
>
> Very nice!  One suggestion: make the max 200 or so rather than the 
> default 100.  Help those with poorer eyesight!
>
>   -- Scott
>


-- 
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/4f16543c-372e-4af0-9afd-39b9230f0a32n%40googlegroups.com.


[tw5] Re: Reveal Widget rendering issues.

2023-05-09 Thread Eric Shulman
Wikitext syntax relies upon a leading blank line to indicate that "block" 
mode rendering should be applied to the bullet item.  In addition, the 
bullet item within the $reveal widget also results in a new containing "ul" 
element which includes a margin above/below, resulting in the unwanted 
whitespace.

You can work around this by using HTML syntax instead of wikitext syntax, 
like this:
```

some text that goes here before {{!!fieldA}} and some after.
<$reveal type="nomatch" state="!!fieldB" text="">
some other text thats different to the above {{!!fieldB}} and then some 
more after.


```

On Tuesday, May 9, 2023 at 8:49:38 AM UTC-7 gamingtab...@gmail.com wrote:

> If I create a new tiddler, and add two fields, field-a and field-b.
>
> In the tiddler I then use the * notation to create some bullet points.
>
> I add some text before field A, then, use the reveal widget to see if 
> field b exists, if it does, I add another "row" to the bullet point list.
>
> If I do this;
>
> * some text that goes here before {{!!field-a}} and some after.
> <$reveal type="nomatch" state="!!field-b" text="">
> * some other text thats different to the above {{!!field-b}} and then some 
> more after.
> 
>
> then part within the reveal renders as * not as an actual bullet point. 
> but if I do this
>
> * some text that goes here before {{!!field-a}} and some after.
> <$reveal type="nomatch" state="!!field-b" text="">
>
> * some other text thats different to the above {{!!field-b}} and then some 
> more after.
> 
>
> Then it renders as a bullet point, but with an CRLF between the two points!
>
> How can I get around this problem?
>
> (PS, I found I had the same problem with the !!! notation for header in 
> that if it was on the line after the open of the reveal it rendered as !!! 
> my text, but if there was a gap then it rendered properly.)
>

-- 
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/2bea3292-ab84-4dc5-913f-18e47c77e1ben%40googlegroups.com.


[tw5] Re: URL Import Gadget (URL to WikiText external link)

2023-05-01 Thread Eric Shulman
To create the bookmarklet:
(note: these instructions are for Chrome.  Similar actions are available 
for other browsers, though the menu item and dialog may vary somewhat)

   - First, select and copy the code posted by cskrisz to your clipboard:
   ```
   javascript: 
   
navigator.clipboard.writeText(`[[${document.title.replaceAll('|','–')}|${document.location.href}]]`);
   ```
   - Then, right-click on your browser's bookmark bar and select "Add 
   page..." from the popup menu.
   - In the dialog that appears, in the "Name" input, enter something like 
   "Make a TW prettylink", and in the "URL" input, paste the "javascript:..." 
   code from your clipboard.
   - Press "Save" to add the bookmark to your browser.
   - Note that the new bookmark will appear at the end of your existing 
   bookmarks.  You can use drag-and-drop or "Bookmark manager" to relocate the 
   bookmark within the bookmark bar

To use the bookmarklet:

   - Go to any page on any website you like
   - Press the "Make a TW prettylink" bookmark
   - This will copy the current URL's title and href to your system 
   clipboard, formatted as a TW prettylink (e.g., `[[Title|URL]]`)

To add the prettylink to your TW document:

   - Open your TW document
   - Press "+" to create a new tiddler (or edit an existing tiddler)
   - Place the cursor in the tiddler's text area input
   - Press ctrl-V or right-click and select "Paste" from the popup menu.

done.
On Monday, May 1, 2023 at 12:56:04 PM UTC-7 cj.v...@gmail.com wrote:

> I just wasted the last hour trying to get that bookmarklet to work.
>
> If you recommend this as a good way to go, could you give some pointers on 
> how to get it working?
>
> On Monday, May 1, 2023 at 9:31:05 AM UTC-3 Charlie Veniot wrote:
>
>> Why on earth would you have not provided that crucial observation in your 
>> first post?  I only tested with links that do not have gibberish in the URL.
>>
>> On Monday, May 1, 2023 at 2:24:16 AM UTC-3 Krisztián Csordás wrote:
>>
>>> Bookmarklet - Wikipedia 
>>>
>>> Personally, I prefer `[[URL Import Gadget (URL to WikiText external 
>>> link)|https://groups.google.com/g/TiddlyWiki/c/q3A8j3sIXjI]]` 
>>>  over 
>>> `[[q3A8j3sIXjI|https://groups.google.com/g/TiddlyWiki/c/q3A8j3sIXjI]]` 
>>> .
>>>
>>>
>>> On Sunday, 30 April 2023 at 17:14:31 UTC+2 Charlie Veniot wrote:
>>>
 Click (on what, I'm not sure) to copy and then paste is a great option 
 for those who cannot drag and drop.

 Drag and drop makes me much happier.

 On Sunday, April 30, 2023 at 4:40:56 AM UTC-3 Krisztián Csordás wrote:

> When you click it in the bookmarks bar, it copies a wikitext link 
> created from the current page title and URL. Then you can paste it into 
> the 
> tiddler like any other text.
>
> On Sunday, 30 April 2023 at 02:09:43 UTC+2 Charlie Veniot wrote:
>
>> I have no idea how your bookmarklet helps to create a WikiText link 
>> (in TiddlyWiki) to an external site.
>>
>> Could you clarify?
>>
>> On Saturday, April 29, 2023 at 7:50:44 PM UTC-3 Krisztián Csordás 
>> wrote:
>>
>>> I use a bookmarklet that copies the wikitext link to the clipboard:
>>>
>>> javascript: 
>>> navigator.clipboard.writeText(`[[${document.title.replaceAll('|','–')}|${document.location.href}]]`);
>>> On Sunday, 16 April 2023 at 00:43:16 UTC+2 Charlie Veniot wrote:
>>>
 Please find attached in this post the JSON file you need to 
 download and drag into any TiddlyWiki to add this gadget.

 https://youtu.be/EIAgESf6K8s

>>>

-- 
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/4e42ef5a-97de-4911-8cc3-1e5dee626871n%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread Eric Shulman
On Tuesday, April 25, 2023 at 8:40:38 AM UTC-7 springer wrote:

```
<$macrocall
$name="toc-tabbed-external-nav"
tag="Common Operators"
exclude="all Operator"
/>
```
As best I can tell, it fails when BOTH the tag and the exclude string have 
spaces.


Before the TOC code change, the `excluded` variable contained a ***list of 
tiddlers titles*** that had already been "visited" and was applied 
internally using `-[enlist]` to prevent infinite "loops" in the 
tree.  In v5.3.0-prerelease, this variable can now also use filter syntax 
to generate a list of tiddler titles to be excluded (applied internally 
using `-[subfilter]`).  The TOC code changes also now permit this 
parameter to be passed in to `toc-tabbed-external-nav`.  Since the value 
has always operated on a LIST, the correct usage to pass a specified title 
containing a space would be `exclude="[[all Operator]]"`

Note also that the `tag` parameter (used to specify the starting "root tag" 
for the tree) is NOT a list, and CAN contain spaces, since it is used 
internally via `tag<__tag__>`.

This DOES work as before:
```
<$macrocall
$name="toc-tabbed-external-nav"
tag="Common Operators"
exclude="[[all Operator]]"
/>
```

-e

-- 
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/2fb0dadb-020f-4f2a-962f-44c99d8ea8cbn%40googlegroups.com.


[tw5] Re: Render a custom type as text/plain

2023-04-01 Thread Eric Shulman
Instead of using simple transclusion (i.e., `{{TiddlerTitle}}`) use the 
`$codeblock` widget, like this:
`<$codeblock code={{TiddlerTitle}}/>`


On Saturday, April 1, 2023 at 11:08:53 AM UTC-7 gab...@tibas.media wrote:

> Interestingly, when I transclude the node, it's still rendered as a wiki 
> tiddler, not as code.  I wonder, Eric, if, from the top of your head, you'd 
> know how to work around that?
> Thanks again, Gabriel
>
> On Saturday, April 1, 2023 at 8:02:29 PM UTC+2 Gabriel Montagné 
> Láscaris-Comneno wrote:
>
>> Amazing Eric!  Worked perfectly.  And thanks for the link and 
>> explanation!   I'll use the Discourse server for these type of questions 
>> going forward.
>> Again, 1000 thanks!
>> Cheers,
>> Gabriel
>>
>> On Saturday, April 1, 2023 at 6:35:04 PM UTC+2 Eric Shulman wrote:
>>
>>> Addendum:
>>>
>>> Instead of
>>>
>>> [type[text/x-fountain]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
>>>
>>> your cascade definition should be:
>>> [type[text/x-fountain]then[$:/core/ui/ViewTemplate/body/code]]
>>>
>>> The difference is that the first definition will render embedded 
>>> wikitext syntax,
>>> while the second definition simply displays the content as plain text 
>>> without any other processing.
>>>
>>> -e
>>>
>>

-- 
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/2e23c278-cdd7-4b80-995c-d0198c47aab6n%40googlegroups.com.


[tw5] Re: Render a custom type as text/plain

2023-04-01 Thread Eric Shulman
Addendum:

Instead of
[type[text/x-fountain]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]

your cascade definition should be:
[type[text/x-fountain]then[$:/core/ui/ViewTemplate/body/code]]

The difference is that the first definition will render embedded wikitext 
syntax,
while the second definition simply displays the content as plain text 
without any other processing.

-e

-- 
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/66ebbb48-b319-4aa5-80c2-13b7d0af286en%40googlegroups.com.


[tw5] Re: Render a custom type as text/plain

2023-04-01 Thread Eric Shulman
You want to use the TWCore's "cascade" mechanism 
(see https://tiddlywiki.com/#Cascades)

* Create a tiddler (e.g., "$:/config/ViewTemplateBodyFilters/x-fountain"), 
containing:
   
[type[text/x-fountain]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
* Tag it with `$:/tags/ViewTemplateBodyFilter`
* Add a field named `list-before` with no field value

Notes:
* Your "cascade" tiddler can have any name.  The name suggested above is 
consistent with the existing TWCore "ViewTemplateBodyFilters" shadow 
definitions.
* The tiddler content is evaluated by the TWCore cascade mechanism, and 
basically says: "If the tiddler's type field is equal to "text/x-fountain", 
then display the tiddlers body using the 
"$:/core/ui/ViewTemplate/body/rendered-plain-text" template
* The `$:/tags/ViewTemplateBodyFilter` tag adds your definition to the 
default ViewTemplateBodyFilters cascade
* The `list-before` field ensures that your custom cascade is evaluated 
first when the cascade is processed by the TWCore

enjoy,
-e

P.S. You might want to visit https://talk.tiddlywiki.org/, which is a 
"Discourse" server that is now the TiddlyWiki community's primary 
discussion/Q+A area.
On Saturday, April 1, 2023 at 8:41:13 AM UTC-7 gab...@tibas.media wrote:

> Hi, 
>
> I registered a new type on my TW,  `text/x-fountain`, as per 
> https://groups.google.com/g/tiddlywiki/c/l_uxgh_tsDU.  All good; it shows 
> up on the type selector.
>
> But I'd like it rendered as if it was a `text/plain` file, not as a TW 5 
> tiddler.
>
> Is there a simple way to achieve this? 
>
> Thanks,
> Gabriel
>

-- 
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/b8e1eef5-38e7-4b30-a78a-93148af6d596n%40googlegroups.com.


[tw5] Re: Creating Tiddler from Template but just the body

2023-02-16 Thread Eric Shulman
Instead of use the `$param` parameter, you can set the `text` field content 
in the same way you are setting the content of the `title` and `tags` 
fields.  Something like this should do:
```
<$action-sendmessage $message="tm-new-tiddler" title=<> 
text={{000template}} tags=<>/>
```
Note how the `text=...` param is using transclusion to get its value from 
the "000template" tiddler.

enjoy,
-e
On Thursday, February 16, 2023 at 9:24:13 AM UTC-8 jkr...@gfai.de wrote:

> Hey,
>
> I have a button in my sidebar to create a new Tiddler witch works well for 
> the most part. I now use a template for the new tiddler to already have 
> some text in the body, which also works well. My only problem is, that the 
> tag is also taken from the template and I cant find a way to get rid of it. 
> Can i specify, which fields to take from the template? or is there a way to 
> remove a tag or change tags to just the one I want?
>
> Cheers. My code so far:
>
> <$button class="tc-btn-invisible" title="Add Today Tiddler">
><$list filter="[match[yes]]">
>   {{$:/core/images/new-journal-button}}
>
><$list filter="[match[yes]]">
>   <$text text="Add Today"/>
>
><$action-sendmessage $message="tm-new-tiddler" $param="000template" 
>  title=<>  tags=<>/>
> 
>
> PS: Sorry, don't know how to use labels.
>

-- 
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/96e48b48-334b-4518-8269-312738f7c43cn%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-02-10 Thread Eric Shulman
I've submitted a `[BUG]` issue on GitHub: 
https://github.com/Jermolene/TiddlyWiki5/issues/7261

The writeup for this issue includes some minor code changes to 
`$:/core/macros/toc` that will enable support for the use of the `exclude` 
parameter with `toc-tabbed-internal-nav` and `toc-tabbed-external-nav`.

Attached is a JSON file containing the modified `$:/core/macros/toc`, which 
I have tested on https://TiddlyWiki.com
On Friday, February 10, 2023 at 4:15:39 PM UTC-8 springer wrote:

> So, it turns out this solution does NOT work for toc-tabbed-internal-nav 
> and toc-tabbed-external-nav
>
> Adding this point here (in addition to at talk.tiddlywiki.org) because 
> this thread is newer, AND someone hitting their head against the wall 
> wondering why it's not working might feel a bit more sane if the issue is 
> flagged.
>
> Eric, if you happen to have a workaround ;) ...
> On Thursday, January 26, 2023 at 7:34:38 PM UTC-5 Eric Shulman wrote:
>
>> For the first problem (excluding items tagged with "Todo"), try this:
>> ```
>> <$set name="todo" filter="[tag[Todo]]">
>> 
>> <$macrocall $name="toc-selective-expandable" tag="ML" 
>> sort="sort[created]" exclude=<> />
>> 
>> 
>> ```
>> Notes:
>> * The `$set` widget gets the list of all tiddlers tagged with "Todo" and 
>> stores it in the "exclude" variable
>> * `` applies the TWCore pre-defined 
>> styles to suppress the "numbered bullet item" display
>> * Using the `$macrocall` widget instead of the 
>> `<>` macro syntax allows you to pass the 
>> value of the "exclude" variable as a parameter
>>
>> To fix the second problem (where the root tag contains an apostrophe), 
>> enclose the root tag in double quotes:
>> ```
>> <>
>> ```
>> * The `$macrocall` syntax will also handle the second problem , since all 
>> the parameter values are already enclosed in double quotes.
>>
>> Let me know how it goes...
>>
>> enjoy,
>> -e
>> On Thursday, January 26, 2023 at 3:32:33 PM UTC-8 jaroslawb...@gmail.com 
>> wrote:
>>
>>> Hello! I am new user of TiddlyWiki, I work on Windows, Google Chrome and 
>>> have a problem when creating Table of Contents. 
>>>
>>> The following code works for me:
>>>
>>> <>
>>>
>>> I obtain list of tiddlers tagged *ML*, which is sorted by creation 
>>> date. Amazing!
>>>
>>> But...  2 things:
>>>
>>> 1) I want to be able to customize this list e.g. ''tiddlers with tag 
>>> *ML*, but without tag *Todo*'' etc. So filter notation would be awesome
>>> 2) I run into a problem when name of tag tiddler has apostrophe e.g. 
>>> *Cauchy's 
>>> Integral, *then I am unable to create list of this tag using standard 
>>> Table of Contents notation (hence again need of filter notation)
>>>
>>> So what also works for me is that:
>>>
>>> <>
>>>
>>> but I don't seem to be able to do *anything else* to that. What code 
>>> lines* do not work* for me:
>>>
>>>
>>>- <>
>>>- <>
>>>- <>
>>>- <>
>>>- <>
>>>
>>> All of the above commands don't produce a thing and I really wish they 
>>> worked.
>>>
>>> I would be really really thankful for help, because I love TiddlyWiki. 
>>> And also I'm sorry if that's stupid thing to ask or wrong place to post 
>>> such quesion - I am absolute begginer. If that's the case please tell me 
>>> what should I do instead. 
>>>
>>> Have a great day!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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/0ee80623-a729-4c42-9f45-2ba564968a1fn%40googlegroups.com.


$__core_macros_toc.json
Description: application/json


[tw5] Re: Macro

2023-02-05 Thread Eric Shulman
Give this a try:
```
\define checkbox-list(values,fieldname)
<$list filter="[enlist[$values$]]" variable="thisValue" >
<$checkbox listField="$fieldname$" checked=<>> 
<>

\end
```
Notes:
* If the `values` list has items that contain double quotes or square 
brackets, those characters will interfere with the parsing of the `$list` 
filter syntax.  To avoid this problem, instead of writing 
`filter="[enlist[$values$]]"`, you can write: 
`filter="[enlist<__values__>]"`.  
see https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText for more 
info.
* Note also that, while brackets (square, angled, or curly) within wikitext 
syntax are doubled, when used in filter syntax, they are SINGLE (i.e., 
`[enlist<__values__>]`... NOT `[enlist<<__values__>>]`)

enjoy,
-e
On Sunday, February 5, 2023 at 7:24:48 AM UTC-8 vinvi...@gmail.com wrote:

> Hi, I'm trying to make a macro.
>
> This is my code so far:
>
> \define checkbox-list()<$list variable="LIST-FROM-FIELD" 
> filter="[list[!!LIST-FROM-FIELD]]"><$checkbox listField="WRITE TO 
> FIELD" checked=<>> <>
>
> It now reads the values from a field and displays them with a checkbox in 
> front of them. 
> By checking the checkbox, the corresponding value is written to another 
> field.
>
> I would prefer that when calling the macro I could determine which values 
> should be displayed 
> without having to put them in a field. 
>
> Something like:
> <>
>
> I've been working on $myvar$. and enlist $mylist$.. I can't figure it out.
>
> Is there anyone who can help me with this?
>

-- 
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/6c7ac763-016f-4348-80f1-7a6dccc06a93n%40googlegroups.com.


[tw5] Re: Upon first edit, field creates a temporary tiddler, causing the focus to move away from the field

2023-02-03 Thread Eric Shulman
When the `$:/temp/BAM/Settings` tiddler is first created, it causes 
everything following the `$tiddler` widget to be refreshed, which triggers 
the loss-of-focus that you observed.  While creating the temporary tiddler 
on startup certainly does fix this issue, there is another solution that 
doesn't require a startup action.  Just move the `$tiddler` widget AFTER 
the `$edit-text` widget and add a `tiddler=...` parameter to the 
`$edit-text` widget, like this:
```
<$edit-text tiddler="$:/temp/BAM/Settings" field="search_draft"/>
<$tiddler tiddler="$:/temp/BAM/Settings">
```
Thus, the `$edit-text` widget is no longer subjected to the spontaneous 
refresh when the temp tiddler is first created, but everything else still 
works as before.

Another way to achieve this same result is to replace the `$tiddler` widget 
with
```
<$list filter="$:/temp/BAM/Settings">
```
which has the side effect of setting the `currentTiddler` value to 
`$:/temp/BAM/Settings`, but doesn't cause the loss-of-focus refresh to be 
triggered.

enjoy,
-e
On Friday, February 3, 2023 at 10:25:21 AM UTC-8 cj.v...@gmail.com wrote:

> I've got a search field that only takes effect after clicking an "Apply" 
> button.
>
> ```
> <$tiddler tiddler="$:/temp/BAM/Settings">
> <$edit-text field="search_draft"/>
> <$button class={{{ [{!!search_draft}!match{!!search}then[blinking]] }}} 
> disabled={{{ [{!!search_draft}match{!!search}then[yes]else[no]] }}}>
> <$action-setfield search={{!!search_draft}}/>
> Apply
> 
> ```
>
> Every time, the first time entering text in that search field, the focus 
> would move away from the field right after typing the first character.
>
> Never any focus issue after that first-time-first-keypress every time I 
> used the TiddlyWiki instance.
>
> The problem: the temporary tiddler, which doesn't exist until something is 
> typed in the field, gets created on the first keypress in that field.  That 
> causes the focus to move away from the field.
>
> What I did: create that temporary tiddler on Startup of the TiddlyWiki 
> instance.
>
> Problem solved.
>

-- 
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/5688284c-7583-4fae-bb3a-8008062d94c0n%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-01-26 Thread Eric Shulman
For the first problem (excluding items tagged with "Todo"), try this:
```
<$set name="todo" filter="[tag[Todo]]">

<$macrocall $name="toc-selective-expandable" tag="ML" sort="sort[created]" 
exclude=<> />


```
Notes:
* The `$set` widget gets the list of all tiddlers tagged with "Todo" and 
stores it in the "exclude" variable
* `` applies the TWCore pre-defined 
styles to suppress the "numbered bullet item" display
* Using the `$macrocall` widget instead of the 
`<>` macro syntax allows you to pass the 
value of the "exclude" variable as a parameter

To fix the second problem (where the root tag contains an apostrophe), 
enclose the root tag in double quotes:
```
<>
```
* The `$macrocall` syntax will also handle the second problem , since all 
the parameter values are already enclosed in double quotes.

Let me know how it goes...

enjoy,
-e
On Thursday, January 26, 2023 at 3:32:33 PM UTC-8 jaroslawb...@gmail.com 
wrote:

> Hello! I am new user of TiddlyWiki, I work on Windows, Google Chrome and 
> have a problem when creating Table of Contents. 
>
> The following code works for me:
>
> <>
>
> I obtain list of tiddlers tagged *ML*, which is sorted by creation date. 
> Amazing!
>
> But...  2 things:
>
> 1) I want to be able to customize this list e.g. ''tiddlers with tag *ML*, 
> but without tag *Todo*'' etc. So filter notation would be awesome
> 2) I run into a problem when name of tag tiddler has apostrophe e.g. 
> *Cauchy's 
> Integral, *then I am unable to create list of this tag using standard 
> Table of Contents notation (hence again need of filter notation)
>
> So what also works for me is that:
>
> <>
>
> but I don't seem to be able to do *anything else* to that. What code lines* 
> do not work* for me:
>
>
>- <>
>- <>
>- <>
>- <>
>- <>
>
> All of the above commands don't produce a thing and I really wish they 
> worked.
>
> I would be really really thankful for help, because I love TiddlyWiki. And 
> also I'm sorry if that's stupid thing to ask or wrong place to post such 
> quesion - I am absolute begginer. If that's the case please tell me what 
> should I do instead. 
>
> Have a great day!
>
>
>
>
>
>
>
>

-- 
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/2572f117-9152-4825-94f6-ad877b652279n%40googlegroups.com.


[tw5] Re: Undefined widget 'let'

2022-12-05 Thread Eric Shulman
The `$let` widget was added to the TWCore in v5.2.1 (8 December 2021).  The 
error you are seeing indicates that you are using a version of TW that is 
older than v5.2.1.

To fix this, you need to upgrade your TiddlyWiki.  Go to 
https://tiddlywiki.com/upgrade.

-e



On Monday, December 5, 2022 at 1:19:50 PM UTC-8 ethanc...@gmail.com wrote:

> I recently tried to install the Search Package Plugins from TiddlyTools: 
> https://tiddlytools.com/# but am now getting this message: "Undefined 
> widget 'let' Undefined widget 'let'Undefined widget 'let'" in the upper 
> left-hand corner of my wiki. 
>
> Has anyone else had this issue? Or does anyone have thoughts and a 
> possible fix? I made the grave mistake of not making a copy of my HTML file 
> before adding a new plugin, and I am now regretting it. 
>
> Cheers,
> Ethan
>

-- 
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/61d84b56-864e-4c4e-ac60-a89e2af1ca51n%40googlegroups.com.


[tw5] Re: why my macro return is not rendered correctly ?

2022-12-05 Thread Eric Shulman
There's no need to use javascript for this macro.  Instead, you can create 
a tiddler named "$:/plugins/vpl/jazzbokMem/db_macros_plan", tagged with 
`$:/tags/Macro`, containing:
```
\define db_macros_plan(opt)
<$let audio_path={{$opt$!!audio_ref}}>
<$list filter="[search:title[file/audio/cours]]" 
emptyMessage="N/A">
   > preload="auto" controls>

\end
```
You can then use it exactly as you were before:
```
<$macrocall $name="db_macros_plan" opt={{{ [get[title]] }}} 
/>
```
enjoy,
-e
On Sunday, December 4, 2022 at 11:41:38 PM UTC-8 vpl wrote:

> Of course,
> here it is:
>
> /*\
> title: $:/plugins/vpl/jazzbokMem/db_macros_plan.js
> type: application/javascript
> module-type: macro
>
>
> \*/
> (function(){
>
> /*jslint node: true, browser: true */
> /*global $tw: false */
> "use strict";
>
>
> /*
> Information about this macro
>
> */
> exports.name = "db_macros_plan";
>
> exports.params = [
> {name: "opt"}
> ];
> /*
> Run the macro
> */
> exports.run = function(opt) {
> var str_return = "N/A";
> console.log("db_macros_plan 0.2. opt:"+opt);
>var dbPlanTiddler = this.wiki.getTiddler(opt);
> var audio_path = dbPlanTiddler.getFieldString("audio_ref");
> if (audio_path.includes("files/audio/cours")) {
> str_return = "audio src=\""+audio_path+"\" preload=\"auto\" 
> controls>";
> console.log(str_return);
> }
> return (str_return);
> };
>
> })();
>
> Le lundi 5 décembre 2022 à 03:15:56 UTC+1, cj.v...@gmail.com a écrit :
>
>> I think we are going to need to see the full definition of your 
>> "db_macros_plan" macro.
>>
>> On Sunday, December 4, 2022 at 10:43:27 AM UTC-4 vpl wrote:
>>
>>> Hi,
>>>
>>> I've the following table that list different scores (tiddlers in 
>>> tiddlywiki). See bottom of this mail
>>>
>>> This works perfectly except for the 
>>> <$macrocall $name="db_macros_plan" opt={{{ [get[title]] 
>>> }}} /> execution.
>>>
>>> This macro return what I expect, that is to say: 
>>> audio src="files/audio/cours/blues-ex-1.mp3" preload="auto" 
>>> controls>
>>> But in the rendered table this appears as a the string 'audio 
>>> src="files/audio/cou " where I expect to get the refering html5 
>>> audio element
>>>
>>> What is my error ..??
>>>
>>> Thanks a lot for your help
>>> Regards
>>>
>>>
>>> 
>>> 
>>> 
>>> ModeAudioCommentsScore
>>> 
>>> <$list filter=<>>
>>> 
>>> <$view field="mode"/>
>>> <$macrocall $name="db_macros_plan" opt={{{ 
>>> [get[title]] }}} />
>>> <$view field="comments"/>
>>> get[score_ref]] }}} />
>>> 
>>> 
>>> \end
>>>
>>>
>>>

-- 
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/c118709a-0911-4c77-8fd4-45d4b2b5652cn%40googlegroups.com.


[tw5] Re: What if SQL statements could be used in TiddlyWiki?

2022-11-24 Thread Eric Shulman
This is some interesting stuff!

I notice that in the PDF output, if a tiddler listed in "The record set" 
table doesn't have some fields (or the field value is blank, or two fields 
have exactly the same value), that row of the table omits the corresponding 
cell, rather than showing a blank placeholder cell (or a repeated value if 
two fields have matching values).  The result is that the cells for that 
tiddler don't align with the corresponding field name headings.

Example 1:
"Interactive Git Documentation by Devin Weaver" has a blank "type" field.
The result is that the "url" field value is displayed under the "type" 
column heading

Example 2:
"Simple Zork-like Game by Jed Carty" has the same timestamp for "created" 
and "modified" (20141118143636664).
The result is that the "modified" field value is omitted from the table, 
and the "text" field value is displayed under the "tags" column heading.

Since I can't look at your code to see what you are doing, I can only guess 
at some possible workarounds for these issues.

I assume you are using some filter syntax to iterate over the fields of a 
tiddler and using something like "get" to retrieve the values 
that are shown in the table cells.  If this is the case, you might try 
using something like "getelse[]", which would ensure that 
empty/missing fields are converted to blank text rather than being 
omitted.  For the duplicate value problem, you might try preceding the 
relevant filter run syntax with "=" to preserve duplicate values in the 
results.

Hope this helps,
-e
On Thursday, November 24, 2022 at 6:29:38 PM UTC-8 cj.v...@gmail.com wrote:

> select * from Examples
>
> Results (preceded by sanity-checks of steps towards result set) in 
> attached PDF.
>
> On Thursday, November 24, 2022 at 8:39:39 PM UTC-4 Charlie Veniot wrote:
>
>> Working on:  select * from Examples
>>
>> Using TiddlyWiki.com
>>
>> The tag "Examples" being the table.
>>
>> On Thursday, November 24, 2022 at 4:46:34 PM UTC-4 Charlie Veniot wrote:
>>
>>> As always, the question of "how would I do that/this in TiddlyWiki" just 
>>> grabs me by the jugular (i.e. it gets all of my attention.)
>>>
>>> Proof of concept prototype pending ...
>>>
>>

-- 
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/0c91473e-d7eb-46a5-b888-91a0e34b7d24n%40googlegroups.com.


[tw5] Re: Ignore "the" and "a" in dynamic list?

2022-11-14 Thread Eric Shulman
Take a look at the actual documentation tiddler (not the static version) 
here:
   https://tiddlywiki.com/#How%20to%20remove%20stop%20words

Edit that tiddler to see the implementation.  It contains this macro 
definition:
```
\define compare-without-stopwords()
[search-replace:i:regexp[^The |A ],[]]
\end
```
To show a title with the "stop words" moved to the end of the title, add 
this macro:
\define move-stopwords()
<$text text={{{[search-replace:i:regexp[(^The |A 
)(.*)],[$2, $1]]}}}/>
\end
```
To get your book list as a variable, you can write:
```
<$set name="book-list" filter="[has:field[book]get[book]unique[]sort[]]">
```
You can then use something like this to show the list:
```
<$list filter="[enlistsortsub]">
   <$link><>

```

enjoy,
-e
On Monday, November 14, 2022 at 9:48:47 AM UTC-8 adamvi...@gmail.com wrote:

> Hey amazing people!
>
> I'd like to create a dynamic list of books that ignores "the" and "a", to 
> keep it alphabetically tidy, 
> But right now I can only get it to render an alphabetical list using:
>
> <$list filter="[has:field[book]get[book]]+[unique[]sort[]]">
> <$link><>
> 
>
> I've tried incorporating a snippet from how to remove stop words 
> 
> :
>
> [enlistsortsub]
>
> But I can't seem to implement it correctly..
>
> Apologies if this seems a basic fix,
> (I'm not a programmer by any means, so I'm just scraping by and trying not 
> to bug you guys with trivial stuff if I can help it.)
>
>
>
>

-- 
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/9f4cbed3-6d25-4abd-bafd-1a8f73be8f86n%40googlegroups.com.


[tw5] Re: What is Red "Draft of" button at lower left on page load?

2022-10-27 Thread Eric Shulman
If you are editing a tiddler and that tiddler is removed from the 
StoryRiver without ending the active edit, you get a "red button" for that 
tiddler.  Clicking the red button re-displays the tiddler editor in the 
StoryRiver so you can continue editing.

Here's an example of how to produce this effect:

On https://TiddlyWiki.com, press "+" in the sidebar to begin editing "New 
Tiddler". Then, from the sidebar "open" tab (where all tiddlers currently 
displayed in the StoryRiver are listed), click on the "X" next to "Draft of 
'New Tiddler'" to remove that tiddler from the StoryRiver without ending 
the active edit.  A red button will appear in the lower-left of the page.

Notes:
* You can actually have multiple red buttons, one for each tiddler that is 
still in edit mode but is not currently shown in the StoryRiver.
* If you save the file with a red button displayed, the red button 
condition will be saved as well.  Re-opening your TiddlyWiki will continue 
to show the red button until you click on it and properly end the editing 
by pressing the done (checkmark) button in the tiddler editor.

On Wednesday, October 26, 2022 at 8:49:44 AM UTC-7 dougla...@gmail.com 
wrote:

> I am using version 5.1.19 and have used TW for many years, but I have 
> never seen this red button before in the lower left of the page.  It says 
> "Draft of" followed by the title of my latest Tiddler.  I saw this 
> immediately the next day when I started my computer because my Chrome auto 
> populates a couple of TiddlyWiki files every time Chrome initially opens.
>
> [image: TW_Draft_of.png]
>
> My search in all the GitHub open and closed issues and also within in this 
> group's conversations didn't turn up any information on this red "Draft of" 
> button anywhere.
>
> When I clicked the button, the button disappeared and that Tiddler opened.
>
> What causes this?
>
> I tried to save the file (improperly I know) by just using "Save as" and 
> that merely corrupted the file, I saw no button.  Then I tried a couple of 
> other things to attempt to produce this button on load again but was unable 
> to.
>
> So now I'm curious what action created the red button?  I'm thinking that 
> Chrome may have done something if my system applied an update and 
> restarted, but I just don't know.  
>
> Thank you for any insight that someone can give,
>
> -Doug

-- 
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/6a0cf625-361d-4779-a8b7-b0e8da5a6d76n%40googlegroups.com.


[tw5] Re: triggering send-message from a permalink URL

2022-10-09 Thread Eric Shulman
Try this:

1) In your TiddlyWiki, create a new tiddler named "download", containing:
```
\import $:/plugins/benwebber/dnd/ui/Buttons/export-player-edition
<$list filter="[{$:/info/url/search}match[?download]]">
   <>

```
2) tag this tiddler with `$:/tags/StartupAction/PostRender`

Then, to trigger the action from a URI, add `?download` to the end of the 
URI.  The result should be the same as using the "Export Player Edition" 
button from the sidebar page controls.

Note that I tested this by loading into a browser.  It might not work when 
using wget, as "$:/tags/StartupAction/PostRender" is only triggered when 
running in a browser.  I also tried "$:/tags/StartupAction", which should 
work even without a browser (i.e., using wget), but it didn't seem to work 
for my tests, and I'm not sure why.

Let me know how it goes...

-e
On Sunday, October 9, 2022 at 7:22:14 PM UTC-7 myst...@gmail.com wrote:

> I am using Ben Weber's DND campaign tools twiki (
> https://benwebber.github.io/tiddlywiki-dnd/).
> It has a feature to export a copy of the twiki that only include 
> non-system tiddlers w/ the 'Public' tag.  Core to that feature is calling 
> send-message 'tm-download-file'.
>
> I am looking for a way to automate this via a cron and wget.
>
> I've been looking but am at a loss of a way to trigger an action widget 
> via direct URl call.
>
> Any suggestions would be most appreciated.
>

-- 
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/05edc15d-6242-4ecd-acfe-356f7e70ce3en%40googlegroups.com.


[tw5] Re: SOS tagging help

2022-10-08 Thread Eric Shulman
After tagging, the tiddler "Intro" shows a tag pill for "Dervla Murphy".
Clicking this tag pill shows a drop down that includes a link to the 
"Intro" tiddler.

Note that, while there is also a tiddler named "Dervla Murphy", that 
tiddler does not *automatically* show a list of tiddlers that are tagged 
with that title.  To have the "Dervla Murphy" tiddler show a list of tagged 
tiddlers, you need to add some content to it... something like this:
```
<]">>
```

enjoy,
-e
On Saturday, October 8, 2022 at 5:27:44 PM UTC-7 mobil...@gmail.com wrote:

> I added the tag "Dervla Murphy" to my tiddler "Intro", yet it's not listed 
> under Dervla Murphy.
> What am I doing wrong?
>

-- 
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/dfd423ec-25f3-4716-919c-03d17597c95cn%40googlegroups.com.


[tw5] Re: coloring dropdown options

2022-09-29 Thread Eric Shulman
The `$select` *widget* supports use of a `class="..."` attribute, but NOT `
style="..."`.

In order to change the color of the `$select` widget, you will need to 
define a CSS classname that specifies the background color.

Something like this:
```
.thisColor { background:{{!!color}}; }
<$select field="color" class="thisColor">
   <$list filter="[enlist]" variable=thisColor>
  ] [[;]] +[join[]] 
}}}><>
   

```

-e
On Thursday, September 29, 2022 at 12:15:36 AM UTC-7 Samir S. wrote:

> I didn't understand the explanation. Never mind. I need to find a way to 
> "dynamically" change the color of the <$select> tag itself (which has 
> class/style attributes), or find an other way to do what i want. ;-)
>
> Thank you.
>
> On Wednesday, 28 September 2022 at 17:37:37 UTC+2 Eric Shulman wrote:
>
>> The background and foreground colors for the option that currently has 
>> the FOCUS are determined by the browser's implementation of the underlying 
>> HTML select element.  Using my X11 color list example, if you select 
>> "Burlywood", then it will be displayed using the default "white text on a 
>> blue background" because the selected item also has the FOCUS.  However, if 
>> you then mouseover other list items -- i.e. changing the FOCUS, but not the 
>> current SELECTION -- then the selected item DOES appear using the specified 
>> "Burlywood" background color.  Unfortunately, there doesn't seem to be a 
>> CSS rule that can specify the colors used by the FOCUSED item, so we are 
>> stuck with the browser-defined defaults.
>>
>> -e
>>
>> On Wednesday, September 28, 2022 at 12:22:23 AM UTC-7 Samir S. wrote:
>>
>>> Thank you Eric.
>>>
>>> I tried your example it works fine except that the chosen option does 
>>> not remain colored.
>>> Is this behavior on purpose ?
>>>
>>> On Tuesday, 27 September 2022 at 16:54:30 UTC+2 Eric Shulman wrote:
>>>
>>>> You can you CSS `class` or `style` attributes to specify the 
>>>> `background` color attribute, like this:
>>>>
>>>> Using classnames:
>>>> ```
>>>> 
>>>> .red { background:red; }
>>>> .green { background:green; }
>>>> .blue { background:blue; }
>>>> 
>>>>
>>>> <$select field="color">
>>>>item 1
>>>>item 2
>>>>item 3
>>>> 
>>>> ```
>>>>
>>>> Using direct styles and a $list of colors:
>>>> ```
>>>> <$select field="color">
>>>><$list filter="red green blue" variable=thisColor>
>>>>   ] [[;]] +[join[]] 
>>>> }}}>
>>>>  <>
>>>>   
>>>>
>>>> 
>>>> ```
>>>>
>>>> In fact, I have used this technique myself to create a "select a color" 
>>>> drop list that shows a list of "X11 Color Names"
>>>> ```
>>>> \define X11Colors()
>>>> AliceBlue AntiqueWhite Aqua Aquamarine Azure Beige Bisque Black 
>>>> BlanchedAlmond Blue BlueViolet Brown Burlywood CadetBlue Chartreuse 
>>>> Chocolate Coral CornflowerBlue Cornsilk Crimson Cyan DarkBlue DarkCyan 
>>>> DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen 
>>>> DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue 
>>>> DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray 
>>>> DodgerBlue Firebrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite 
>>>> Gold Goldenrod Gray Green GreenYellow Honeydew HotPink IndianRed Indigo 
>>>> Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue 
>>>> LightCoral LightCyan LightGoldenrodYellow LightGray LightGreen LightPink 
>>>> LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue 
>>>> LightYellow Lime LimeGreen Linen Magenta Maroon MediumAquamarine 
>>>> MediumBlue 
>>>> MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen 
>>>> MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin 
>>>> NavajoWhite Navy OldLace Olive OliveDrab Orange OrangeRed Orchid 
>>>> PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff 
>>>> Peru Pink Plum PowderBlue Purple RebeccaPurple Red RosyBrown RoyalBlue 
>>>> SaddleBrown Salmon SandyBro

[tw5] Re: coloring dropdown options

2022-09-28 Thread Eric Shulman
The background and foreground colors for the option that currently has the 
FOCUS are determined by the browser's implementation of the underlying HTML 
select element.  Using my X11 color list example, if you select 
"Burlywood", then it will be displayed using the default "white text on a 
blue background" because the selected item also has the FOCUS.  However, if 
you then mouseover other list items -- i.e. changing the FOCUS, but not the 
current SELECTION -- then the selected item DOES appear using the specified 
"Burlywood" background color.  Unfortunately, there doesn't seem to be a 
CSS rule that can specify the colors used by the FOCUSED item, so we are 
stuck with the browser-defined defaults.

-e

On Wednesday, September 28, 2022 at 12:22:23 AM UTC-7 Samir S. wrote:

> Thank you Eric.
>
> I tried your example it works fine except that the chosen option does not 
> remain colored.
> Is this behavior on purpose ?
>
> On Tuesday, 27 September 2022 at 16:54:30 UTC+2 Eric Shulman wrote:
>
>> You can you CSS `class` or `style` attributes to specify the `background` 
>> color attribute, like this:
>>
>> Using classnames:
>> ```
>> 
>> .red { background:red; }
>> .green { background:green; }
>> .blue { background:blue; }
>> 
>>
>> <$select field="color">
>>item 1
>>item 2
>>item 3
>> 
>> ```
>>
>> Using direct styles and a $list of colors:
>> ```
>> <$select field="color">
>><$list filter="red green blue" variable=thisColor>
>>   ] [[;]] +[join[]] }}}>
>>  <>
>>   
>>
>> 
>> ```
>>
>> In fact, I have used this technique myself to create a "select a color" 
>> drop list that shows a list of "X11 Color Names"
>> ```
>> \define X11Colors()
>> AliceBlue AntiqueWhite Aqua Aquamarine Azure Beige Bisque Black 
>> BlanchedAlmond Blue BlueViolet Brown Burlywood CadetBlue Chartreuse 
>> Chocolate Coral CornflowerBlue Cornsilk Crimson Cyan DarkBlue DarkCyan 
>> DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen 
>> DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue 
>> DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray 
>> DodgerBlue Firebrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite 
>> Gold Goldenrod Gray Green GreenYellow Honeydew HotPink IndianRed Indigo 
>> Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue 
>> LightCoral LightCyan LightGoldenrodYellow LightGray LightGreen LightPink 
>> LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue 
>> LightYellow Lime LimeGreen Linen Magenta Maroon MediumAquamarine MediumBlue 
>> MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen 
>> MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin 
>> NavajoWhite Navy OldLace Olive OliveDrab Orange OrangeRed Orchid 
>> PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff 
>> Peru Pink Plum PowderBlue Purple RebeccaPurple Red RosyBrown RoyalBlue 
>> SaddleBrown Salmon SandyBrown SeaGreen Seashell Sienna Silver SkyBlue 
>> SlateBlue SlateGray Snow SpringGreen SteelBlue Tan Teal Thistle Tomato 
>> Turquoise Violet Wheat White WhiteSmoke Yellow YellowGreen
>> \end
>>
>> <$select field="color">
>><$list filter="[enlist]" variable=thisColor>
>>   ] [[;]] +[join[]] }}}>
>>  <>
>>   
>>
>> 
>> ```
>> enjoy,
>> -e
>> On Tuesday, September 27, 2022 at 5:08:23 AM UTC-7 Samir S. wrote:
>>
>>> Greetings,
>>>
>>> Is there a way to change the color of each option values inside the 
>>> $select widget.
>>>
>>> I've tried adding a class attribute but it does not work.
>>>
>>> Thank you in advance for your help.
>>>
>>> Sincerely.
>>>
>>>
>>>

-- 
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/fe23015f-fa16-46f1-90f3-6d02eeb65dd2n%40googlegroups.com.


[tw5] Re: coloring dropdown options

2022-09-27 Thread Eric Shulman
You can you CSS `class` or `style` attributes to specify the `background` 
color attribute, like this:

Using classnames:
```

.red { background:red; }
.green { background:green; }
.blue { background:blue; }


<$select field="color">
   item 1
   item 2
   item 3

```

Using direct styles and a $list of colors:
```
<$select field="color">
   <$list filter="red green blue" variable=thisColor>
  ] [[;]] +[join[]] }}}>
 <>
  
   

```

In fact, I have used this technique myself to create a "select a color" 
drop list that shows a list of "X11 Color Names"
```
\define X11Colors()
AliceBlue AntiqueWhite Aqua Aquamarine Azure Beige Bisque Black 
BlanchedAlmond Blue BlueViolet Brown Burlywood CadetBlue Chartreuse 
Chocolate Coral CornflowerBlue Cornsilk Crimson Cyan DarkBlue DarkCyan 
DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen 
DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue 
DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray 
DodgerBlue Firebrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite 
Gold Goldenrod Gray Green GreenYellow Honeydew HotPink IndianRed Indigo 
Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue 
LightCoral LightCyan LightGoldenrodYellow LightGray LightGreen LightPink 
LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue 
LightYellow Lime LimeGreen Linen Magenta Maroon MediumAquamarine MediumBlue 
MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen 
MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin 
NavajoWhite Navy OldLace Olive OliveDrab Orange OrangeRed Orchid 
PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff 
Peru Pink Plum PowderBlue Purple RebeccaPurple Red RosyBrown RoyalBlue 
SaddleBrown Salmon SandyBrown SeaGreen Seashell Sienna Silver SkyBlue 
SlateBlue SlateGray Snow SpringGreen SteelBlue Tan Teal Thistle Tomato 
Turquoise Violet Wheat White WhiteSmoke Yellow YellowGreen
\end

<$select field="color">
   <$list filter="[enlist]" variable=thisColor>
  ] [[;]] +[join[]] }}}>
 <>
  
   

```
enjoy,
-e
On Tuesday, September 27, 2022 at 5:08:23 AM UTC-7 Samir S. wrote:

> Greetings,
>
> Is there a way to change the color of each option values inside the 
> $select widget.
>
> I've tried adding a class attribute but it does not work.
>
> Thank you in advance for your help.
>
> Sincerely.
>
>
>

-- 
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/d265bc48-84cb-4ec4-96b0-6a6c1f71e5e0n%40googlegroups.com.


[tw5] Re: Limiting tiddler width

2022-09-23 Thread Eric Shulman
Create a tiddler (e.g., "SetTiddlerWidth"), tagged with 
`$:/tags/Stylesheet`, containing:
```
<$list filter="[{$:/state/sidebar}match[no]]">
.tc-tiddler-frame { width:50vw; min-width:600px; margin-left:auto; 
margin-right:auto; }

```
Notes:
* The contents of `$:/state/sidebar` are automatically set to "yes" or "no" 
when you click the double-chevron ("toggle sidebar") button
* The `$list` widget acts as a conditional test to check if the text field 
of `$:/state/sidebar` contains "no".
* `width:50vw;` limits the `tc-tiddler-frame` element to 50% of the current 
window width
* `min-width:600px;` ensures that the width of the tiddler frames don't get 
too small if the current window width is very narrow
* `margin-left:auto;` and `margin-right:auto;` centers the tiddler frames 
within the window

enjoy,
-e

On Friday, September 23, 2022 at 8:57:39 AM UTC-7 zvb...@gmail.com wrote:

> Hello,
>
> I'm using a single file default TW and want to make a minor adjustment to 
> the theme. 
>
> I'd like to limit the size of the of my tiddlers when the sidebar is 
> collapsed.
>
> What would be the best way to go about this?
>
> Thanks,
> Brin
>

-- 
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/5a0368e3-c99c-4f26-aff7-8cc7082b27a1n%40googlegroups.com.


[tw5] Re: [TW5] Save Changes button, Action before saving changes

2022-08-22 Thread Eric Shulman
You can prevent a tiddler from being saved in the file by creating a global 
macro named `publishFilter()` that removes the specific tiddler title, like 
this:

Create a tiddler (e.g., "MyPublishFilter"), tagged with `$:/tags/Macro`, 
containing:
```
\define publishFilter()
-[[$:/state/GMKey]]
\end
```
The contents of the `publishFilter()` macro are automatically appended to 
the `saveTiddlerFilter()` filter definition contained in `$:/core/save/all` 
which is then used by `$:/core/templates/tiddlywiki5.html` to determine 
which tiddlers will be saved to the TiddlyWiki file.

Notes:
* Each listed tiddler title should be preceded by a minus sign, so that 
those titles are excluded from the file.
* The `publishFilter()` macro can use any valid filter syntax.  Thus, in 
addition to automatically excluding specific tiddler titles, you can 
exclude an entire set of matching titles.  For example, if you were to 
specify `-[prefix[$:/state]]`, then ALL `$:/state` tiddler would be 
excluded from the file when it is saved.
* The `publishFilter()` definition doesn't remove the tiddlers from the 
***currently loaded*** TiddlyWiki... it just prevents those tiddler from 
being saved to the file so they won't be there the next time you re-load.

enjoy,
-e

-- 
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/b92e27a0-4f15-4a2b-a759-64436d078084n%40googlegroups.com.


[tw5] Re: Tag Cloud (TiddlyWiki coding fun)

2022-07-11 Thread Eric Shulman
Indeed, TagCloud has  been done before... 
https://tiddlytools.com/filtergenerators.html#TiddlyTools%2FFilterGenerators%2FTagCloud

On Monday, July 11, 2022 at 3:52:17 PM UTC-7 cj.v...@gmail.com wrote:

> Hello,
>
> I just had an itch to code this thing.  I'm sure this has been done many 
> times before.  Regardless, maybe there's some interesting stuff in there 
> worth studying/dissecting/etc.
>
> Download attachment and drag into TiddlyWiki.com.
>
> It takes a couple of seconds for the tiddler to render because of the 
> large amount of tiddlers and tiddler tags in TiddlyWiki.com
>
> [image: Screenshot 2022-07-11 7.48.36 PM.png]
>

-- 
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/505edfd3-20e2-4233-918d-16577eff5eafn%40googlegroups.com.


[tw5] Re: How to change the color of Tw icons

2022-06-27 Thread Eric Shulman
This will do what you want:
```
@@fill:yellow;{{$:/core/images/tip}}@@
```

enjoy,
-e

On Monday, June 27, 2022 at 9:35:59 AM UTC-7 Juan Palomo wrote:

> Hello everyone.
>
> Is there any way to change the color of TW's system icons? The fact is 
> that I would like to use some icons in a table that I am making instead of 
> text, but I cannot change their original black color.
> I have read that it can be done using CSS, but I would like to know if it 
> can be done in the text of a tiddler in some other way.
> The code that I have tried, and that has not worked for me, is the 
> following: 
>
> <{{$:/core/images/tip}} fill=yellow>
>
> Cheers
>

-- 
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/29d55b6b-756b-4aea-8c8b-458bc3770994n%40googlegroups.com.


[tw5] Re: Tell me, is it possible to make a listing list in the Tiddlywiki field

2022-06-19 Thread Eric Shulman
>From your drawing, it seems that you want a text input field that also 
displays a progressively filtered dropdown list of items that have at least 
a partial match for the current text input.  If this is the case, then my 
TiddlyTools `edit-list` macro (https://tiddlytools.com/edit-list.html) can 
do this.  Something like:
```
<>
```
Where:
* `$:/temp/myinput` is a tiddler to hold your text input
* "...some filter here..." is TiddlyWiki filter syntax for specifying the 
desired list of items to match with
* `find:and` matches list items that have all the keywords entered into the 
text input field
* `focusPopup:yes` shows the dropdown list when the text input has focus
* `listwidth:fit` automatically resizes the dropdown list to fit the width 
of the current list items

enjoy,
-e

-- 
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/dd94c4f0-0cfa-4d92-b28d-3de1397adfaan%40googlegroups.com.


[tw5] Re: Just a reminder: using filters in permalinks

2022-06-12 Thread Eric Shulman
On Sunday, June 12, 2022 at 11:51:35 AM UTC-7 cj.v...@gmail.com wrote:

> Yeah, I can't figure out the code block thing.
> Posting in Google Groups, sometimes the triple-tick marks are needed, 
> sometimes the single-tick marks.
>

For multi-line code blocks, use tripled tick-marks, on separate lines 
before and after the code.
For "inline" code, use single tick-marks, immediately before and after the 
code (on the same line as the code)
 
Thus:
This line contains `inline code content here`,
and
The following lines are in a code block:
```
Lines of code
go here
like this
```

-e

-- 
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/511adaef-1628-490b-b2c7-5cfd75e312a7n%40googlegroups.com.


Re: [tw5] Re: Persistant memo textbox

2022-06-08 Thread Eric Shulman
One more addition.  Put the following at the start of the 
"TiddlerNotesTemplate" definition:
```
<$list filter="[is[tiddler]]">
```
This bypasses displaying the TiddlerNotesTemplate for shadow tiddlers 
(e.g., `$:/AdvancedSearch`), so you can't add notes that will automatically 
convert a shadow tiddler into a "real" tiddler which will prevent it from 
being upgraded when a new TWCore is released.

-e

-- 
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/47217bfc-58f4-4751-b82b-85c27ddafad7n%40googlegroups.com.


Re: [tw5] Re: Persistant memo textbox

2022-06-08 Thread Eric Shulman
I suggest also added a "heading" above the textarea.  Something like this:
```
<$button class="tc-btn-invisible">
   {{$:/core/images/delete-button}}
   <$action-setfield $tiddler=<> $field="notes"/>

''Notes:''
<$macrocall $name="copy-to-clipboard-above-right" src={{!!notes}}/>
<$edit-text tag="textarea" class="tc-edit-texteditor" field="notes"/>
```
Notes:

   - The `$button` widget adds a "trash can" button in the upper left.  
   Pressing this button clears the notes contents and removes the `notes` 
   field from the tiddler.
   - The `copy-to-clipboard-above-right` macro added a "copy to clipboard" 
   button in the upper right. Pressing this button copies the notes contents 
   to the system clipboard for quickly pasting it elsewhere.

enjoy,
-e

-- 
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/a9b0e63e-7cdd-4f5c-a615-eca71113b8c2n%40googlegroups.com.


[tw5] Re: Persistant memo textbox

2022-06-07 Thread Eric Shulman
Try this:

Create a tiddler (e.g. "TiddlerNotesTemplate"), tagged with 
$:/tags/ViewTemplate, containing:
<$edit-text tag="textarea" class="tc-edit-texteditor" field="notes"/>

This will add a multi-line textarea input at the bottom of every tiddler.

enjoy,
-e
On Tuesday, June 7, 2022 at 2:26:59 PM UTC-7 nqc.t...@gmail.com wrote:

> Hello,
>
> Is there a script to have a persistent memo-box/note-pad in a tiddler? I 
> am in need of a box that I can quickly jot down ideas without opening up 
> the tiddly editor. It doesn't need to have text formatting options, just 
> simple text with no markdown. Also, being persistent - I can close the 
> tiddler and open it again and the input text is still there.
>
> I remember there being a thread like this years ago on here. I couldn't 
> find it again.
>
> Thank you.
>

-- 
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/8e31f7c6-4195-40a0-a927-c333c38e0288n%40googlegroups.com.


[tw5] Re: Help.

2022-06-02 Thread Eric Shulman
It looks like you have an incomplete installation of TiddlyMap.

The installation instructions for TiddlyMap 
(see http://tiddlymap.org/#Installation) say:

"Drag *all* the links below into the browser window that contains your 
TiddlyWiki."
`TW5-TiddlyMap (v0.17.8+10010)`
This is the core TiddlyMap plugin.
`TW5-Vis.js (v)`
This plugin will install vis.js which is required for the graph's rendering.
`TW5-HotZone (v0.0.3)`
This plugin is necessary when you want to use the live view.
`TW5-TopStoryView (v0.2.0)`
Unless you are using the zoomin or stacked story view, install this plugin 
to achieve a better live view experience.

Take note of the second item listed above (TW5-Vis.js). In the RSOE ("Red 
Screen Of Embarrassment") that you posted, it indicates:
"Cannot find module named $:/plugins/felixhayashi/vis/vis.js"

Based on this message, I would conclude that you probably didn't "drag all 
the links" as instructed.

-e
On Thursday, June 2, 2022 at 11:44:25 AM UTC-7 ser...@gmail.com wrote:

>

-- 
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/55b81d23-8acf-4fb9-8bc5-b3c474cbed0dn%40googlegroups.com.


[tw5] Re: Filter display of Dictionary List items based on tiddler's field??

2022-05-24 Thread Eric Shulman
One final tweak to the code:
instead of:
```
<$checkbox index=<> checked="1" unchecked="0"/><>
```
I suggest putting the item text within the body of the $checkbox widget, 
like this:
```
<$checkbox index=<> checked="1" unchecked="0"> <> 

```
This allows you to click on the item text to toggle the checkbox.

-e
On Tuesday, May 24, 2022 at 9:12:15 AM UTC-7 David wrote:

> Thanks!
>
> That is perfect!. I think I have several other pages that can enjoy this 
> kind of feature, as well.
>
> On Tuesday, May 24, 2022 at 8:38:12 AM UTC-4 Eric Shulman wrote:
>
>> On Tuesday, May 24, 2022 at 4:36:35 AM UTC-7 David wrote:
>>
>>> ```
>>> <$list 
>>> filter="[indexes[]search:title:literal[Vegas]sort[]]" 
>>> variable=item>
>>> ```
>>>
>> But it seems your code snippet is not working with the variable/field in 
>>> there.  It works fine when I put some static text there, though, as seen in 
>>> my line above.
>>>
>>
>> The problem is due to the surrounding `<$tiddler tiddler="Dictionary 
>> Tiddler">... ` widget.
>> Because of this, the reference to `{!!searchText}` is looking in 
>> "Dictionary Tiddler" for the field contents.
>> One way around this is to remove the `$tiddler` widget and hard-code the 
>> "Dictionary Tiddler" title, like this:
>> ```
>> <$list filter="[[Dictionary 
>> Tiddler]indexes[]search:title:literal{!!searchText}sort[]]" variable=item>
>> <$checkbox tiddler="Dictionary Tiddler" index=<> checked="1" 
>> unchecked="0"/>
>> <>
>> 
>> ```
>> This allows the `{!!searchText}` reference to point to a field in the 
>> tiddler containing the `<$list>` widget, rather than the "Dictionary 
>> Tiddler" itself.
>>
>> However... if the intention is to eventually enable lookups using 
>> different Dictionary Tiddlers, then the following code may be more useful:
>> ```
>> <$edit-text field="searchText"/>
>> <$select field="dictionary">
>>Dictionary Tiddler
>>Another Dictionary
>>Some Other Dictionary
>>etc...
>> 
>> 
>> <$let searchText={{!!searchText}}>
>> <$tiddler tiddler={{!!dictionary}}>
>> <$list 
>> filter="[all[current]indexes[]search:title:literalsort[]]" 
>> variable=item>
>>
>> <$checkbox index=<> checked="1" unchecked="0"/>
>> <>
>> 
>> 
>> 
>> ```
>> Basically, this sets a variable to the value of the searchText field 
>> before using `$tiddler` to change the current tiddler,
>> and then uses the value of that variable in the filter syntax.  It also 
>> lets you select a dictionary tiddler title from a
>> droplist input, and then uses that title in the `$tiddler` widget, so 
>> that the lookup points to another dictionary while
>> still using the searchText input from the current tiddler.
>>
>> enjoy,
>> -e
>>
>

-- 
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/b573c5d5-0049-4964-b267-8b4e4f5d46e7n%40googlegroups.com.


[tw5] Re: Filter display of Dictionary List items based on tiddler's field??

2022-05-24 Thread Eric Shulman
On Tuesday, May 24, 2022 at 4:36:35 AM UTC-7 David wrote:

> ```
> <$list 
> filter="[indexes[]search:title:literal[Vegas]sort[]]" 
> variable=item>
> ```
> But it seems your code snippet is not working with the variable/field in 
> there.  It works fine when I put some static text there, though, as seen in 
> my line above.
>

The problem is due to the surrounding `<$tiddler tiddler="Dictionary 
Tiddler">... ` widget.
Because of this, the reference to `{!!searchText}` is looking in 
"Dictionary Tiddler" for the field contents.
One way around this is to remove the `$tiddler` widget and hard-code the 
"Dictionary Tiddler" title, like this:
```
<$list filter="[[Dictionary 
Tiddler]indexes[]search:title:literal{!!searchText}sort[]]" variable=item>
<$checkbox tiddler="Dictionary Tiddler" index=<> checked="1" 
unchecked="0"/>
<>

```
This allows the `{!!searchText}` reference to point to a field in the 
tiddler containing the `<$list>` widget, rather than the "Dictionary 
Tiddler" itself.

However... if the intention is to eventually enable lookups using different 
Dictionary Tiddlers, then the following code may be more useful:
```
<$edit-text field="searchText"/>
<$select field="dictionary">
   Dictionary Tiddler
   Another Dictionary
   Some Other Dictionary
   etc...


<$let searchText={{!!searchText}}>
<$tiddler tiddler={{!!dictionary}}>
<$list 
filter="[all[current]indexes[]search:title:literalsort[]]" 
variable=item>
<$checkbox index=<> checked="1" unchecked="0"/>
<>



```
Basically, this sets a variable to the value of the searchText field before 
using `$tiddler` to change the current tiddler,
and then uses the value of that variable in the filter syntax.  It also 
lets you select a dictionary tiddler title from a
droplist input, and then uses that title in the `$tiddler` widget, so that 
the lookup points to another dictionary while
still using the searchText input from the current tiddler.

enjoy,
-e

-- 
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/f819aafb-7fc8-452a-ab9c-26b8ca5b7e29n%40googlegroups.com.


[tw5] Re: Filter display of Dictionary List items based on tiddler's field??

2022-05-23 Thread Eric Shulman
On Monday, May 23, 2022 at 6:04:21 PM UTC-7 David wrote:
```
<$list filter="[all[current]indexes[]containssort[]]" 
variable=item>
```

`contains>` is incorrect for two reasons:

* The field reference `!!searchText` should enclosed with curly braces: 
`{!!searchText}`, not angle brackets.  Remember: the delimiters around 
filter operands correspond to the type of operand: square brackets are for 
literal text, angle brackets are for variable names, curly braces are for 
tiddler field references.
* The `contains` operator is used to search within items of a list field.  
To search the items in the current filter input, use the `search:title` 
operator.  Note that, although the input items are actually indexes, for 
the purposes of the `search` operator, they are handled as a list of 
"titles".
* Also note that, while `all[current]` is valid usage here, you could use 
`` instead.  There's no semantic difference, but 
`` is *slightly* more efficient than `all[current]`, since 
it doesn't have to parse the "current" operand to retrieve the tiddler 
title.

Thus, your filter should be:
```
<$list 
filter="[indexes[]search:title:literal{!!searchText}sort[]]" 
variable=item>
```

enjoy,
-e

P.S. I recommend visiting https://talk.tiddlywiki.org/ for a more active 
group in which to ask questions.

-- 
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/103a73be-5fb2-45fa-a0a6-6faa543ee4e8n%40googlegroups.com.


[tw5] Re: Can I save tiddlywiki without re-downloading it?

2022-05-03 Thread Eric Shulman
The default TiddlyWiki saver uses the browser's built-in "download a file" 
process, which includes general security handling to prevent unwanted 
"stealth payloads" from being installed on your system.  One major 
advantage of the "download saver" is that it doesn't require any special 
setup.  This makes it possible to save TiddlyWiki on almost all modern 
browsers, as long as they permit downloading.  Note that in this instance, 
"downloading" also applies when you are viewing a locally-stored TiddlyWiki 
that is already on your computer.

The download saver is also useful because it usually can be configured in 
your browser's settings so that it will always ask you choose where to save 
the file instead of using the default "Downloads" folder location.  When 
the "file/folder chooser" dialog is displayed, if the target filename 
already exists then a number (e.g., "(1)") is automatically added to the 
end of the target filename.  This allows you to ensure that you don't 
unintentionally overwrite your existing TiddlyWiki file without some kind 
of user interaction.  Of course, you can always select the existing 
filename if you ***DO*** want to overwrite it.

This interactive process also makes it easy to save temporary "checkpoint" 
files while you are working.  For example, during a long editing session, 
if I suspect that something I just wrote might "brick" the running 
TiddlyWiki or otherwise corrupt my tiddler content, I will invoke the 
download saver and confirm the save with an auto-numbered filename like 
"myfile.html (1)", "myfile.html (2)", etc...  This can even be triggered 
before I press the "done" button on the tiddler I am currently editing, so 
that there is no chance for my changes to break something.  Then, once the 
current state of my TiddlyWiki is safely saved to disk, I'll press "done" 
to accept the tiddler changes and then proceed to try my new code (usually 
by pressing a button widget to invoke some actions).  If everything goes 
OK, I just continue working.  However, if something goes horribly wrong, I 
can always re-load from my last saved checkpoint file, which still has the 
errant tiddler in "edit mode", so I can hopefully fix my code and try again.

When I am finally satisfied that all my changes are good, I can then invoke 
the download saver again, but this time I select the existing TiddlyWiki 
file so that it is overwritten.  I can then continue working, secure in the 
knowledge that everything is saved as I want it to be.  When I am 
completely done with my work session, I will then go to my system's file 
manager to select and delete all the "checkpoint" files.  If I am being 
extra cautious, I can just move those files to another folder, so that if I 
later discover some previously unnoticed bug in my code (gasp!), I can load 
the old checkpoints one at a time to determine when the errant behavior 
first appeared, and then use a "diff" utility to compare versions and 
identify any suspect changes.

HOWEVER...  having said all that...

Some people find the download saver process to be overly burdensome, and 
prefer a "file save" process that doesn't require any interaction and 
always overwrites the current TiddlyWiki file.  To this end, there are 
numerous add-ons that enable this kind of direct file saving.  Some of 
these add-ons are browser-specific extensions, while others are separate 
"helper" applications that you can install on your system.  
See https://tiddlywiki.com/#GettingStarted and select the appropriate "OS" 
and "Browser" checkboxes for more details.

Hope this helps...

enjoy,
-e
On Tuesday, May 3, 2022 at 8:03:40 AM UTC-7 sugamka...@gmail.com wrote:

> I started using tiddlywiki maybe two hours ago. Its nice but is there any 
> way to save the wiki without redownloading it? I am using edge and am on 
> fedora os. 
>
> I don't want to use any cloud. I want to encrypt it and push it to my 
> github repo.
>
> Sorry if this question has been asked before.
>

-- 
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/b6bae4a8-02e1-4953-8b10-6e5a013748ddn%40googlegroups.com.


[tw5] Re: Shiraz plugin: dynamic table gets search ui

2022-04-15 Thread Eric Shulman
On Thursday, April 14, 2022 at 11:04:08 PM UTC-7 passingby wrote:

> I have both of your tiddlers copied. And as expected the PowerSearch works 
> on its own perfectly. I have also installed the Shiraz plugin and working 
> on its own as well. Then I created another tiddler containing the 
> overriding definitions which you've given here ( I had to change the macro 
> call name to table-dynamic which I assume changed at a later date). I can 
> see that PowerSearch is being called because the result table is shown but 
> I don't have PowerSearch UI. What might I be doing wrong?
>

It's been more than 2 years since I wrote those instructions for 
"overriding definitions".
As you noted, in that intervening time, the Shiraz macro name changed from 
"table-fd" to "table-dynamic".
In addition, the underlying PowerSearch and edit-list code have also been 
extensively re-written and
re-factored several times, so some of those macro names and surrounding 
syntax have changed as well.

Instead of writing:
 

> \import TiddlyTools/FilterGenerators/PowerSearch
>>
>> \define doSearch_showresults()
>> <$macrocall $name=table-fd
>>  filter=<> tblClass=""
>>  fields="tbl-expand title fa fb fc caption tags"
>>  stateTiddler=n
>>  tblCaption="''Table 2. Dynamic table example''"/>
>> \end
>>
>> \define getOptions() 
>>
>> <>
>> <>
>> <$vars
>>   tids={{{ [get[text]]   ~[[tiddlers]]}}}
>>pre={{{ [get[text]]}}}
>>tag={{{ [get[text]]}}}
>>  field={{{ [get[text]] ~[[title,text,tags]] }}}
>>   flag={{{ [get[text]]  ~[[words]]   }}}
>>   term={{{ [get[text]]   }}}
>>   sort={{{ [get[text]]  ~[[title]]   }}}>
>><>
>> 
>>
>  
Try this:
```
\import TiddlyTools/FilterGenerators/PowerSearch
\define doSearch_showresults()
<$macrocall $name=table-dynamic filter=<> tblClass=""
 fields="tbl-expand title fa fb fc caption tags"
 stateTiddler=n tblCaption="''Table 2. Dynamic table example''"/>
\end
<> <>

<>
```
Note: if you also omit the ``, 
then the PowerSearch inputs and the Shiraz output table will appear *side 
by side *(as long as there's enough room for the table)

enjoy,
-e

-- 
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/eb1063c4-7f2c-4377-9f11-6ef71e7a7089n%40googlegroups.com.


[tw5] Re: How can I filter fields that start with a specific string?

2022-04-03 Thread Eric Shulman
Try this:
```
<$list filter="[fields[]prefix[entry]]" 
variable="thisfield">
   <$view field=<>/>

```
enjoy,
-e

On Sunday, April 3, 2022 at 4:05:56 PM UTC-7 thyl...@gmail.com wrote:

> Hi,
> I am trying to view multiple fields that begin with a specific string.
> I am using fields:
> entry 1
> entry 2
> entry 3
> I tried using this method:
> <$view field="entry"/>
> I want to be able to use a method that will view all fields starting with 
> "entry".
> Does anyone know of a way to do this?
>
>

-- 
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/464286de-b50b-4cc0-8a6d-0ad2a21541ccn%40googlegroups.com.


[tw5] Re: [Question] Lists of tiddlers filtered on two columns into a table

2022-03-30 Thread Eric Shulman
Using doubled angle brackets (i.e., `<>`) within a filter is 
definitely not valid syntax, so the filter is most likely just evaluating 
to `[range[1]]`, which would produce just 1 row of table output (as you 
observed).
What version of TiddlyWiki are you using?  The `range[1],` filter 
syntax was introduced in TW5.2.0.
On Wednesday, March 30, 2022 at 8:17:25 AM UTC-7 arm...@gmail.com wrote:

> @Eric,
>
> I've modified  <$list filter="[range[1], by  <$list 
> filter="[range[1],<>, and the first row appears correctly with Tid_A 
> (tagged a) on the first column and Tid_B (tagged b) on the second column !
> But no more row for the moment...
>
> Le mercredi 30 mars 2022 à 17:08:11 UTC+2, arm...@gmail.com a écrit :
>
>> @Eric,
>>
>> Variables contents seams to be good:
>>
>> LIST A=TidA TidC
>> LIST B=TidB TidD TidE
>> ROWS=3
>>
>> But the table still empty
>>
>> Le mercredi 30 mars 2022 à 16:58:15 UTC+2, Eric Shulman a écrit :
>>
>>> On Wednesday, March 30, 2022 at 7:44:07 AM UTC-7 arm...@gmail.com wrote:
>>>
>>>> Thanks also for your code and notes for my understanding!
>>>> When I try it, I only see the table header "a | b" but no rows after 
>>>> that.
>>>> Is there a way to debug what is in the "rows" variable ?
>>>>
>>>
>>> Just before the `` element, add:
>>> ```
>>> LIST A=<>
>>> LIST B=<>
>>> ROWS=<>
>>> ```
>>>
>>>
>>>

-- 
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/aad494ee-f19a-4b11-92d2-2aba59f7160fn%40googlegroups.com.


[tw5] Re: [Question] Lists of tiddlers filtered on two columns into a table

2022-03-30 Thread Eric Shulman
On Wednesday, March 30, 2022 at 7:44:07 AM UTC-7 arm...@gmail.com wrote:

> Thanks also for your code and notes for my understanding!
> When I try it, I only see the table header "a | b" but no rows after that.
> Is there a way to debug what is in the "rows" variable ?
>

Just before the `` element, add:
```
LIST A=<>
LIST B=<>
ROWS=<>
```


-- 
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/880efa8e-de67-493c-afb7-72624c0f4adan%40googlegroups.com.


[tw5] Re: [Question] Lists of tiddlers filtered on two columns into a table

2022-03-30 Thread Eric Shulman
Give this a try:
```
<$set  name="A" filter="[tag[a]!is[system]sort[title]]">
<$set  name="B" filter="[tag[b]!is[system]sort[title]] -[enlist]">
<$vars rows={{{ [enlistcount[]] [enlistcount[]] +[maxall[]] }}}>

   ab
   <$list filter="[range[1],]" variable=row>
  
 <$link to={{{ [enlistnth] }}}/>
 <$link to={{{ [enlistnth] }}}/>
  
   




```
Notes:
* The first two `<$set>` widgets get the two lists of tagged items.  Note 
how the second list (`B`) excludes any items that are already in list `A`.
* The `<$vars>` widget finds the length of the longer list, which will be 
the number of rows in the output table.
* The `<$list>` widget defines a loop that sets the row number, 1 to N
* Then, for each row, we output the nth item in each list

enjoy,
-e
On Wednesday, March 30, 2022 at 3:00:55 AM UTC-7 arm...@gmail.com wrote:

> Hi,
>
> I am stuck on a basic question and would like to know your point of view.
>
> What would be your approach to create an html table with two columns, the 
> first to list all tiddlers labelled with "a" and the second to list all 
> tiddlers labelled with "b", but that each tidler only appears once and is 
> not duplicated?
>
> I started with this code but evidently it doesn't work as I would like. If 
> i have two tiddlers tagged with "a" and a tidller tagged with "b",  the 
> tiddler tagged with "b" so appears on the first and on the second row.
>
> ```
> 
> Tag_aTag_b
> <$list filter="[!is[system]tag[a]sort[title]]" variable="taga">
> <$list filter="[!is[system]tag[b]sort[title]]" variable="tagb">
> 
> <$link to=<<$link to=
> 
> 
> 
> 
> ```
> Any help would be appreciated, thank you !
>

-- 
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/3f1ed121-fc84-4609-be76-e82084742c19n%40googlegroups.com.


[tw5] Re: How to transclude a list and modify its indentation level automatically to match the destination tiddler indentation level

2022-03-23 Thread Eric Shulman
First, you'll need to use the `<$transclude>` widget with optional 
parameter `mode=block`.  This will allow the transclusion to properly 
handle the bullet items contained in the transcluded tiddler.

Then, to insert the transcluded bullet items at a level below the current 
level, you'lll need to put the `<$transclude>` widget on the same line as 
the item that is it's "parent" in the target bullet list.

Like this:
```
* Foo
* Bar
* Baz
** Mumble
** Frotz <$transclude tiddler="A" mode=block/>
** Gronk
```

The result should look like this:

   - Foo
   - Bar
   - Baz
  - Mumble
  - Frotz
 - this
 - that
  - Gronk
   
enjoy,
-e
On Wednesday, March 23, 2022 at 2:05:15 AM UTC-7 Eric N wrote:

> Hi,
>
> I have a list in a tiddler A, and I want to transclude it into a tiddler B 
> while adapting the list indentation to the level where it is inserted in B.
>
> Say A is:
>
> ** this*
> ** that*
>
> And B is:
>
> ** 1*
> ** 2*
> ** 3*
> *** 3.1*
> *** 3.2*
>
> Then I want to type a command in B:
>
> ** 1*
> ** 2*
> ** 3*
> *** 3.1*
> *INSERT_WITH_INDENT(A)*
> *** 3.2*
>
> In order to obtain:
>
> ** 1*
> ** 2*
> ** 3*
> *** 3.1*
>
>  this*
>  that*
> *** 3.2*
>
> And not what a standard transclusion with *{{A}}* would give:
>
>
> ** 1*
> ** 2*
> ** 3*
> *** 3.1*
>
> ** this*
> ** that*
> *** 3.2*
>
> Does it make sense ? Any idea how to do it ?
>
> For info, I work with lists a lot, and I'd like to reuse information 
> without copy pasting, and the places I want to reuse a given list are lists 
> themselves, however with different indentation levels.
>
> Best,
> Eric
>

-- 
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/37340862-c305-43b3-be06-7c1c4741a7e0n%40googlegroups.com.


[tw5] Re: Scaling shown pdfs?

2022-02-25 Thread Eric Shulman
Here's a little macro that I've been working on.  It handles both 
internally-stored (base64 encoded data URIs) and externally-stored (using 
_canonical_uri) PDFs.  It uses URL parameters to omit the default PDF 
viewer's toolbar, and can also automatically scroll to a specified page 
within the PDF:
```
\define PDF(tid,page,suffix)
<$vars hdr={{{ [[data:]] [[$tid$]get[type]] [[;base64,]] +[join[]] }}}>
<$vars arg="#toolbar=0=$page$&$suffix$">
<$vars src={{{ [[$tid$]get[_canonical_uri]] 
~[[$tid$]get[text]addprefix] [] +[join[]] }}}>
<$vars sty="border:0;width:100%;height:100%;">
> style=<>>
   > style=<>/>

\end
```
To set the desired display size, enclose the `<>` macro inside a 
`` using a style attribute to specify the width and height.

For example, to show a regular page size, you can write:
`<>`
or, to scale it down to half size:
`<>`
or, as a thumbnail:
`<>`

Here's some documentation from Adobe about using URL parameters for opening 
PDF files:
https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf

enjoy,
-e
On Friday, February 25, 2022 at 4:36:52 AM UTC-8 Petri M. wrote:

> Works great! Thank you!
>
> -Petri
>
> On Friday, February 25, 2022 at 2:24:24 PM UTC+2 ser...@gmail.com wrote:
>
>>
>> > height="540px">
>> Em quinta-feira, 24 de fevereiro de 2022 às 18:46:14 UTC-3, Sergio Rolim 
>> escreveu:
>>
>>> https://groups.google.com/g/tiddlywiki/c/TylT-kCvfTk/m/qiz5B4-zDAAJ
>>>
>>> Em quinta-feira, 24 de fevereiro de 2022 às 08:07:20 UTC-3, Petri M. 
>>> escreveu:
>>>

 I just added a pdf as an external image with _canonical_uri and 
 everything works fine, but the pdf is quite large and it is very hard to 
 read from the small pdf viewer because I use two column system. I thought 
 about opening the tiddler in an external window but for some reason the 
 pdf 
 only get *smaller *and is entirely impossible to read.

 Can I scale the pdf zoom and perhaps put it in landscape mode or 
 something? I guess it is being handled by adobe pdf reader. Or maybe fix 
 the opening as a new window?

 I mean look at this, can't really do anything with this:

 [image: Screenshot 2022-02-24 130417.png]

>>>

-- 
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/0173c7f5-0711-49e8-a603-bba402666958n%40googlegroups.com.


[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
1. `<__txt__>` is a *parameter reference* syntax that can only be used 
within macro definitions.  It is similar to `$txt$`, which is a reference 
to the value of the `txt` macro parameter passed into the macro.  However, 
while occurances of `$txt$` are automatically replaced by the value passed 
into the macro when the macro's content is returned, `<__txt__>` is handled *as 
if it was a variable*, and is only evaluated when the macro content is 
subsequently parsed by within the calling syntax. It is a shorthand 
equivalent to:

```
\define macroname(param)
<$vars param="$param$">
   ... references to <> (or  if used within a filter) ...
   etc.

\end
```

2. `splitregexp[...]` is a *filter operator* and is similar to the 
`split[...]` filter operator.  Note that both `split[..]` and 
`splitregexp[...]` find and remove instances of the filter operand value, 
producing multiple filter items as a result, which are then available for 
further processing by the filter syntax.  The difference is that 
`splitregexp[...]` accepts *regular expressions* as the value of the filter 
operand, while `split[...]` only accepts *literal text*.  In this instance, 
`splitregexp[\n]` is being used to "split the input (the value of 
`<__txt__>`) into separate values by matching (and removing) any `newline` 
characters.  Each resulting line of text is then assigned to the `line` 
variable so it can be referenced in the body of the `<$list>...` 
widget, where it is then output, enclosed within `...`, in order 
to produce the final result of having separate child elements for each 
line, so that the `nth-child(...)` CSS rule can be applied.

-e

On Sunday, February 20, 2022 at 5:44:29 PM UTC-8 justin.hu...@gmail.com 
wrote:

> That works! 
>
> I can generally grasp how this works, though I'm not familiar with 
> <__txt__>splitregexp[\n]]
>
> the only time I've seen \n is to create a new line in python, is it doing 
> the same here?
>
>
>
> On Sunday, February 20, 2022 at 8:15:49 PM UTC-5 Eric Shulman wrote:
>
>> If the content of your `` is stored in a separate tiddler or field, 
>> you can force the creation of child `` elements, so that 
>> `nth-child(even)` can be applied successfully.
>>
>> Give this a try:
>> ```
>> \define nthchild(txt,bg:"lightgray")
>> \whitespace trim
>>  .myClass div:nth-child(even) { background:$bg$; } 
>> 
>><$list filter="[<__txt__>splitregexp[\n]]" variable="line">
>><$text text=<>/>
>>
>> 
>> \end
>>
>> <$macrocall $name="nthchild" txt={{test}} bg="powderblue"/>
>> ```
>>
>> where the text content is stored in a tiddler named "test".
>>
>> -e
>> On Sunday, February 20, 2022 at 4:46:32 PM UTC-8 justin.hu...@gmail.com 
>> wrote:
>>
>>> Ah, well- that's a bummer haha
>>>
>>> Thank you!
>>> On Sunday, February 20, 2022 at 7:30:21 PM UTC-5 Eric Shulman wrote:
>>>
>>>> Although HTML `` elements can display multiple lines of text, each 
>>>> line is not a separate child element.
>>>> Thus, a CSS rule such as `nth-child(even)` doesn't have any effect 
>>>> within the `` element.
>>>>
>>>> -e
>>>> On Sunday, February 20, 2022 at 4:13:04 PM UTC-8 justin.hu...@gmail.com 
>>>> wrote:
>>>>
>>>>> Hello all, title says it all.
>>>>>
>>>>> When trying to apply nth-child(even) to use a background color for 
>>>>> each line when using  in my tiddlers, it doesn't seem to work, and 
>>>>> I'm 
>>>>> not entirely sure whats causing this.
>>>>>
>>>>> Any suggestions?
>>>>>
>>>>

-- 
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/998c0f3d-feb2-4210-a29f-eec8a96c27c4n%40googlegroups.com.


[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
If the content of your `` is stored in a separate tiddler or field, 
you can force the creation of child `` elements, so that 
`nth-child(even)` can be applied successfully.

Give this a try:
```
\define nthchild(txt,bg:"lightgray")
\whitespace trim
 .myClass div:nth-child(even) { background:$bg$; } 

   <$list filter="[<__txt__>splitregexp[\n]]" variable="line">
   <$text text=<>/>
   

\end

<$macrocall $name="nthchild" txt={{test}} bg="powderblue"/>
```

where the text content is stored in a tiddler named "test".

-e
On Sunday, February 20, 2022 at 4:46:32 PM UTC-8 justin.hu...@gmail.com 
wrote:

> Ah, well- that's a bummer haha
>
> Thank you!
> On Sunday, February 20, 2022 at 7:30:21 PM UTC-5 Eric Shulman wrote:
>
>> Although HTML `` elements can display multiple lines of text, each 
>> line is not a separate child element.
>> Thus, a CSS rule such as `nth-child(even)` doesn't have any effect within 
>> the `` element.
>>
>> -e
>> On Sunday, February 20, 2022 at 4:13:04 PM UTC-8 justin.hu...@gmail.com 
>> wrote:
>>
>>> Hello all, title says it all.
>>>
>>> When trying to apply nth-child(even) to use a background color for each 
>>> line when using  in my tiddlers, it doesn't seem to work, and I'm not 
>>> entirely sure whats causing this.
>>>
>>> Any suggestions?
>>>
>>

-- 
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/a6d7384e-bca3-4dae-be45-7f982d6b70b0n%40googlegroups.com.


[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
Although HTML `` elements can display multiple lines of text, each 
line is not a separate child element.
Thus, a CSS rule such as `nth-child(even)` doesn't have any effect within 
the `` element.

-e
On Sunday, February 20, 2022 at 4:13:04 PM UTC-8 justin.hu...@gmail.com 
wrote:

> Hello all, title says it all.
>
> When trying to apply nth-child(even) to use a background color for each 
> line when using  in my tiddlers, it doesn't seem to work, and I'm not 
> entirely sure whats causing this.
>
> Any suggestions?
>

-- 
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/3552f609-86ba-4623-83bc-d8af5160aa58n%40googlegroups.com.


[tw5] Re: TW-Enhanced BAM Programming: TW for GUI and storage, BASIC for processing

2022-02-19 Thread Eric Shulman
Charlie,

To format code examples so they are viewable 
on https://talk.tiddlywiki.org/,
enclose the code portion of your post inside *triple backticks placed on 
separate lines*
*immediately before and after the code*, like this:

```
this content will appear as a code block
when viewed on https://talk.tiddlywiki.org/
```

-e



On Saturday, February 19, 2022 at 8:03:38 PM UTC-8 cj.v...@gmail.com wrote:

> This post might be better viewed in Google Groups 
> .
>
> Below:  BASIC program source code, Tiddler's TW code, and finally a sample 
> image.
>
> *BASIC program:*
>
> `Screen 21 ' main_program_start: gosub init_vals gosub drawbackground 
> gosub drawbackgroundlines gosub drawsun gosub drawforegroundlines do while 
> true sleep 1 action$ = GetLocalStorageItem("Sunshine_Action") if action$ <> 
> "" then if action$ = "DrawBackground" then gosub drawbackground elseif 
> action$ = "DrawBackgroundLines" then gosub drawbackgroundlines elseif 
> action$ = "DrawSun" then gosub drawsun elseif action$ = 
> "DrawForegroundLines" then gosub drawforegroundlines end if 
> SetLocalStorageItem("Sunshine_Action", "" ) end if loop end ' init_vals: s 
> = 0.0625 SetLocalStorageItem("Sunshine_BackgroundColor", "0xdd") 
> SetLocalStorageItem("Sunshine_BackgroundLinesColor", "0xffcc33") 
> SetLocalStorageItem("Sunshine_SunColor", "0xff") 
> SetLocalStorageItem("Sunshine_ForegroundLinesColor", "0xffcc33") return 
> drawbackground: backgroundColor = 
> val(GetLocalStorageItem("Sunshine_BackgroundColor")) line(0,0)-(1280, 
> 1024), backgroundColor, BF sleep s return drawbackgroundlines: 
> backgroundLinesColor = 
> val(GetLocalStorageItem("Sunshine_BackgroundLinesColor")) for y = 0 to 1000 
> step 10 for x = 0 to 1300 step 15 line (0,0) - (x,y), backgroundLinesColor 
> next x sleep s next y return drawsun: circle (100,100), 200, , , , 
> ,F sunColor = val(GetLocalStorageItem("Sunshine_SunColor")) circle 
> (100,100), 200, sunColor, , , ,F sleep s return drawforegroundlines: 
> backgroundLinesColor = 
> val(GetLocalStorageItem("Sunshine_ForegroundLinesColor")) for y = 0 to 1000 
> step 40 for x = 0 to 1300 step 60 line (0,0) - (x,y), backgroundLinesColor 
> next x sleep s next y return`
>
> *Tiddler:*
>
> `\define my-actions(do_this)
> <$macrocall $name=SetLocalStorageItem k=Sunshine_Action v=$do_this$/>
> \end
>
> * Notes
> ** First, start the BASIC program by clicking on the console below
> *** The BASIC program will draw the default image, then wait for your 
> instructions
> ** In Settings and Controls below, adjust colors of the four different 
> layers, pressing draw the draw button for each layer in whatever order you 
> like, knowing that whatever is drawn in each layer will overwrite whatever 
> is in the are of that layers
>
> Settings and Controls
> Background
>
> <$edit-text tiddler="$:/temp/Sunshine_App/background" field="color" 
> type="color" default="#dd" inputActions="<$macrocall 
> $name=SetLocalStorageItem k=Sunshine_BackgroundColor v={{{ 
> [[$:/temp/Sunshine_App/background]get[color]search-replace[#],[0x]] }}}/>"/>
> <$button actions=<> >
> Draw Background
> 
>
> 
> Background Lines
>
> <$edit-text tiddler="$:/temp/Sunshine_App/backgroundlines" field="color" 
> type="color" default="#ffcc33" inputActions="<$macrocall 
> $name=SetLocalStorageItem k=Sunshine_BackgroundLinesColor v={{{ 
> [[$:/temp/Sunshine_App/backgroundlines]get[color]search-replace[#],[0x]] 
> }}}/>"/>
> <$button actions=<> >
> Draw Background Lines
> 
>
> 
> Circle
>
> <$edit-text tiddler="$:/temp/Sunshine_App/sun" field="color" type="color" 
> default="#ff" inputActions="<$macrocall $name=SetLocalStorageItem 
> k=Sunshine_SunColor v={{{ 
> [[$:/temp/Sunshine_App/sun]get[color]search-replace[#],[0x]] }}}/>"/>
> <$button actions=<> >
> Draw Circle
> 
>
> 
> Foreground Lines
>
> <$edit-text tiddler="$:/temp/Sunshine_App/foregroundlines" field="color" 
> type="color" default="#ffcc33" inputActions="<$macrocall 
> $name=SetLocalStorageItem k=Sunshine_ForegroundLinesColor v={{{ 
> [[$:/temp/Sunshine_App/foregroundlines]get[color]search-replace[#],[0x]] 
> }}}/>"/>
> <$button actions=<> >
> Draw Foreground Lines
> 
>
> 
> 
>
>
> 
> <$tiddler tiddler={{Sunshine.BAS!!title}}>
> {{ ||Basic Console Window Template }}
> 
> `
>
> *Image created by the BASIC program, adjusted with the colors specified 
> with TiddlyWiki widgets:*
>
> [image: BlueSunshine.png]
>
> On Saturday, February 19, 2022 at 11:39:57 PM UTC-4 Charlie Veniot wrote:
>
>> This new sample showcases TiddlyWiki providing the GUI to interact with a 
>> running BASIC programming.
>>
>> So one-way (TiddlyWiki to BASIC) sharing/communication.
>>
>> Give the Sunshine Application 
>> 
>>  
>> a try.  Nothing fancy, just proof-in-the-pudding concept.
>>
>

-- 
You received this message because you are subscribed to the Google 

[tw5] Re: Custom export formats: TiddlyWiki available for study

2022-02-16 Thread Eric Shulman
On Wednesday, February 16, 2022 at 1:31:27 PM UTC-8 cj.v...@gmail.com wrote:

> ...some kind of trigger needs to be setup in TiddlyWiki to check local 
> storage (a manual trigger would involve a human pressing a button; an 
> automated trigger would involve some kind of timer in TiddlyWiki to trigger 
> check of local storage and retrieving values from local storage.)
>

You can use 
https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2Faction-timeout.js 
to set up an automatic periodic trigger to perform actions.

To do this, you would create a tiddler, tagged with 
`$:/tags/StartupAction/Browser`, containing something like this:
```
\define myActions()
... action widgets to check local storage and retrieve values goes here ...
\end
<$action-timeout interval="1000" actions=<> />
```

enjoy,
-e

-- 
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/f57e9140-f5c7-4510-9397-9b5fe6c3e8d4n%40googlegroups.com.


[tw5] Re: Adding duplicate title in title list

2022-02-16 Thread Eric Shulman
Answer to question #1:

By default, titles resulting from a filter are only listed once, with the 
last instance of a given title "dominantly appended" to the list (i.e., 
duplicates are removed).  Thus, in your example, adding `[[foo]]` to the 
end of the list automatically removed the first instance of `foo` from the 
front of the list.  You've already discovered the use of the `:raw` suffix 
for the `enlist-input` operator, which prevents duplicates from being 
removed when you enlist an existing space-separated list.  Another bit of 
filter syntax that helps with preserving duplicates is the "=" prefix on a 
filter run.  To get the results you expected, you would write: `[[foo foo 
foo bar]enlist-input:raw[]] =[[foo]]`.

Answer to question #2:

As you noted in your followup message, you have an existing list stored in 
a tiddler field called `fieldName`.  Let's assume this field contains 4 
items: `foo [[bar baz]] mumble [[frotz gronk snork]]` (where the 2nd and 
4th items contain spaces).  To add an item to that list, you would write 
something like this:: `[get[fieldName]enlist-input:raw[]] 
=[]`.  Note also that using `` in your filter 
is *slightly* more efficient than `all[current]`, since the `all[]` 
operator first needs to parse the operand (`current`) to determine that you 
want to retrieve the current tiddler's title, while `` 
directly retrieves the title without the added internal layer of parsing.

enjoy,
-e
On Wednesday, February 16, 2022 at 2:17:51 PM UTC-8 andres@gmail.com 
wrote:

> Ok, so I have the following list:
>
> foo foo foo bar
>
> I then want to append 'foo' to the end of that list such that I wind up 
> with:
>
> foo foo foo bar foo
>
> So I try the following filter:
>
> [[foo foo foo bar]enlist-input:raw[]] [[foo]]
>
> That results in:
>
> foo foo bar foo
>
> This is unexpected to me, which means that there is something I don't 
> understand.
>
> So I have two questions:
>
> 1. Why is the title not appended as I expected?
> 2. How can I get the result I want? To add complexity (cause why not?), 
> the list will be generated dynamically based on user input, titles will 
> only sometimes be of existing tiddlers, and the titles can have spaces xD.
>

-- 
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/dff8b409-b0bc-4f67-b436-582bb2265f1fn%40googlegroups.com.


[tw5] Re: Adding Meta Tag to Head Section

2022-02-10 Thread Eric Shulman
1. Create a tiddler tagged with $:/tags/RawMarkup 

2. Enter your meta tag syntax in the text field
3. Press "done" button to finish editing
4. Save-and-reload your TiddlyWiki

enjoy,
-e



On Thursday, February 10, 2022 at 12:14:53 PM UTC-8 rpayn...@gmail.com 
wrote:

> Hello all,
>
> Can anyone tell me where or how I would be able to add a Meta tag element 
> to the header section of the Tiddlywiki HTML file?
>
> Any help is greatly appreciated.
>

-- 
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/6e3e880c-b828-4cf3-bdf4-5ce58695459en%40googlegroups.com.


[tw5] Re: How to link to file using relative path?

2022-01-25 Thread Eric Shulman
On Tuesday, January 25, 2022 at 11:03:58 PM UTC-8 reinhard...@gmail.com 
wrote:

> Is there a way to edit one's own posts?
>

Editing your own posts is one of the many features that GoogleGroups has 
*REMOVED* from their interface.  This steady "decay" in utility of the 
GoogleGroups interface has led to the creation of an alternative 
Discourse-based server -- https://talk.tiddlywiki.org/ -- that provides a 
much richer set of tools.  Many people (though not all) have migrated to 
using that system as their primary means for engaging with others in the 
TiddlyWiki community.

-e




 

-- 
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/27277211-2a41-46f2-abc4-82825f3daa38n%40googlegroups.com.


[tw5] Re: Dynamic class

2022-01-23 Thread Eric Shulman
Remove the quotes around `"""<>"""`.  Like this:
```
<$macrocall $name="tabs" tabsList="""[tag[$tName$]nsort[order]]""" 
class=<> />

<$macrocall $name="testFunction" alignmentTabs=<> 
tName="""$tName$""" />

```
On Sunday, January 23, 2022 at 1:29:55 AM UTC-8 thomas.sch...@gmail.com 
wrote:

> Hello Marc
> I tested this only the last Test shows the Tabs Vertical
> Thanks for your help.
>
> ```
> \define testFunction(alignmentTabs:"", tName:"" )
> Second Test: <>,$alignmentTabs$
>
> <$macrocall $name="tabs" tabsList="[tag[$tName$]nsort[order]]" 
> class="""$alignmentTabs$""" />
>
> \end
>
> \define dynamicTabs(current:"", tName:"" )
>
> <$set name="alignmentTabs" value="tc-vertical" >
> First Test: <>,$alignmentTabs$
>
> <$macrocall $name="tabs" tabsList="""[tag[$tName$]nsort[order]]""" 
> class="""<>""" />
> 
> <$macrocall $name="testFunction" alignmentTabs="""<>""" 
> tName="""$tName$""" />
> 
>
> Last Test:
> <$macrocall $name="tabs" tabsList="""[tag[$tName$]nsort[order]]""" 
> class="tc-vertical" />
> 
> ''
> \end
>
> <$macrocall $name="dynamicTabs" current=<> 
> tName="TableOfContents"/>
> ```
>

-- 
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/59e9c179-1947-406b-93f5-174d8d1cb51an%40googlegroups.com.


[tw5] Re: Strange List Issue with list-links

2022-01-18 Thread Eric Shulman
Here's your code that doesn't work:
```
\define listtitle() ''Books by $(currentTiddler)$''
\define filter() "[tag[$(currentTiddler)$]tag[Book]]"

<$list filter=<> variable="_"> < 

<>
```

Here's what's wrong:
1) There is a missing `>` at the end of `<`.  As a result, the 
macro call isn't closed until the final `>>` at the end of the code.  All 
the content between the error and the ending `>>` are treated as parameters 
to the macro.
2) The `$(variablename)$` syntax is only parsed when it occurs *within a 
macro*.  Thus, `"[tag[$(currentTiddler)$]tag[Book]"` is actually looking 
for a literal tag value of `$(currentTiddler)$`.
3) You don't need the double-quotes around the content of `\define filter() 
"..."`.
4) If there are multiple Book tiddlers for the current Author, your 
`<$list>` widget (with the correction for the missing `>`) would display 
the `<>` text multiple times, once for each matching Book 
tiddler.
5) You don't actually need to use `$(currentTiddler)$` anywhere in the 
above code... `<>` (or `` within a filter) 
is sufficient.  In fact, you don't need to use any macros at all.

Here's some corrected/simplified code:
```
<$list filter="[tagtag[Book]limit[1]]" variable="_">''Books 
by <>''

>
```

Notes:
1) The filter for the heading uses `limit[1]` so that the heading text is 
only displayed once, regardless of how many matching Book tiddlers are 
found.

enjoy,
-e
On Tuesday, January 18, 2022 at 12:54:41 AM UTC-8 reinhard...@gmail.com 
wrote:

> In the attached TiddlyWiki I describe a strange issue with 'list-links'. I 
> don't know if this is an error or I just missed something. 
>

-- 
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/7acf2688-7541-4ab0-a2a9-817ecb15bb7bn%40googlegroups.com.


[tw5] Re: Clickable fields in the 'Fields' tab of the info button

2022-01-15 Thread Eric Shulman
The "Fields" tab content is defined in:  $:/core/ui/TiddlerFieldTemplate, 
which contains:
```
  <$text 
text=<>/>   <$view 
field=<>/>  
```

If you change `<$view field=<>/>` to `<$transclude 
field=<>/>`
then the display of the field contents will be "wikified".

This will cause any WikiWords contained in the field values to be rendered 
as tiddler links,
and any text starting with "http://;, "https://;, etc. will be rendered as 
external links.

enjoy,
-e

-- 
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/198402be-1368-4bf0-b179-4776be97fc36n%40googlegroups.com.


[tw5] Re: Possible bug in list-links macro

2022-01-14 Thread Eric Shulman
On Friday, January 14, 2022 at 6:26:11 AM UTC-8 PMario wrote:

> On Friday, January 14, 2022 at 1:24:16 PM UTC+1 Eric Shulman wrote:
> ...
>
>> However, `<>` is a merely a "convenience" macro for 
>> outputting a bullet list of links.
>> If you want a more specific behavior, you should use the `<$list>` widget 
>> directly, like this:
>>
>
> As  Eric pointed out `<>` is a convenience macro ... and it is 
> really "old" code, where the transclusion "title-fallback" code was the 
> only possibility we had. 
> With version 5.2.1 we do have a lot more possibilities to create "filtered 
> logic" ... IMO the solution is relatively simple.
> We would need to redefine the list-links macro a little bit. See the new 
> `<$set name="field-name" ...` instructions.
>

Actually, the change to `<>` can be even simpler...

Just replace the `<$transclude>` widget with the `<$view>` widget, like 
this:
```
<$view field="caption"> <$view field="title"/> 
```
The reason why this works is that, unlike `<$transclude field="caption">`,  
`<$view 
field="caption">` applies its fallback content if "the field or property is 
missing *or empty*."

However, neither suggested core change would actually address Reinhard's 
stated use-case, which is:
"...*to always display the title, rather than the caption."*

-e

-- 
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/b1f04b29-be6d-404a-a9d6-0aa711d930c4n%40googlegroups.com.


[tw5] Re: Possible bug in list-links macro

2022-01-14 Thread Eric Shulman
The behavior you describe (showing the tiddler's caption field if present, 
even if blank)
is specifically described in the macro documentation (see 
https://tiddlywiki.com/#list-links%20Macro).

However, `<>` is a merely a "convenience" macro for outputting 
a bullet list of links.
If you want a more specific behavior, you should use the `<$list>` widget 
directly, like this:
```
<$list filter="...your filter here..."><$link/>
```
enjoy,
-e

-- 
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/398abd59-6d9b-455e-b164-adbfa31a010cn%40googlegroups.com.


[tw5] Re: export tiddler automatically

2021-12-30 Thread Eric Shulman
Another update  to TiddlyTools/Time/AutoSaver...

added "export changes" setting and handler:
- saves all tiddlers that have changed since the TiddlyWiki was loaded, 
except for the following tiddlers:
`[prefix[$:/boot]] [[$:/build]] [[$:/core]] [[$:/HistoryList]] 
[[$:/Import]] [[$:/library/sjcl.js]] [[$:/StoryList]] 
[[$:/temp/info-plugin]] and [prefix[$:/temp/time]]`
- default filename/format is "changes.json"

Get the update here: TiddlyTools/Time/AutoSaver 
<https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FAutoSaver>

-e
On Thursday, December 30, 2021 at 5:10:22 PM UTC-8 Eric Shulman wrote:

> On Thursday, December 30, 2021 at 4:45:06 PM UTC-8 mohamed...@hotmail.com 
> wrote:
>
>> thank you very much Eric
>>
>
> I just posted an update to TiddlyTools/Time/AutoSaver:
>
> * improved "settings" popup interface (better layout and "reset" handling 
> for defaults)
> * added startup() macro and $:/tags/StartupAction/Browser so countdown 
> duration is initialized when file is loaded
>
> Get the update here: TiddlyTools/Time/AutoSaver 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FAutoSaver>
>
> -e
>

-- 
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/ab8e59d8-0127-4485-8f03-e7b5c2417199n%40googlegroups.com.


[tw5] Re: export tiddler automatically

2021-12-30 Thread Eric Shulman
On Thursday, December 30, 2021 at 4:45:06 PM UTC-8 mohamed...@hotmail.com 
wrote:

> thank you very much Eric
>

I just posted an update to TiddlyTools/Time/AutoSaver:

* improved "settings" popup interface (better layout and "reset" handling 
for defaults)
* added startup() macro and $:/tags/StartupAction/Browser so countdown 
duration is initialized when file is loaded

Get the update here: TiddlyTools/Time/AutoSaver 


-e

-- 
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/bc736e16-524b-4512-99fb-466b2a56e064n%40googlegroups.com.


[tw5] Re: export tiddler automatically

2021-12-30 Thread Eric Shulman
Addendum:
After you press "apply" to set the countdown timer, you will need to press 
"start" to actually start the countdown.
Note that after the autosave is triggered, the countdown timer 
automatically resets and starts counting down again.
You can press "pause" to suspend the current countdown, or "stop" to halt 
the countdown.

-e

On Thursday, December 30, 2021 at 10:00:26 AM UTC-8 Eric Shulman wrote:

> On Wednesday, December 29, 2021 at 2:39:23 PM UTC-8 mohamed...@hotmail.com 
> wrote:
>
>> Is there  way to export a particular tiddler automatically, so as in some 
>> scheduled task in the background, that lets say every 30 minutes would 
>> trigger a command to export a specific tiddler in a particular local
>>
>
> TiddlyTools/Time/AutoSaver 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FAutoSaver>
>
> *Displays a countdown timer in the SideBar that triggers a periodic "file 
> save" and/or "export tiddlers" action.*
> Requires: TiddlyTools/Time/CountDown 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FCountDown>, 
> TiddlyTools/Time/Ticker 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FTicker>, 
> TiddlyTools/Time/action-timeout.js 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2Faction-timeout.js>
> Optional: TiddlyTools/Time/Setup 
> <https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FSetup>, 
> $:/config/TiddlyTools/Time 
> <https://tiddlytools.com/timer.html#%24%3A%2Fconfig%2FTiddlyTools%2FTime>
>
> Copy the above tiddlers into your document and then save-and-reload (so 
> the action-timeout widget is defined).  The AutoSaver interface is 
> automatically added to the Sidebar.
>
> From the sidebar, press the AutoSaver "gear" button to open a settings 
> popup.  Clear the "save the file" checkbox if you don't want to autosave 
> the entire file and check the "export tiddlers" checkbox, then select the 
> desired tiddler titles from the listbox (use ctrl-click and/or shift-click 
> to select multiple tiddler titles).  The default output file will be named 
> "tiddlers.json".
>
> Press the "apply" button to set the countdown timer (default is 30 
> minutes).  When the timer reaches zero, you will be ask to confirm "OK to 
> autosave?"  Then press "save" to initiate the "export tiddlers" action.
>
> enjoy,
>
> -e
>

-- 
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/5b40c20f-42cd-46fc-95fe-e4941879cbbcn%40googlegroups.com.


[tw5] Re: export tiddler automatically

2021-12-30 Thread Eric Shulman
On Wednesday, December 29, 2021 at 2:39:23 PM UTC-8 mohamed...@hotmail.com 
wrote:

> Is there  way to export a particular tiddler automatically, so as in some 
> scheduled task in the background, that lets say every 30 minutes would 
> trigger a command to export a specific tiddler in a particular local
>

TiddlyTools/Time/AutoSaver 


*Displays a countdown timer in the SideBar that triggers a periodic "file 
save" and/or "export tiddlers" action.*
Requires: TiddlyTools/Time/CountDown 
, 
TiddlyTools/Time/Ticker 
, 
TiddlyTools/Time/action-timeout.js 

Optional: TiddlyTools/Time/Setup 
, 
$:/config/TiddlyTools/Time 


Copy the above tiddlers into your document and then save-and-reload (so the 
action-timeout widget is defined).  The AutoSaver interface is 
automatically added to the Sidebar.

>From the sidebar, press the AutoSaver "gear" button to open a settings 
popup.  Clear the "save the file" checkbox if you don't want to autosave 
the entire file and check the "export tiddlers" checkbox, then select the 
desired tiddler titles from the listbox (use ctrl-click and/or shift-click 
to select multiple tiddler titles).  The default output file will be named 
"tiddlers.json".

Press the "apply" button to set the countdown timer (default is 30 
minutes).  When the timer reaches zero, you will be ask to confirm "OK to 
autosave?"  Then press "save" to initiate the "export tiddlers" action.

enjoy,

-e

-- 
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/8c0c9755-d979-451f-8afc-acd25d19a40dn%40googlegroups.com.


[tw5] Re: How to create a tiddler that opens in View(?)Saved(?) mode not Edit mode

2021-12-20 Thread Eric Shulman
On Monday, December 20, 2021 at 10:16:10 AM UTC-8 sheri...@gmail.com wrote:

> ...tiddlers open in the already saved condition i.e. not in edit mode...
>

Instead of using `<$action-sendmessage $message="tm-new-tiddler" ... />`

use `<$action-createtiddler ... >`

See https://tiddlywiki.com/#ActionCreateTiddlerWidget for parameter details.

enjoy,
-e

-- 
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/d8da5463-834e-4510-a5bb-06de7fef9858n%40googlegroups.com.


[tw5] Re: Hover over word to reveal transcluded content of another tiddler

2021-12-19 Thread Eric Shulman
instead of using the shorthand transclusion `{{TiddlerA}}`
use the `<$transclude>` widget with the `mode=block` parameter, like this:
```
<"
>>
```
enjoy
-e

-- 
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/321b2fa8-d991-43d5-870c-caaceacdda70n%40googlegroups.com.


[tw5] Re: Trim [[ or trim ]] not working

2021-12-17 Thread Eric Shulman
On Friday, December 17, 2021 at 7:54:00 AM UTC-8 sheri...@gmail.com wrote:

> ``` 
>
<$vars prefix="[[" suffix=" ]]">
> <$list filter="[[smpConfig]get[animals]trim:prefix[]]"/>
> 
> ```
> If I don't have the trim part then the output is: [[Fox ]] [[Beaver ]]...  
> all good but once the trim is added there is no output.
> So what silly error am I making?
>

A couple of things:
1) The brackets surrounding a filter operand are actually part of the 
operand itself, and indicate the kind of operand to process:
  * square brackets enclose literal values
  * angle brackets enclose variable references
  * curly braces enclose tiddler references

Thus, you want to write: `trim:prefix` instead of 
`trim:prefix[]`

2) The `get[foo]` syntax returns the value in the field named "foo" **as a 
single block of text**.  To handle the retrieved value as a 
space-separated, bracketed list of items, you should use the 
`enlist-input[]` filter operator, like this:

`<$list filter="[[smpConfig]get[animals]enlist-input[]"/>`

3) Your example list, retrieved from the field named "animals", seems to 
include trailing space for each animal name.  I suggest omitting the extra 
spaces in the field content.  Alternatively, you can use `trim:suffix[ ]` 
in your filter, like this:

`<$list filter="[[smpConfig]get[animals]enlist-input[]trim:suffix[ ]]"/>`

enjoy,
-e

-- 
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/5c69419f-7444-4337-8f67-540795631edbn%40googlegroups.com.


[tw5] Re: Set Browser Tab title different from TW Title?

2021-12-10 Thread Eric Shulman
To change the text of the window title (but not the SiteTitle or 
SiteSubtitle), edit the shadow tiddler: `$:/core/wiki/title` and set it's 
content to whatever you want.

enjoy,
-e

On Friday, December 10, 2021 at 9:14:20 AM UTC-8 taale...@gmail.com wrote:

> Is that possible? If so how?
>
> For example, say the name of the TW is  "The South-Eastern Canadian 
> Women's Association Left-Handed Doily Lint Museum for the Benefit of the 
> Children".
>
> I want to keep that title on the wiki, but in the browser's tab, I just 
> want "Lint Mus." - how do I do that?
>
>

-- 
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/8033665c-ef1d-4f01-9265-fb05ad7fc4f1n%40googlegroups.com.


[tw5] Re: Text overflowing inside "tc-drop-down"?

2021-11-30 Thread Eric Shulman
By default, `tc-drop-down` applies CSS `white-space:nowrap`.  In addition, 
for links it also applies `display:block; padding:0 14px 0 14px;`.

To override these default styles, you can define and apply your own CSS 
class (e.g., "my-drop-down"), like this:

1) Create a stylesheet tiddler, tagged with `$:/tags/Stylesheet`, 
containing:
.my-drop-down { white-space:normal; }
.my-drop-down a { display:inline; padding:0; }

2) Then, where you display your dropdown ``, add `my-drop-down` to the 
class, like this:

<$transclude tiddler="HelloThere" mode="block"/>


enjoy,
-e

-- 
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/6b40fc5e-7fde-4bbe-bb31-3047e6dbaa65n%40googlegroups.com.


[tw5] Re: How to get simple i=i+2 in wiki macros?

2021-11-29 Thread Eric Shulman


Use this calculation: `<$text text={{{ 
[subtract[1]divide[3]trunc[]add[1]] }}}/>`

enjoy,

-e
On Sunday, November 28, 2021 at 11:26:32 PM UTC-8 Siniy-Kit wrote:

> Thank you Cj. And how can we get this list?
> 1 HelloThere 
> 1Learning
> 1 Working with TiddlyWiki 
>
> 2 Customise TiddlyWiki 
> 2 Features
> 2 Languages
> 3 Editions
> 3 Plugins
> 3 Platforms
> 4 Reference
> 4 Community
> 4 About
>
>
>
>
> воскресенье, 28 ноября 2021 г. в 21:25:00 UTC+3, cj.v...@gmail.com: 
>
>> Hi,
>>
>> It looks like you are treating TiddlyWiki and widgets like a programming 
>> language, trying to do iteration in each loop.  That doesn't work.
>>
>> Take a look at the "counter" attribute in list widget.  That is a 
>> relatively new feature to help handle what you are doing.
>>
>> To get the desired output:
>>
>> <$list filter="[tag[TableOfContents]]" counter="a">
>> <$text text={{{ [multiply[2]]}}}/> <>  
>> 
>>
>>
>>
>> On Sunday, November 28, 2021 at 1:58:53 PM UTC-4 Siniy-Kit wrote:
>>
>>> Hi! I write a simple  macros on https://tiddlywiki.com/
>>>
>>> *<$vars a=0>*
>>> *<$list filter="[tag[TableOfContents]]">*
>>> *<$vars a={{{[add[2]]}}}> <> <>  *
>>> **
>>> **
>>>  
>>> and I see this
>>>
>>> 2 HelloThere 
>>> 2 Learning
>>> 2 Working with TiddlyWiki 
>>> 2 Customise TiddlyWiki 
>>> 2 Features
>>> 2 Languages
>>> 2 Editions
>>> 2 Plugins
>>> 2 Platforms
>>> 2 Reference
>>> 2 Community
>>> 2 About
>>>
>>> but I want to  see this
>>>
>>> 2 HelloThere 
>>> 4 Learning
>>> 6 Working with TiddlyWiki 
>>> 8 Customise TiddlyWiki 
>>> 10 Features
>>> 12 Languages
>>> 14 Editions
>>> 16 Plugins
>>> 18 Platforms
>>> 20 Reference
>>> 22 Community
>>> 24 About
>>>
>>> where is my mistake?
>>>
>>

-- 
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/cc329ab7-ed50-4dcd-a67a-ceb988b189f7n%40googlegroups.com.


[tw5] Re: How can I link an external URL to an internal image and a shown tooltip?

2021-11-27 Thread Eric Shulman
The standard HTML syntax for adding a tooltip to a link uses the `title` 
attribute, like this:
```
[img[image.png]]
```
Alternatively, you can use the TW wikitext syntax for adding a tooltip to 
an internal image, like this:
```
[img[tooltip text|image.png]]
```
enjoy,
-e

-- 
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/88b6c5c2-262e-47fa-b118-440dd0c40802n%40googlegroups.com.


[tw5] Re: Please help us test v5.2.1-prerelease so we can expedite its release

2021-11-23 Thread Eric Shulman
On Tuesday, November 23, 2021 at 2:14:09 PM UTC-8 Mat wrote:

> `<$list filter="""[tag[Moment]tagging[]] 
> :filter[match]""">`
> In my 5.1.24-prerelease it behaves like I want, i.e it checks if the 
> current tiddlers name matches a limited set of titles and only then 
> displays the content. But on 5.2.0 and also 5.2.1-prerelease, it seems 
> *every* tiddler passes the filter, thus displaying the content.
>

The filter operator docs  says 
this:
*Note that within the subfilter, the "currentTiddler" variable is set to 
the title of the tiddler being processed. The value of currentTiddler 
outside the subfilter is available in the variable "..currentTiddler". *

This handling for `` vs `<..currentTiddler>` was added in 
TW5.2.0.  If I understand your intentions, you want to use 
`<..currentTiddler>` to refer to the containing tiddler.

Thus:
`<$list filter="""[tag[Moment]tagging[]] 
:filter[match<..currentTiddler>]""">`

-e

-- 
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/874736be-d601-450c-b182-dd78c3850f1an%40googlegroups.com.


[tw5] Re: [Theme] Zacht - A clean and soft theme for TiddlyWiki

2021-11-22 Thread Eric Shulman
On Monday, November 22, 2021 at 8:32:04 AM UTC-8 ale...@gmail.com wrote:

> Looks very nice! When I try and drag and drop it into my TW, the import 
> page just shows download.url and not the theme itself?


This is a problem that started with the most recent update to Google Chrome 
(v96.0.4664.45 ) and MS-Edge (v96.0.1054.29).

The cause has already been identified and a fix has been implemented (see 
https://github.com/Jermolene/TiddlyWiki5/issues/6254)
and will be included in TW v5.2.1, which will be released shortly (note: 
the scheduled release date has not yet been announced).

If you can't wait, you can download the pre-release build here:
https://tiddlywiki.com/prerelease/#GettingStarted

Alternatively, you can upgrade your current TW to TW5.2.1-prerelease, here:
https://tiddlywiki.com/prerelease/upgrade

IMPORTANT:
*As always, make sure to backup your current version first, and take note 
that the pre-release version should not be relied upon for production use.*

The TWCore shadow tiddlers containing the fix for this bug are here:
https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fmodules%2Futils%2Fdom%2Fdragndrop.js
https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fmodules%2Fwidgets%2Fdropzone.js

-e

-- 
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/e5212bca-68c9-49ef-9d70-b02626fc1e56n%40googlegroups.com.


[tw5] Re: The title of the tab is duplicate

2021-11-21 Thread Eric Shulman
When I view the $:/core tiddler (or any other plugin tiddler) on 
https://TiddlyWiki.com, the tabs only show their text once (e.g., "readme" 
and "contents").
Have you installed any other plugins or made any modifications to shadow 
tiddlers that might affect the tabs display?

-e


On Sunday, November 21, 2021 at 8:47:31 PM UTC-8 hajlj...@gmail.com wrote:

> Any ideas?
>
> [image: 2021-11-22_103455.png]
>

-- 
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/cf8c211f-5b5e-4933-95c0-8f01de8e92d4n%40googlegroups.com.


[tw5] Re: can I create a tiddler without it entering edit mode?

2021-11-21 Thread Eric Shulman
Another handy use of ActionSetFieldWidget is to "clone" a tiddler, simply 
by setting the title field.

Let's suppose you have a Tiddler named "TidA", and you want to make a 
complete copy of it named "TidB".  You can achieve this via:
`<$action-setfield $tiddler="TidA" title="TidB" />`

While this *might* seem like it would rename TidA to TidB, what it actually 
does is to create a *new* tiddler named TidB with all the same fields and 
values as TidA, while leaving TidA itself unchanged.
If you actually do want to rename TidA instead of cloning it, you would use 
the above, followed by:
`<$action-deletetiddler $tiddler="TidA" />`

-e

-- 
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/58c5b9fc-29ac-4bea-9664-ce30ff891352n%40googlegroups.com.


[tw5] Re: can I create a tiddler without it entering edit mode?

2021-11-21 Thread Eric Shulman
You can use https://tiddlywiki.com/#ActionCreateTiddlerWidget 
or https://tiddlywiki.com/#ActionSetFieldWidget to create tiddlers without 
opening them in the Story Column.

enjoy,
-e
On Sunday, November 21, 2021 at 2:27:29 PM UTC-8 andres@gmail.com wrote:

> So doing a project and I am creating tiddlers no problem with the 
> action-sendmessage widget with the tm-new-tiddler message. But I might have 
> a need to be able to create a tiddler on button click that creates the 
> tiddler "secretly". So it creates the tiddler but doesn't put it in the 
> stream.
> I tried sending a tm-save-tiddler and tm-close-tiddler after the 
> tm-new-tiddler but nothing happens. I am guessing it's because it navigates 
> away?
> There are other ways I can skin this particular cat, but I am curious if 
> my initial approach is possible.
>

-- 
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/c5921b39-19f7-424c-a452-04ef71299209n%40googlegroups.com.


[tw5] Re: gg VS talk

2021-11-11 Thread Eric Shulman
On Thursday, November 11, 2021 at 7:52:00 AM UTC-8 Mat wrote:

> > Visit our new, *experimental* Discourse discussion: talk.tiddlywiki.org
>
> How long is talk.tw gonna be experimental?
>

I think the experiment has been successful.  I am inclined to remove the 
word "experimental" from the GG header notice, so it would be listed as 
simply another "alternative", just like the current 
https://twitter.com/TiddlyWiki and https://www.reddit.com/r/TiddlyWiki5/ 
links.
 

> And what's it take to prove it is better?
>

Although many (but not all) have said they now 
prefer https://talk.tiddlywiki.org/, "better" is a matter of personal 
opinion.  I don't think it needs to be "proven" to be "better"... it's 
merely another site for TiddlyWiki info.
 

> And what if it is better, are we gonna shut this here down then?
>

IF the frequency of posts here drops to near zero, then I would be inclined 
to change the GG header to indicate that the discussion has "migrated" 
to https://talk.tiddlywiki.org/, just as we have done with 
the https://groups.google.com/g/tiddlywikidev discussion, which was moved 
to https://github.com/Jermolene/TiddlyWiki5/discussions and has had a total 
of 5 GoogleGroup posts since mid-June 2021.  In any case, I don't think we 
should ever completely "shut this here down", as there are many links 
external to this group.  As such, it will always be at least a historical 
resource for older discussion threads.

-e

-- 
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/db04ac7e-e1b4-4dae-8abd-c9ebf8fb2744n%40googlegroups.com.


[tw5] Re: Combobox idea

2021-11-04 Thread Eric Shulman
On Thursday, November 4, 2021 at 12:31:14 PM UTC-7 Télumire wrote:

> Here's the code to push the dropdown in the proper place :
>

There are layout problems with this solution.  To see the issues,
try putting "before" and "after" text surrounding the "combobox" span:
 

> *BEFORE*


> <$select field=selection class="select-btn" >
> A Tale of Two Cities
> A New Kind of Science
> The Dice Man
> 
> <$edit-text field=selection placeholder="type or select"/>
> *AFTER*


and compare this with the result of showing only an $edit-text widget:

*BEFORE*<$edit-text field=selection placeholder="type or select"/>*AFTER*

For the simple inline $edit-text widget, the BEFORE/AFTER text appears as 
you would expect:
immediately preceding/following the input element and vertically aligned 
with the middle of the text

However, note the placement and vertical alignment of the "combobox" 
elements:
The edit input/select elements appear vertically aligned *below the 
baseline *of the surrounding BEFORE/AFTER text,
and the AFTER text is immediately following the input element, rather than 
following the select element.

The CSS you provided also assumes that the width of the select element's 
downarrow button will always
a fixed width of "20px", which may not be the case depending upon which 
browser you are using.

Also, there is also a slight difference in the height of the select element 
vs the edit element (testing with Chrome),
so that the bottom border of the select element, which is behind the edit 
element, is visible, creating the appearance
of a double-thick bottom border on the edit element

-e

-- 
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/c20438a8-7107-4db4-adca-c5044a6638acn%40googlegroups.com.


[tw5] Re: Combobox idea

2021-11-04 Thread Eric Shulman
On Thursday, November 4, 2021 at 4:38:55 AM UTC-7 Mat wrote:

> I just came up with a simple idea for how to create comboboxes. Basically 
> it is an EditTextWidget just before the SelectWidget and the select widget 
> is styled to only show the arrow and both widgets refer to the same field.
>

My `<>` macro initially use a similar approach, but I found that 
it had too many problems with both interaction and appearance.  I also 
wanted to support use of inline lists (where the listbox is visible below 
the input fied), multiple selection (using standard shift-click/ctrl-click 
interaction), confirmation of input (ok/cancel), progressive filtering 
(reducing the list choices to only those that contain the current edit 
field input), and integration with my popup Calendar for selecting and 
formatting date input (see 
https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FCalendar) .

The result still uses an underlying edit-text and select widget, but they 
are surrounded by a bunch of custom wikitext code to handle lots of options 
and use-cases.

Check it out here: https://tiddlytools.com/edit-list.html
To see it in action, view 
https://tiddlytools.com/edit-list.html#TiddlyTools%2FMacros%2Fedit-list%2FExamples

enjoy,
-e

-- 
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/859bf6a7-00ca-427a-b4dd-e94d3c151b71n%40googlegroups.com.


[tw5] Re: selectedClass on button just stopped working?

2021-11-01 Thread Eric Shulman
According to the documentation in https://tiddlywiki.com/#ButtonWidget, the 
`selectedClass` parameter is assigned "if the popup is triggered or *the 
tiddler specified in set already has the value specified in setTo*"

However, in your `$button` code, the `setTo` parameter is calculated using 
a filtered transclusion whose value will always be the *opposite* of the 
current value stored in the `$:/state/petri/sidebar3` tiddler.  Thus, the 
`selectedClass` is never applied.

Are you certain that this used to work "a few weeks back"?

-e

-- 
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/c7c4d748-6af6-4435-84e5-4de3c4024355n%40googlegroups.com.


[tw5] Re: $action-setfield "spaced name field"=how?

2021-11-01 Thread Eric Shulman
On Sunday, October 31, 2021 at 11:07:05 PM UTC-7 Mat wrote:

> How did you manage to reply in that "read only" thread? And I cannot?
>

TiddlyTalk "admins" (Boris, Jeremy, Mario, Mark, and myself) can post 
replies to a read-only category.

In principle, admins should always make sure that we post our replies to 
the GoogleGroup rather than the TiddlyTalk category so that we can be sure 
that the original poster will see the response even if they don't use 
TiddlyTalk.

However, since TiddlyTalk doesn't restrict posts by admins, it's easy to 
forget that the category is "read only" and so sometimes we post directly 
to TiddlyTalk by mistake.

-e

-- 
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/c5a653cc-910f-4b66-9714-e80285e41b42n%40googlegroups.com.


[tw5] Re: Need help to create a javascript library & invoke this.wiki.xxxx() from it

2021-10-27 Thread Eric Shulman
On Wednesday, October 27, 2021 at 1:44:07 AM UTC-7 vpl wrote:

> `var stats_tiddlers = this.wiki.filterTiddlers(stats_tiddler_filter);`
>

Try using `$tw` instead of `this`:
```
var stats_tiddlers = $tw.wiki.filterTiddlers(stats_tiddler_filter);
```

-e

-- 
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/71cd6eb7-1a3d-4009-b50d-8201917fc230n%40googlegroups.com.


[tw5] Re: Sidebar Navigation: Trying to use TW as an SRD

2021-10-20 Thread Eric Shulman
The TiddlyWiki standard distribution includes a set of macros to display a 
hierarchical "Table of Contents"
https://tiddlywiki.com/#Table-of-Contents%20Macros
https://tiddlywiki.com/#Table-of-Contents%20Macros%20(Examples)

For your purposes, you probably want to use the `<>` macro.

enjoy,
-e

-- 
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/49091781-5faa-4341-9a68-694394f8c922n%40googlegroups.com.


[tw5] Re: customize order of tag display

2021-10-08 Thread Eric Shulman
On Thursday, October 7, 2021 at 7:45:43 PM UTC-7 gavin@gmail.com wrote:

> Finally got it to work. The tiddler titled $:/config/TagsOrder (and also 
> tagged $:/config/TagsOrder) had to have each tag incased in [[*]] 
> notation and line separated
> [[Tag]]
> [[Another Tag]]
> [[An Yet Another]]
>

Notes:
* You don't need to tag `$:/config/TagsOrder` with "$:/config/TagsOrder" 
(unless you want to!)
* Technically, you can enter all the tags on one line using a 
space-separated list.  I just find that using newline makes it easier to 
re-order the list since you can select/cut/paste entire lines to move items 
around.
* The doubled square brackets are only needed for tags that *contain* 
spaces.
 

> ...I wish there was a way to set tag precedence rather than have to 
> arrange ALL tiddlers.
>

How would you go about defining the precedence, if not by listing the tags 
in the desired order?
 

> I did appreciate Eric's button code which pulled in all the tiddlers, 
> though! :)
>

You're welcome :)

-e 

-- 
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/58355b3a-ea69-453a-a2d3-16b71c889debn%40googlegroups.com.


[tw5] Re: customize order of tag display

2021-10-08 Thread Eric Shulman
On Thursday, October 7, 2021 at 12:20:17 PM UTC-7 gavin@gmail.com wrote:

> How would we achieve this without altering the core/ui shadow tiddler?
>

Given the current definition of `$:/core/ui/ViewTemplate/tags`, I don't see 
any other way to make this change without altering that shadow tiddler.

While this does add some extra steps to the upgrade process, upgrades 
typically only occur twice a year or so; and, when upgrading, the "status" 
column will indicate that you that you are overriding a shadow.
After upgrading, you can compare the modified tiddler with the default 
shadow using these steps:

1) Open $:/AdvancedSearch, Filter tab and select "Overridden shadow 
tiddlers" from the dropdown next to the input field.
2) Open `$:/core/ui/ViewTemplate/tags` from the search results and click on 
'edit' to view the tiddler source
3) In the editor toolbar, enable preview (the closed eye) and from the 
preview options dropdown (chevron-down, next to the eye), select 
"differences from shadow (if any)"

The preview panel will now show the differences (if any) between your 
modified shadow and the newly upgraded shadow (red strikethroughs for 
removed content, green underlines for added content).
If the only difference is the change you previously made, then you're done.
Otherwise, you will need to delete your modified shadow and then edit the 
shadow again to hand-merge your changes into the upgraded shadow.

Sure, this is a bit of a hassle, but as I noted above, upgrades only occur 
twice a year, and most of the time, those changes are to core JS code, 
rather than UI definitions, so it's probably no more than a few minutes 
effort.

-e

-- 
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/68023d4a-18a9-4b39-8723-5122cf582c0an%40googlegroups.com.


[tw5] Re: Just a Filtering Code Pattern

2021-09-25 Thread Eric Shulman


I just tested this on both 5.1.23 and 5.2.0pre. I created one tiddler 
containing
```
{{{ [tag[Tag 1],[Tag 2],[Tag 3],[Tag 4]] 
:filter[tags[]count[]compare:eq[4]] }}}
```

and another tiddler with the four tags (note capitalization and spaces in 
the tag values).

It *does* seem to work on both versions of TW
-e
On Saturday, September 25, 2021 at 7:02:19 AM UTC-7 TW Tones wrote:

> Alvaro;
>
> You suggested something like this
> {{{ [tag[Tag 1]**,**[Tag 2],[Tag 3],[Tag 4]] 
> :filter[tags[]count[]compare:eq[4]] }}}
>
> As far as I can see this does not work on the pre-release and the t6ag 
> format  [tag[Tag 1],[Tag 2],[Tag 3],[Tag 4]] (simplified)  is not documented
>
> Does not work. So I asked if you tested this?
>
>
> On Saturday, 25 September 2021 at 22:11:48 UTC+10 Álvaro wrote:
>
>> I don't know if I understand you.
>>
>>
>> El sábado, 25 de septiembre de 2021 a las 5:31:18 UTC+2, TW Tones 
>> escribió:
>>
>>> Alvaro;
>>>
>>> Have you tested this?
>>>
>>> {{{  [tag[Tag 1]*,*[Tag 2],[Tag 3],[Tag 4]]  
>>> :filter[tags[]count[]compare:eq[4]]  }}}
>>>
>>> I cant see it working. Here  
>>> is says 
>>>
>>> * NEW IN: 5.1.23 Filter operators support multiple parameters which are 
>>> separated by a  ,  character.*
>>>
>>> *For example: [param1],[param2] or ,{param2}*
>>> However as far as I can see only if such multiple parameters are 
>>> documented in the operator in question.
>>>
>>> Tones
>>> On Saturday, 25 September 2021 at 01:39:53 UTC+10 Álvaro wrote:
>>>
 It works fine. I tried to find a alternative, but I wasn't lucky.

 When I resee your filter, I remember about the multiple parameters in 
 filter operator with commas (from last version, 5.1.23). And we can add a 
 second filter run that it applies your filter to result of first run. Then 
 you can rewrite your filter something like this (in filtering transclusion)
 {{{  [tag[Tag 1]*,*[Tag 2],[Tag 3],[Tag 4]]  
 :filter[tags[]count[]compare:eq[4]]  }}}

 Although maybe it be less understandble for you.


 El viernes, 24 de septiembre de 2021 a las 10:59:50 UTC+2, 
 jn.pierr...@gmail.com escribió:

> That's fine by me.
>
> And yes filters are fun even if sometimes a bit tricky.
>
> So for the fun of it, you could arrange your filter so that the input 
> would be the 4 tags you want.
>
> something like that:
>
> \define fun(tags)
> <$set variable=occ filter="[[$tags]put your filter code 
> here...count[]]">Seen <> tiddlers with tags $tags$
> \end
>
> Sometimes, this fun has you coding javascript filter operator. Would 
> this be the case here? I have not thought about it yet.
>
> cheers,
>
>
> Le vendredi 24 septembre 2021 à 03:54:34 UTC+2, cj.v...@gmail.com a 
> écrit :
>
>> Me and my interest in brain age games, I couldn't help but play 
>> around with a filter to find all tiddlers that have all four specified 
>> tags, but only those four tags.
>>
>> You'll find three tiddlers in the attached json.  Download the file, 
>> and drag into some TiddlyWiki instance (TiddlyWiki.com !) to take a 
>> gander.
>>
>> There are all kinds of ways to go about doing this sort of thing, 
>> with some filter operators maybe better suited, but I find the result a 
>> bit 
>> easier for me to understand (more logical to me, or maybe more 
>> self-explanatory, because of the way my brain works, I suppose.)  Maybe 
>> just a difference between top-down view vs bottom-up view or something 
>> ...
>>
>> Yeah, I find filters fun.
>>
>

-- 
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/b5e785e5-7b0a-427d-9d29-46d3185e7aa6n%40googlegroups.com.


Re: [tw5] Re: Filter tiddlers with exactly one tag.

2021-09-23 Thread Eric Shulman
On Thursday, September 23, 2021 at 3:57:35 PM UTC-7 thor...@gmail.com wrote:

> How might I make this searching tiddler more robust in the presence of 
> "tags with spaces", since I also use spaces to delimit tags in the 
> `edit-text`?
>

The problem is the use of
`<$set name="tagList" filter="[enlist{$:/temp/tagSearch}sort[]join[,]]">`

Let’s say you entered “foo [[bar baz]]” (i.e., two tags, “foo” and “bar 
baz”).

Then, you might expect the results of the above $set widget to be “foo,bar 
baz”. However, because this string contains a space, the $set widget 
*automatically 
encloses the output in double square brackets*. Thus, the actual result is 
“[[foo,bar baz]]”. Then, when you use `match` later on, it expects 
those square brackets to be part of the literal string match.

The solution is to use $vars with a “filtered transclusion” for the value, 
instead of $set, like this:
`<$vars tagList={{{ [enlist{$:/temp/tagSearch}sort[]join[,]] }}}>`
Then, tagList will be “foo,bar baz”, as you intended.

Alternatively, you *can* use $set, by adding “select=0” as an extra 
parameter, like this:
`<$set name="tagList" filter="[enlist{$:/temp/tagSearch}sort[]join[,]]" 
select=0>`
This tells the $set widget to only return the first list item (i.e., 
item #0), without adding any square brackets.
-e

-- 
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/4bc9490a-758e-4882-b3fe-112cb45c3bbdn%40googlegroups.com.


Re: [tw5] Re: Filter tiddlers with exactly one tag.

2021-09-23 Thread Eric Shulman

>
> On Thursday, September 23, 2021 at 6:07:22 PM UTC-4 thor...@gmail.com 
> wrote:
>
>> I just learned that list widgets can be nested; why does the above list 
>> return "the titles of the 10 tiddlers with the appropriate tags rather than 
>> printing the string "playground,rust,test,two words" 10 times, since the 
>> output of `[enlist{!!tags}sort[]join[,]match[playground,rust,test,two 
>> words]]` for a given tiddler will be either no match or 
>> "playground,rust,test,two words"?
>>
>
Because the inner $list widget uses variable="has_matching_tags", the 
results of the filter does not change the value of currentTiddler as set by 
the outer $list widget and <$link/> outputs the titles of the matched 
tiddlers instead of the text “playground,rust,test,two words”

-e

-- 
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/81886e57-70ec-47f1-a9c4-665ae861de26n%40googlegroups.com.


Re: [tw5] Re: Filter tiddlers with exactly one tag.

2021-09-22 Thread Eric Shulman
On Wednesday, September 22, 2021 at 5:23:57 AM UTC-7 cj.v...@gmail.com 
wrote:

> [tag[playground]tag[rust]tag[test]tag[two words]] 
>

The OP goal was to find tiddlers that have all the specified tags, but ONLY 
those tags and no others.
The problem is that the filter you suggest will also match tiddlers that 
have *other* tags in addition to the four tags specified.

-e

-- 
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/6bb97930-6de7-48da-9f4b-b399304a89c3n%40googlegroups.com.


[tw5] Re: Filter tiddlers with exactly one tag.

2021-09-22 Thread Eric Shulman
On Tuesday, September 21, 2021 at 10:52:04 PM UTC-7 thor...@gmail.com wrote:

> I tried to experiment with 
> `[enlist{!!tags}sort[]join[,]match[playground,rust,test,two words]]` and 
> uploaded the results. `[enlist{!!tags}sort[]join[,]]` returns the same 
> thing as `[enlist{!!tags}sort[]join[,]match[playground,rust,test,two 
> words]]` from my testing, so I'm not exactly sure what the match is for.
>

The filter I provided assumes that it is contained within a tiddler that 
has tags.  The purpose of the `match[playground,rust,test,two words]` 
filter syntax is to test the result of the filter to see if it has all the 
desired tags.

However... you can't use $:/AdvancedSearch to return "a list of tiddlers 
with exactly these 4 tags", because that needs two nested $list widgets, 
where the outer $list gets all the tiddler titles, and the inner $list 
checks each tiddler for the matching set of tags.  Thus, to list all 
tiddlers that have the desired tags, you can put the following into a 
tiddler:
```
<$list filter="[all[]]">
   <$list 
filter="[enlist{!!tags}sort[]join[,]match[playground,rust,test,two words]]" 
variable="has_matching_tags">
  <$link/>
   

```
Note the use of the variable in the inner $list.  This preserves the value 
of "currentTiddler" that is assigned by the outer $list so that it can be 
output by the $link widget.

-e


-- 
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/fb36cc56-d93d-4d63-9d8a-164844c12c42n%40googlegroups.com.


[tw5] Re: Filter tiddlers with exactly one tag.

2021-09-21 Thread Eric Shulman
On Tuesday, September 21, 2021 at 7:41:06 PM UTC-7 thor...@gmail.com wrote:

> I have 10 tiddlers tagged with both `playground` and `rust` 
> (`[tag[rust]tag[playground]]` returns them all, but _pretend_ that I could 
> have tiddlers with more than just two tags). In advanced search, 
> `[field:tags[rust playground]]` returns 3 matches, and 
> `[field:tags[playground rust]]` returns 7 matches. Meaning that Tiddlywiki 
> knows the order that I put tags in even though they are sorted when 
> displayed in the browser. Is there a way to return "exactly these 2 or 3 
> etc" tags without having to try all permutations of tags?
>
 
Let's assume you have FOUR tags: "rust", "playground", "two words", and 
"test"

Try this filter:
`[enlist{!!tags}sort[]join[,]match[playground,rust,test,two words]]`

Notes:
* If a tag contains a space, it is stored with square brackets, e.g., 
`[[two words]]`
* enlist{!!tags} gets the individual tags as separate items, and any square 
brackets are removed (but "two words" will still be ONE tag)
* next, sort them alphabetically, in ascending order
* then join the tags with a comma as a delimiter
* and match with literal text containing commas

Let me know how it goes.

enjoy,
-e

-- 
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/a27256ee-43a7-4029-8bee-73d89d16af06n%40googlegroups.com.


[tw5] Re: Filter tiddlers with exactly one tag.

2021-09-21 Thread Eric Shulman
On Monday, September 20, 2021 at 7:38:43 PM UTC-7 thor...@gmail.com wrote:

> ...is there a shorthand to only output those tiddlers with _exactly_ the 
> one tag I'm requesting
>

Even though the "tags" field contains a list of tiddler titles, it is also 
just a simple text value and you can use the `fields:tags[...]` filter to 
look for a specific literal value in the field, without it as a list.

`<$list filter="[field:tags[technical_todo]]"><>
`
will give the results you want, without a lot of messy "counting" and such.

enjoy,
-e

-- 
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/dc1023c2-e1cd-469b-b29c-6b35ed92fd7cn%40googlegroups.com.


[tw5] Re: How do I use a URL in a macro?

2021-09-20 Thread Eric Shulman
On Monday, September 20, 2021 at 12:35:18 AM UTC-7 thor...@gmail.com wrote:

> I can make the first method work by putting the URL in quotes, but I would 
> like to avoid that in general because it's more typing :): `< http://foo.org; bar>>`. Why are the quotes required? I thought macro 
> expansion substituted text without treating the macro inputs as WikiText?
>

The `<>` syntax, in addition to handling 
*unnamed* parameters, also recognizes *named* parameters, using 
`name:value`.
Thus, a value like `http://foo.org` is parsed as a parameter named "http", 
with a value of "//foo.org".  By enclosing it in quotes, it avoids the 
named parameter parsing and passes it into the macro as a single parameter 
value

So... you can use the quotes to bypass the parameter name parsing: 
`>`
or, you can add a parameter *name*, like this:  `>`.

Either way, it's going to be "more typing" (but only a little).  Still, its 
less typing than the full `<$macrocall ...>` widget syntax.

-e

-- 
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/961a4043-498c-47ac-a2d2-1bb5eef6ab85n%40googlegroups.com.


[tw5] Re: How to add a button to the up-right to close others?

2021-09-16 Thread Eric Shulman


By default the “close others” button appears in the tiddler View Toolbar 
“more” dropdown (as Birthe has shown).

If you want to move this button from the “more” dropdown to the main 
tiddler View Toolbar, open the $:/ControlPanel (the gear icon in the 
sidebar), select the “Appearance” tab, then the “Toolbars” tab, and then 
the “View Toolbar” tab. From there, you can select the checkbox for “close 
others”.

-e

On Thursday, September 16, 2021 at 7:35:46 AM UTC-7 strikke...@gmail.com 
wrote:

> [image: close_other.png]
>
> On Thursday, September 16, 2021 at 4:16:20 PM UTC+2 imleg...@gmail.com 
> wrote:
>
>> I already find the command 
>>
>> WidgetMessage: tm-close-other-tiddlers
>>
>> But I don't know how to add button to the up-right
>>
>

-- 
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/e555d29b-7834-42ba-9af9-e599fa53a2bdn%40googlegroups.com.


[tw5] Re: Count[], sum[] etc. in nested lists?

2021-09-13 Thread Eric Shulman
errata: I changed a variable name, but missed one line.  Change this:
<> tasks, <> are completed:
to this:
<> tasks, <> are completed:

-e

-- 
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/7305cc55-bc43-436b-bad9-45c7e7244a00n%40googlegroups.com.


[tw5] Re: Count[], sum[] etc. in nested lists?

2021-09-13 Thread Eric Shulman
On Monday, September 13, 2021 at 2:18:59 PM UTC-7 Mark S. wrote:

> Another way is to put the entire nested listed set into a text field of a 
> wikify widget. Then render and enlist the output. Sometimes there are 
> additional complications if your output tiddlers (tasks) have spaces in 
> them.
>

As Mark suggests, using the $wikify widget may be the most straightforward 
way to handle your needs...

Try this:
```
\define getList()
<$list filter="[has[frequency]]">
   <$list filter="[all[current]!days:last-contact{!!frequency}]">
  //[//[<$link/>]//]//
   

\end

<$wikify name="theList" text=<>>
<$vars total={{{ [has[frequency]count[]] }}}>
<$vars todo={{{ [enlistcount[]] }}}>
<$vars done={{{ 
[subtractdividemultiply[100]addsuffix[%]] }}}>
<$vars time={{{ [enlistget[time-needed]sum[]] }}}>
<> tasks, <> are completed:
<$list filter="[enlist]"><$link/>
Total time needed: <> minutes.





```

Notes:
* The `getList()` macro outputs a list of incomplete tasks (your original 
nested filters)
* The list items are wrapped in `[[` and `]]`, using italics syntax to 
separate the brackets so they will be output as literal text.  This handles 
tiddler titles that contain spaces.
* `$wikify` invokes `getList()` and captures the output as plain text, 
stored in `theList`
* Next, we calculate the some statistics: total=number of tasks,  
todo=number of incomplete tasks, done=percentage complete, time=total time 
need to complete the remaining tasks
* Then, we display the total and percent complete
* Followed by a numbered bullet list of links to incomplete tasks
* and finally, the total time needed to complete those tasks

That about covers it.

enjoy,
-e

-- 
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/34436d0e-d2d3-49b8-bae6-5842e77ab941n%40googlegroups.com.


[tw5] Re: Count[], sum[] etc. in nested lists?

2021-09-13 Thread Eric Shulman
On Monday, September 13, 2021 at 6:51:14 AM UTC-7 cj.v...@gmail.com wrote:

> Aside: we could merge the two <$list> filters together 


That wouldn't work in this case, as the inner filter uses `{!!frequency}`, 
which depends upon the outer filter to set the `currentTiddler` value to 
each tiddler that `has[frequency]`
If the two filters were merged, then `{!!frequency}` would refer to the 
tiddler that contains the `$list` widget, rather than each tiddler that 
`has[frequency]`

-e

-- 
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/3013288f-49c1-4246-8cab-7cf82008bb49n%40googlegroups.com.


[tw5] Re: shortcut to open the control panel

2021-09-12 Thread Eric Shulman
https://tiddlywiki.com/#WidgetMessage%3A%20tm-navigate

On Sunday, September 12, 2021 at 5:52:49 AM UTC-7 imleg...@gmail.com wrote:

> I know it is a stupid question, I check the keyboard shortcut not found 
> the related command.
> I try to edit my own shortcut by using message 
> https://tiddlywiki.com/static/Messages.html
>
> but I  can't find the tm command to open a tiddler instead of edit it.
>
> Thank you in advance
>

-- 
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/65c49355-74b6-4bd9-9230-c8ca10a341c0n%40googlegroups.com.


[tw5] Re: How to make multiple "reveals" in one tiddler so that they work independently?

2021-09-10 Thread Eric Shulman


If there were were simple quotes around the filter, then it would be 
treated as a literal text value. The triple braces indicate that the 
parameter is using a “filtered transclusion” (aka, “inline filter”) and 
needs to be processed to get it’s actual value.

Note that, when used in normal wikitext content, the results of a filtered 
transclusion can return multiple values that are treated as a list of 
links. However, when a filtered transclusion is used as parameter in a 
$widget, only the first item in the list is used as the parameter value.

To see the difference, put the following content into a tiddler at 
http://TiddlyWiki.com <http://tiddlywiki.com/>…
{{{ [tag[HelloThere]] }}}

<$text text={{{ [tag[HelloThere]] }}}/> 

-e
On Friday, September 10, 2021 at 3:22:52 AM UTC-7 Petri M. wrote:

> Oh my god THANK YOU this was driving me nuts. I read that the popups are 
> dismissed on click but I thought that you need to click the popup itself to 
> dismiss it and I just never realised that you really do not have to.
>
> Just one question, if I understand correclty the setTo=... is just a 
> filter that checks whether the value of test1 is "hide", if it is, it 
> outputs "show", if not then it outputs "hide". However, why do we need the 
> triple braces around the filter? 
>
> BR,
> Petri
>
> On Thursday, September 9, 2021 at 4:31:19 PM UTC+3 Eric Shulman wrote:
>
>> On Thursday, September 9, 2021 at 2:56:13 AM UTC-7 Petri M. wrote:
>>
>>> I can't figure this one out. So, I have a sidebar search tiddler where I 
>>> want to show three different kinds of searches at the same time but I want 
>>> each of them to be collapsable for easy navigation. I got everything else 
>>> working fine but I cannot figure out how to get them to collapse and expand 
>>> independently.
>>>
>>
>> Popups are intended to* appear only when the corresponding state tiddler 
>> has a value* and the TWCore system *automatically dismisses popups when 
>> it detects a click elsewhere.*
>>
>> However, your goal is to have an "anti-popup" that has the inverse 
>> behavior... i.e., it defaults to being visible unless the state tiddler 
>> value is set by a button click, and then remains that way until the button 
>> is clicked again.  The solution is to *not use popups at all.*  Instead, 
>> you want the button to simply toggle the state tiddler between blank and 
>> non-blank and then use that value to determine when to show the associated 
>> content.
>>
>> Here's one way to write this using set/setTo and a "filtered 
>> transclusion" to calculate the desired state value:
>>
>> <$button class="sidebar-collapsible" 
>> selectedClass="sidebar-collapsible-onclick"
>>set="test1" setTo={{{ [{test1}match[hide]then[show]else[hide]] 
>> }}}>Title matches:
>> <$reveal state="test1" type="nomatch" text="hide"> ... t1 
>>
>> <$button class="sidebar-collapsible" 
>> selectedClass="sidebar-collapsible-onclick"
>>set="test2" setTo={{{ [{test2}match[hide]then[show]else[hide]] 
>> }}}>Title matches:
>> <$reveal state="test2" type="nomatch" text="hide"> ... t2 
>>
>> Note: The current value of the state tiddlers will be retained when you 
>> save your file.  However, if you want the state tiddlers to be reset when 
>> you save the file, *name them starting with "$:/state/popup/"*.  By 
>> default, tiddlers with that prefix are not retained when the file is saved.
>>
>> enjoy,
>> -e
>>
>

-- 
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/53721910-ad92-4c66-8266-075a2548cfdcn%40googlegroups.com.


[tw5] Re: How to make multiple "reveals" in one tiddler so that they work independently?

2021-09-09 Thread Eric Shulman
On Thursday, September 9, 2021 at 2:56:13 AM UTC-7 Petri M. wrote:

> I can't figure this one out. So, I have a sidebar search tiddler where I 
> want to show three different kinds of searches at the same time but I want 
> each of them to be collapsable for easy navigation. I got everything else 
> working fine but I cannot figure out how to get them to collapse and expand 
> independently.
>

Popups are intended to* appear only when the corresponding state tiddler 
has a value* and the TWCore system *automatically dismisses popups when it 
detects a click elsewhere.*

However, your goal is to have an "anti-popup" that has the inverse 
behavior... i.e., it defaults to being visible unless the state tiddler 
value is set by a button click, and then remains that way until the button 
is clicked again.  The solution is to *not use popups at all.*  Instead, 
you want the button to simply toggle the state tiddler between blank and 
non-blank and then use that value to determine when to show the associated 
content.

Here's one way to write this using set/setTo and a "filtered transclusion" 
to calculate the desired state value:

<$button class="sidebar-collapsible" 
selectedClass="sidebar-collapsible-onclick"
   set="test1" setTo={{{ [{test1}match[hide]then[show]else[hide]] }}}>Title 
matches:
<$reveal state="test1" type="nomatch" text="hide"> ... t1 

<$button class="sidebar-collapsible" 
selectedClass="sidebar-collapsible-onclick"
   set="test2" setTo={{{ [{test2}match[hide]then[show]else[hide]] }}}>Title 
matches:
<$reveal state="test2" type="nomatch" text="hide"> ... t2 

Note: The current value of the state tiddlers will be retained when you 
save your file.  However, if you want the state tiddlers to be reset when 
you save the file, *name them starting with "$:/state/popup/"*.  By 
default, tiddlers with that prefix are not retained when the file is saved.

enjoy,
-e

-- 
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/7b4f5780-7e23-4c06-b0c0-2c9eec08dbf6n%40googlegroups.com.


  1   2   3   4   5   6   7   8   9   10   >