[tw] Re: Tiddler titles are numbers: how to list them in number order?

2011-06-20 Thread PMario
If you also have tiddlers like

1 some text
200 some text
1.1 some text
3
4
4.111.3
4.111.02
...

A little bit more voodoo [1] is needed.

have fun!
[1] http://apm-plugins.tiddlyspot.com/#NumberedTextListPlugin


On Jun 20, 3:23 pm, Alex Hough  wrote:
> Hello All,
>
> My tidlers are numbered thus: 1,2,3,4,5,6 … 10 11
>
> Listing them results in this
> 1
> 10
> 11
> 2
> 3
> …
>
> I'd like them to be listed
> 1
> 2
> 3
> 4
>
> I've tried this before: Converting string to numbers, but I didn't get
> very far and abandoned it.
>
> Alex

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Tiddler titles are numbers: how to list them in number order?

2011-06-20 Thread rakugo
Hi Alex
The codes rather simple, I'll try to walk you through it.

All the TiddlyWiki filter handlers are stored in config.filters

In a filter [foo[bar]] the name of the filter handler is given by
"foo"
thus the handler would be located in the javascript variable
config.filters.foo

The handler gets two arguments - the tiddlers collected so far, being
the first and the second an array which is the result of a regular
expression match.
In the second argument, in the array, match[3] will always give you
"bar" (the value inside the square brackets)

Thus [tag[foo]][numbersort[title]] gets everything tagged foo
config.filters.numbersort gets passed the list of everything tagged
foo as the first argument and an array as the second, where title is
the value of match[3].
Then it just does a simple sort on this field.

Hope that helps! :)
On Jun 20, 2:57 pm, Alex Hough  wrote:
> Thanks Jon,
>
> It works.I am curious to learn how.
>
> Here is a question:
>
> Is 'match' a TW function?
> And is "[3]" corresponding to title?
>
> Alex
>
> On 20 June 2011 14:33, rakugo  wrote:
>
>
>
>
>
>
>
> > The sort mechanism treats them as strings.
> > The easy way is to name them
> > 01, 02 ... 99
>
> > The other way is to use:
> >http://filters.tiddlyspace.com/#NumberSortFilterPlugin
>
> > This defines a new filter for the latest released version of
> > TiddlyWiki that allows you to sort treating fields as numbers.
>
> > You should thus be able to do
> > <>
>
> > Enjoy
> > Jon
>
> > On Jun 20, 2:23 pm, Alex Hough  wrote:
> >> Hello All,
>
> >> My tidlers are numbered thus: 1,2,3,4,5,6 … 10 11
>
> >> Listing them results in this
> >> 1
> >> 10
> >> 11
> >> 2
> >> 3
> >> …
>
> >> I'd like them to be listed
> >> 1
> >> 2
> >> 3
> >> 4
>
> >> I've tried this before: Converting string to numbers, but I didn't get
> >> very far and abandoned it.
>
> >> Alex
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "TiddlyWiki" group.
> > To post to this group, send email to tiddlywiki@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > tiddlywiki+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/tiddlywiki?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



Re: [tw] Re: Tiddler titles are numbers: how to list them in number order?

2011-06-20 Thread Alex Hough
Thanks Jon,

It works.I am curious to learn how.

Here is a question:

Is 'match' a TW function?
And is "[3]" corresponding to title?

Alex

On 20 June 2011 14:33, rakugo  wrote:
> The sort mechanism treats them as strings.
> The easy way is to name them
> 01, 02 ... 99
>
> The other way is to use:
> http://filters.tiddlyspace.com/#NumberSortFilterPlugin
>
> This defines a new filter for the latest released version of
> TiddlyWiki that allows you to sort treating fields as numbers.
>
> You should thus be able to do
> <>
>
> Enjoy
> Jon
>
> On Jun 20, 2:23 pm, Alex Hough  wrote:
>> Hello All,
>>
>> My tidlers are numbered thus: 1,2,3,4,5,6 … 10 11
>>
>> Listing them results in this
>> 1
>> 10
>> 11
>> 2
>> 3
>> …
>>
>> I'd like them to be listed
>> 1
>> 2
>> 3
>> 4
>>
>> I've tried this before: Converting string to numbers, but I didn't get
>> very far and abandoned it.
>>
>> Alex
>
> --
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> To unsubscribe from this group, send email to 
> tiddlywiki+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/tiddlywiki?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Tiddler titles are numbers: how to list them in number order?

2011-06-20 Thread rakugo
The sort mechanism treats them as strings.
The easy way is to name them
01, 02 ... 99

The other way is to use:
http://filters.tiddlyspace.com/#NumberSortFilterPlugin

This defines a new filter for the latest released version of
TiddlyWiki that allows you to sort treating fields as numbers.

You should thus be able to do
<>

Enjoy
Jon

On Jun 20, 2:23 pm, Alex Hough  wrote:
> Hello All,
>
> My tidlers are numbered thus: 1,2,3,4,5,6 … 10 11
>
> Listing them results in this
> 1
> 10
> 11
> 2
> 3
> …
>
> I'd like them to be listed
> 1
> 2
> 3
> 4
>
> I've tried this before: Converting string to numbers, but I didn't get
> very far and abandoned it.
>
> Alex

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.