[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-15 Thread TonyM
As mark said and I proposed

Allowing the application of a filter or search to reduce the set that you then 
browse is a common strategy for large datasets.

What people tend to forget is once built our queries of such data sets often 
already start with some fact that we can use to reduce the set we are looking 
at 

Try and make a list of reasons you may want to browse the list for and see if 
you can find information you can use to limit it on, eg state, city businss 
type etc which is much more useful than the semi random decisions naming 
businesses.

Regards
Tony

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fce1119b-016c-4ea1-89be-a15c6738cd1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-15 Thread Damon Pritchett
Yeah, I think that's kind of the search I'm looking for. Need to think 
about the best way to go about that.

The pronunciation of Arkansas is highly dependent upon which state it is 
that you reside in. If you live in or close to Arkansas, then you pronounce 
it Arkan-SAW. If you live in Kansas, then it is most definitely Ar-KANSAS. 
Digression continues..

On Saturday, December 15, 2018 at 12:27:41 PM UTC-7, Mark S. wrote:
>
> It sounds like you want a search that works like the sidebar search but 
> that:
>
> * Only searches your business tiddlers
> * Only searches the *first* letters of the title of your businesses
>
> So, as you type "Kan" you see all the titles that start with Kan (Kanvass 
> Clothworks, Kansas Combines, Kansas Elevator, Kantina Refreshments, e.g.) 
> but by typing after Kansas the list gets smaller. So you effectively have 
> the best of both worlds. You can see everything that starts with "A", or 
> "K" or "Kan".
>
> I've always wondered why Arkansas isn't pronounced "Ar-Kansas", but I 
> digress.
>
> -- Mark
>
> On Saturday, December 15, 2018 at 10:36:23 AM UTC-8, Damon Pritchett wrote:
>>
>> My project consists of a large collection of a certain type of business 
>> in Kansas. Each business is represented by its own tiddler and contains 
>> facts about that business. The title of the tiddler is the name of the 
>> business. As one can imagine, a lot of the names begin with Kansas, but 
>> there are also a lot that begin with city names.
>>
>> I don't want to do anything that takes away from the name/title. I've 
>> thought that searching is likely the best way to approach this, but there 
>> are times when it's convenient or necessary to do some browsing.
>>
>> As I mentioned in the initial post, I have a table of contents set up 
>> with vertical tabs for each letter of the alphabet. For long lists such as 
>> K, there's a lot of scrolling and the tabs and the top of the sidebar 
>> scroll with it. This would be less of a concern if I could have to tabs and 
>> top of the sidebar not scroll.
>>
>> Breaking up into smaller pieces is what my mind is churning on in the 
>> background, but haven't come up with any ideas yet. I've also wondered if a 
>> clever method of tagging might be a way to go.
>>
>> Damon
>>
>> On Friday, December 14, 2018 at 10:35:40 PM UTC-7, TonyM wrote:
>>>
>>> Daemon
>>>
>>> Without access to your data it is hard to map a usefull breakdown 
>>> structure to apply. 
>>>
>>> Could you describe what they are?
>>>
>>> Is there any other ways you do or can subdivide your tiddlers?
>>>
>>> This may be a case of where search is best used to first reduce the size 
>>> of the set before placing it in an alphabetical index.
>>>
>>> Regards
>>> Tony
>>>
>>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/601fa05c-9f7a-4b33-bbb1-4a2ec7ad3819%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-15 Thread 'Mark S.' via TiddlyWiki
It sounds like you want a search that works like the sidebar search but 
that:

* Only searches your business tiddlers
* Only searches the *first* letters of the title of your businesses

So, as you type "Kan" you see all the titles that start with Kan (Kanvass 
Clothworks, Kansas Combines, Kansas Elevator, Kantina Refreshments, e.g.) 
but by typing after Kansas the list gets smaller. So you effectively have 
the best of both worlds. You can see everything that starts with "A", or 
"K" or "Kan".

I've always wondered why Arkansas isn't pronounced "Ar-Kansas", but I 
digress.

-- Mark

On Saturday, December 15, 2018 at 10:36:23 AM UTC-8, Damon Pritchett wrote:
>
> My project consists of a large collection of a certain type of business in 
> Kansas. Each business is represented by its own tiddler and contains facts 
> about that business. The title of the tiddler is the name of the business. 
> As one can imagine, a lot of the names begin with Kansas, but there are 
> also a lot that begin with city names.
>
> I don't want to do anything that takes away from the name/title. I've 
> thought that searching is likely the best way to approach this, but there 
> are times when it's convenient or necessary to do some browsing.
>
> As I mentioned in the initial post, I have a table of contents set up with 
> vertical tabs for each letter of the alphabet. For long lists such as K, 
> there's a lot of scrolling and the tabs and the top of the sidebar scroll 
> with it. This would be less of a concern if I could have to tabs and top of 
> the sidebar not scroll.
>
> Breaking up into smaller pieces is what my mind is churning on in the 
> background, but haven't come up with any ideas yet. I've also wondered if a 
> clever method of tagging might be a way to go.
>
> Damon
>
> On Friday, December 14, 2018 at 10:35:40 PM UTC-7, TonyM wrote:
>>
>> Daemon
>>
>> Without access to your data it is hard to map a usefull breakdown 
>> structure to apply. 
>>
>> Could you describe what they are?
>>
>> Is there any other ways you do or can subdivide your tiddlers?
>>
>> This may be a case of where search is best used to first reduce the size 
>> of the set before placing it in an alphabetical index.
>>
>> Regards
>> Tony
>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d14b5b9a-9b31-4414-b588-f53506345527%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-15 Thread Damon Pritchett
My project consists of a large collection of a certain type of business in 
Kansas. Each business is represented by its own tiddler and contains facts 
about that business. The title of the tiddler is the name of the business. 
As one can imagine, a lot of the names begin with Kansas, but there are 
also a lot that begin with city names.

I don't want to do anything that takes away from the name/title. I've 
thought that searching is likely the best way to approach this, but there 
are times when it's convenient or necessary to do some browsing.

As I mentioned in the initial post, I have a table of contents set up with 
vertical tabs for each letter of the alphabet. For long lists such as K, 
there's a lot of scrolling and the tabs and the top of the sidebar scroll 
with it. This would be less of a concern if I could have to tabs and top of 
the sidebar not scroll.

Breaking up into smaller pieces is what my mind is churning on in the 
background, but haven't come up with any ideas yet. I've also wondered if a 
clever method of tagging might be a way to go.

Damon

On Friday, December 14, 2018 at 10:35:40 PM UTC-7, TonyM wrote:
>
> Daemon
>
> Without access to your data it is hard to map a usefull breakdown 
> structure to apply. 
>
> Could you describe what they are?
>
> Is there any other ways you do or can subdivide your tiddlers?
>
> This may be a case of where search is best used to first reduce the size 
> of the set before placing it in an alphabetical index.
>
> Regards
> Tony
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/03e53e6b-1ba7-450c-bd75-0da80f08938c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-15 Thread Damon Pritchett
My project consists of a large collection of a certain type of business in 
Kansas. Each business is represented by its own tiddler and contains facts 
about that business. The title of the tiddler is the name of the business. 
As one can imagine, a lot of the names begin with Kansas, but there are 
also a lot that begin with city names.

I don't want to do anything that takes away from the name/title. I've 
thought that searching is likely the best way to approach this, but there 
are times when it's convenient or necessary to do some browsing.

As I mentioned in the initial post, I have a table of contents set up with 
vertical tabs for each letter of the alphabet. For long lists such as K, 
there's a lot of scrolling and the tabs and the top of the sidebar scroll 
with it. This would be less of a concern if I could have to tabs and top of 
the sidebar not scroll.

Breaking up into smaller pieces is what my mind is churning on in the 
background, but haven't come up with any ideas yet. I've also wondered if a 
clever method of tagging might be a way to go.

Damon

On Friday, December 14, 2018 at 10:35:40 PM UTC-7, TonyM wrote:
>
> Daemon
>
> Without access to your data it is hard to map a usefull breakdown 
> structure to apply. 
>
> Could you describe what they are?
>
> Is there any other ways you do or can subdivide your tiddlers?
>
> This may be a case of where search is best used to first reduce the size 
> of the set before placing it in an alphabetical index.
>
> Regards
> Tony
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/894b0005-6c1e-4d78-830e-78add3d0a62a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-14 Thread TonyM
Daemon

Without access to your data it is hard to map a usefull breakdown structure to 
apply. 

Could you describe what they are?

Is there any other ways you do or can subdivide your tiddlers?

This may be a case of where search is best used to first reduce the size of the 
set before placing it in an alphabetical index.

Regards
Tony

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f67e4d5b-0350-4eca-9037-6380631d1a65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-14 Thread Damon Pritchett
So after looking closely at my titles and considering a bit further, I 
believe that my original idea of doing this will not really solve my 
problem. There are a large number of tiddlers whose title is the same for 
up to 10 or 12 characters. I need to rethink a better way to navigate 
through all of the choices without creating a lot of clutter or a huge 
scrolling list. I am very open to suggestions.

Damon


On Friday, December 14, 2018 at 9:27:46 AM UTC-7, Mark S. wrote:
>
> In the filter that starts "[all[tiddlers]..." you can append your own 
> specific tag operator.
>
> I assume that once you've stamped the 1800 tiddlers that you will do new 
> ones by hand. I guess you could run the whole thing again if you had a lot 
> of new tiddlers you were adding all at once.
>
> I'm kind of hoping someone will pop up with "here's an easy way to get the 
> first 3 letters of a title in uppercase." ;-)
>
> -- Mark
>
> On Friday, December 14, 2018 at 8:16:31 AM UTC-8, Damon Pritchett wrote:
>>
>> Thanks Mark. I've got some questions before I try this. How much would it 
>> complicate things if I only wanted to perform this operation on tiddlers 
>> with a specific tag? Also, with the delay that you've mentioned, is this 
>> only for the first time it's run or every time I add a new tiddler?
>>
>> Thanks,
>>
>> Damon
>>
>>
>> On Thursday, December 13, 2018 at 10:23:33 PM UTC-7, Mark S. wrote:
>>>
>>> Ok. Here's code that should be able to do it.
>>>
>>>
>>> *But PLEASE make a backup of your work before trying this IT'S 
>>> REALLY IMPORTANT! THIS MACRO MAY CHANGE EVERY TIDDLER IN YOUR TW FILE!!*
>>>
>>> There are several caveats here.
>>>
>>> One is that *every eligible tiddler will have it's modification date 
>>> changed.*
>>>
>>> Do this on a desktop, not on a tablet or small device!
>>>
>>> Another, when you first save the tiddler with the button, there may be a 
>>> delay. You may be asked if you want to keep waiting. You need to keep 
>>> waiting.
>>>
>>> When you finally press the button, there will be even longer delays 
>>> while it processes. You will probably be asked several times if you want to 
>>> wait for the page before the process completes. It typically took 2 to 3 
>>> "waits" on tiddlywiki.com, and there's only 1100 tiddlers there!
>>>
>>> I strongly recommend that you close out any tabs you don't need. In 
>>> fact, be sure all your work in all your applications is saved in case the 
>>> browser hangs the machine.
>>>
>>> At the top of the code you can set a value for min-per-group. This is 
>>> the minimum number of tiddlers you want before creating its own group 
>>> entry. Paste the code into a tiddler and close the tiddler. Then, if you're 
>>> sure you want to, press the button.
>>>
>>> The reason this code is so inefficient is that it is generating all 
>>> 17576 possible combinations of 3 letters and checking to see if any of your 
>>> tiddlers match by title. A much more efficient code could have been written 
>>> with just a tiny bit of javascript. Oh well.
>>>
>>> Be careful!
>>> Have fun -- if you can!
>>>
>>> -- Mark
>>>
>>> \define min-per-group() 10
>>> \define ABC() A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>>> \define xABC() A B C D E F
>>> \define regexpABC() (?i)^$(letr1)$$(letr2)$$(letr3)$
>>> \define glueABC() $(letr1)$$(letr2)$$(letr3)$
>>>
>>> <$button> Create alphabetical TOC structure
>>><$list filter="[enlist]" variable=letr1>
>>><$list filter="[enlist]" variable=letr2>
>>><$list filter="[enlist]" variable=letr3>
>>><$list filter=
>>> "[all[tiddlers]!has[draft.of]regexprestlimit[1]]" 
>>> variable="dummy">
>>><$action-setfield $tiddler=<> tags=<> /> 
>>><$list filter="[all[tiddlers]regexp]" >
>>>   <$fieldmangler>
>>> <$action-sendmessage $message="tm-remove-tag" 
>>> $param=<>/>
>>> <$action-sendmessage $message="tm-add-tag" $param=<>> >>/>
>>>   
>>>
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/90650f23-209b-4ddc-aa7d-c52b20ea8925%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-14 Thread 'Mark S.' via TiddlyWiki
In the filter that starts "[all[tiddlers]..." you can append your own 
specific tag operator.

I assume that once you've stamped the 1800 tiddlers that you will do new 
ones by hand. I guess you could run the whole thing again if you had a lot 
of new tiddlers you were adding all at once.

I'm kind of hoping someone will pop up with "here's an easy way to get the 
first 3 letters of a title in uppercase." ;-)

-- Mark

On Friday, December 14, 2018 at 8:16:31 AM UTC-8, Damon Pritchett wrote:
>
> Thanks Mark. I've got some questions before I try this. How much would it 
> complicate things if I only wanted to perform this operation on tiddlers 
> with a specific tag? Also, with the delay that you've mentioned, is this 
> only for the first time it's run or every time I add a new tiddler?
>
> Thanks,
>
> Damon
>
>
> On Thursday, December 13, 2018 at 10:23:33 PM UTC-7, Mark S. wrote:
>>
>> Ok. Here's code that should be able to do it.
>>
>>
>> *But PLEASE make a backup of your work before trying this IT'S REALLY 
>> IMPORTANT! THIS MACRO MAY CHANGE EVERY TIDDLER IN YOUR TW FILE!!*
>>
>> There are several caveats here.
>>
>> One is that *every eligible tiddler will have it's modification date 
>> changed.*
>>
>> Do this on a desktop, not on a tablet or small device!
>>
>> Another, when you first save the tiddler with the button, there may be a 
>> delay. You may be asked if you want to keep waiting. You need to keep 
>> waiting.
>>
>> When you finally press the button, there will be even longer delays while 
>> it processes. You will probably be asked several times if you want to wait 
>> for the page before the process completes. It typically took 2 to 3 "waits" 
>> on tiddlywiki.com, and there's only 1100 tiddlers there!
>>
>> I strongly recommend that you close out any tabs you don't need. In fact, 
>> be sure all your work in all your applications is saved in case the browser 
>> hangs the machine.
>>
>> At the top of the code you can set a value for min-per-group. This is the 
>> minimum number of tiddlers you want before creating its own group entry. 
>> Paste the code into a tiddler and close the tiddler. Then, if you're sure 
>> you want to, press the button.
>>
>> The reason this code is so inefficient is that it is generating all 17576 
>> possible combinations of 3 letters and checking to see if any of your 
>> tiddlers match by title. A much more efficient code could have been written 
>> with just a tiny bit of javascript. Oh well.
>>
>> Be careful!
>> Have fun -- if you can!
>>
>> -- Mark
>>
>> \define min-per-group() 10
>> \define ABC() A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>> \define xABC() A B C D E F
>> \define regexpABC() (?i)^$(letr1)$$(letr2)$$(letr3)$
>> \define glueABC() $(letr1)$$(letr2)$$(letr3)$
>>
>> <$button> Create alphabetical TOC structure
>><$list filter="[enlist]" variable=letr1>
>><$list filter="[enlist]" variable=letr2>
>><$list filter="[enlist]" variable=letr3>
>><$list filter=
>> "[all[tiddlers]!has[draft.of]regexprestlimit[1]]" 
>> variable="dummy">
>><$action-setfield $tiddler=<> tags=<> /> 
>><$list filter="[all[tiddlers]regexp]" >
>>   <$fieldmangler>
>> <$action-sendmessage $message="tm-remove-tag" 
>> $param=<>/>
>> <$action-sendmessage $message="tm-add-tag" $param=<>
>> />
>>   
>>
>>
>> 
>> 
>> 
>> 
>> 
>>
>>
>>
>>
>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/69c0a217-3b3b-4895-9164-0863af89f0e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-14 Thread Damon Pritchett
Thanks Mark. I've got some questions before I try this. How much would it 
complicate things if I only wanted to perform this operation on tiddlers 
with a specific tag? Also, with the delay that you've mentioned, is this 
only for the first time it's run or every time I add a new tiddler?

Thanks,

Damon


On Thursday, December 13, 2018 at 10:23:33 PM UTC-7, Mark S. wrote:
>
> Ok. Here's code that should be able to do it.
>
>
> *But PLEASE make a backup of your work before trying this IT'S REALLY 
> IMPORTANT! THIS MACRO MAY CHANGE EVERY TIDDLER IN YOUR TW FILE!!*
>
> There are several caveats here.
>
> One is that *every eligible tiddler will have it's modification date 
> changed.*
>
> Do this on a desktop, not on a tablet or small device!
>
> Another, when you first save the tiddler with the button, there may be a 
> delay. You may be asked if you want to keep waiting. You need to keep 
> waiting.
>
> When you finally press the button, there will be even longer delays while 
> it processes. You will probably be asked several times if you want to wait 
> for the page before the process completes. It typically took 2 to 3 "waits" 
> on tiddlywiki.com, and there's only 1100 tiddlers there!
>
> I strongly recommend that you close out any tabs you don't need. In fact, 
> be sure all your work in all your applications is saved in case the browser 
> hangs the machine.
>
> At the top of the code you can set a value for min-per-group. This is the 
> minimum number of tiddlers you want before creating its own group entry. 
> Paste the code into a tiddler and close the tiddler. Then, if you're sure 
> you want to, press the button.
>
> The reason this code is so inefficient is that it is generating all 17576 
> possible combinations of 3 letters and checking to see if any of your 
> tiddlers match by title. A much more efficient code could have been written 
> with just a tiny bit of javascript. Oh well.
>
> Be careful!
> Have fun -- if you can!
>
> -- Mark
>
> \define min-per-group() 10
> \define ABC() A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
> \define xABC() A B C D E F
> \define regexpABC() (?i)^$(letr1)$$(letr2)$$(letr3)$
> \define glueABC() $(letr1)$$(letr2)$$(letr3)$
>
> <$button> Create alphabetical TOC structure
><$list filter="[enlist]" variable=letr1>
><$list filter="[enlist]" variable=letr2>
><$list filter="[enlist]" variable=letr3>
><$list filter=
> "[all[tiddlers]!has[draft.of]regexprestlimit[1]]" 
> variable="dummy">
><$action-setfield $tiddler=<> tags=<> /> 
><$list filter="[all[tiddlers]regexp]" >
>   <$fieldmangler>
> <$action-sendmessage $message="tm-remove-tag" $param=<>/
> >
> <$action-sendmessage $message="tm-add-tag" $param=<>
> />
>   
>
>
> 
> 
> 
> 
> 
>
>
>
>
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/83f82d95-209e-47d7-ad21-659820f51622%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-13 Thread 'Mark S.' via TiddlyWiki
Ok. Here's code that should be able to do it.


*But PLEASE make a backup of your work before trying this IT'S REALLY 
IMPORTANT! THIS MACRO MAY CHANGE EVERY TIDDLER IN YOUR TW FILE!!*

There are several caveats here.

One is that *every eligible tiddler will have it's modification date 
changed.*

Do this on a desktop, not on a tablet or small device!

Another, when you first save the tiddler with the button, there may be a 
delay. You may be asked if you want to keep waiting. You need to keep 
waiting.

When you finally press the button, there will be even longer delays while 
it processes. You will probably be asked several times if you want to wait 
for the page before the process completes. It typically took 2 to 3 "waits" 
on tiddlywiki.com, and there's only 1100 tiddlers there!

I strongly recommend that you close out any tabs you don't need. In fact, 
be sure all your work in all your applications is saved in case the browser 
hangs the machine.

At the top of the code you can set a value for min-per-group. This is the 
minimum number of tiddlers you want before creating its own group entry. 
Paste the code into a tiddler and close the tiddler. Then, if you're sure 
you want to, press the button.

The reason this code is so inefficient is that it is generating all 17576 
possible combinations of 3 letters and checking to see if any of your 
tiddlers match by title. A much more efficient code could have been written 
with just a tiny bit of javascript. Oh well.

Be careful!
Have fun -- if you can!

-- Mark

\define min-per-group() 10
\define ABC() A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
\define xABC() A B C D E F
\define regexpABC() (?i)^$(letr1)$$(letr2)$$(letr3)$
\define glueABC() $(letr1)$$(letr2)$$(letr3)$

<$button> Create alphabetical TOC structure
   <$list filter="[enlist]" variable=letr1>
   <$list filter="[enlist]" variable=letr2>
   <$list filter="[enlist]" variable=letr3>
   <$list filter=
"[all[tiddlers]!has[draft.of]regexprestlimit[1]]" 
variable="dummy">
   <$action-setfield $tiddler=<> tags=<> /> 
   <$list filter="[all[tiddlers]regexp]" >
  <$fieldmangler>
<$action-sendmessage $message="tm-remove-tag" $param=<>/>
<$action-sendmessage $message="tm-add-tag" $param=<>/>
  
   
   










-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ade4bd25-2321-4301-bbd0-008b2f13b6d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-13 Thread 'Mark S.' via TiddlyWiki
Here's the pseudo TW code I'm considering (pseudo code means it doesn't 
actually work)

\define AtoZfilter() ...
\define glue123() ...
<$button> Create alphabetical TOC structure
   <$list A-Z variable=letr1
   <$list A-Z variable=letr2
   <$list A-Z variable=letr3
   <$list Use regular expression to to match by letr1-letr2-letr3. Use rest[
10] to make sure there's at least 10 items
  <$action-setfield create new tiddler with letr1-letr2-letr3 tagged 
with letr1. 
  <$list Use regular expression to match by letr1-letr2-letr3
  <$fieldmangler>
<$action-sendmessage tm-remove-tag Remove existing letr1 tag 
from matching items 
 







The idea is to try every combination of A-Z for a span of 3 letters, check 
if existing tiddlers match (up to a count determined by rest[number], and 
if so create tiddler ABC (tagged with "A") and then tag all matching 
tiddlers with ABC, deleting existing superfluous tag A. Hmm. Have to be 
sure not to delete the tag from the tiddler just created. Oh well.90% 
complete is pretty good.

I don't think I can get it to a few hours or more, so if someone else can 
write code (either to this or some other code) that's great -- but please 
post your intentions so the proverbial wheel isn't reinvented! ;-)

-- Mark

On Thursday, December 13, 2018 at 4:33:55 PM UTC-8, Damon Pritchett wrote:
>
> Tiddlywiki Wizards,
>
> My current Tiddlywiki project currently has over 1800 tiddlers and I have 
> a vertical tabbed TOC for each letter of the alphabet. This works pretty 
> well except for letters that have a lot of tiddlers that start with say, K, 
> that means a lot of scrolling. I would like to have a TOC that contains 
> each letter of the alphabet, but, underneath that, have a further 
> expandable choice based on, say, the first three characters of the title. 
> This should make going through the selections much easier and cleaner. The 
> image below illustrates what I'm talking about. I could do this manually, 
> but that seems like a lot of work. Thanks in advance for any suggestions.
>
> Damon
>
> [image: Capture.JPG]
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ef2c4c02-bf59-41ef-80c2-75d1d294bc7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-13 Thread TonyM
A Thought or two.

You can use css to set text to appear as upper case, even if is not. 
Careful use of sort should list aa Aa AA and aA together.

Perhaps you could set a "max list size" eg 26 items (before collapsing to 
subfolders)

In each level you test to see if there is more than 20 items using count[] 
then only subdivide that level if there are more than 20

eg Items beginning A > 20 use structured subfolder

A smart algorithm to compute when to create a subdivision would be nice, eg 
compute the number of sub-folders needed from the total count of the parent 
and then set the number needed to trigger a subfolder from being displayed. 
Who needs a sub-folder for one item?


Regards'
Tony



On Friday, December 14, 2018 at 11:56:01 AM UTC+11, Damon Pritchett wrote:
>
> Not necessarily.
>
> On Thursday, December 13, 2018 at 5:54:25 PM UTC-7, Mark S. wrote:
>>
>> Would those first 3 letters have to be capitalized, as you show in your 
>> example?
>>
>> -- Mark
>>
>> On Thursday, December 13, 2018 at 4:33:55 PM UTC-8, Damon Pritchett wrote:
>>>
>>> Tiddlywiki Wizards,
>>>
>>> My current Tiddlywiki project currently has over 1800 tiddlers and I 
>>> have a vertical tabbed TOC for each letter of the alphabet. This works 
>>> pretty well except for letters that have a lot of tiddlers that start with 
>>> say, K, that means a lot of scrolling. I would like to have a TOC that 
>>> contains each letter of the alphabet, but, underneath that, have a further 
>>> expandable choice based on, say, the first three characters of the title. 
>>> This should make going through the selections much easier and cleaner. The 
>>> image below illustrates what I'm talking about. I could do this manually, 
>>> but that seems like a lot of work. Thanks in advance for any suggestions.
>>>
>>> Damon
>>>
>>> [image: Capture.JPG]
>>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/495740f9-8370-49f7-a520-703f4a72b690%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-13 Thread Damon Pritchett
Not necessarily.

On Thursday, December 13, 2018 at 5:54:25 PM UTC-7, Mark S. wrote:
>
> Would those first 3 letters have to be capitalized, as you show in your 
> example?
>
> -- Mark
>
> On Thursday, December 13, 2018 at 4:33:55 PM UTC-8, Damon Pritchett wrote:
>>
>> Tiddlywiki Wizards,
>>
>> My current Tiddlywiki project currently has over 1800 tiddlers and I have 
>> a vertical tabbed TOC for each letter of the alphabet. This works pretty 
>> well except for letters that have a lot of tiddlers that start with say, K, 
>> that means a lot of scrolling. I would like to have a TOC that contains 
>> each letter of the alphabet, but, underneath that, have a further 
>> expandable choice based on, say, the first three characters of the title. 
>> This should make going through the selections much easier and cleaner. The 
>> image below illustrates what I'm talking about. I could do this manually, 
>> but that seems like a lot of work. Thanks in advance for any suggestions.
>>
>> Damon
>>
>> [image: Capture.JPG]
>>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b4beeb33-4a94-4bae-b537-9134f0e76036%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Collapsible TOC based on first characters of tiddler title

2018-12-13 Thread 'Mark S.' via TiddlyWiki
Would those first 3 letters have to be capitalized, as you show in your 
example?

-- Mark

On Thursday, December 13, 2018 at 4:33:55 PM UTC-8, Damon Pritchett wrote:
>
> Tiddlywiki Wizards,
>
> My current Tiddlywiki project currently has over 1800 tiddlers and I have 
> a vertical tabbed TOC for each letter of the alphabet. This works pretty 
> well except for letters that have a lot of tiddlers that start with say, K, 
> that means a lot of scrolling. I would like to have a TOC that contains 
> each letter of the alphabet, but, underneath that, have a further 
> expandable choice based on, say, the first three characters of the title. 
> This should make going through the selections much easier and cleaner. The 
> image below illustrates what I'm talking about. I could do this manually, 
> but that seems like a lot of work. Thanks in advance for any suggestions.
>
> Damon
>
> [image: Capture.JPG]
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0588fff0-3537-4eb1-ab35-05acbba7fe00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.