[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-08 Thread Tobias
Hi Måns... I guess, above all, slices allow you to put any context around them, without influencing your ability to list them. So you're not constrained to a well-formed hr-separated list. Tobias. On Sep 8, 12:20 am, Måns humam...@gmail.com wrote: Thanks for the hint Tobias - I haven't used

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-08 Thread Eric Shulman
I guess, above all, slices allow you to put any context around them, without influencing your ability to list them. So you're not constrained to a well-formed hr-separated list. Slices *are* very useful. However, there are some limitations that you should be aware of: You need to know what

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-08 Thread Eric Shulman
I tried to implement these line in the first script like this: script var out=; var txt=store.getTiddlerText($1,); var items=txt.split(\n\n); { if (!items[1]) items=txt.split(\n); // start a new row out += |+items[i]; // add item to row } out += |\n; // end last row return out;

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-08 Thread Måns
Eric Alternatively, here's some general-purpose code that first tries to split the text on the HR separator... and if only one item results (i.e., there are *no* HR separators in the text), then tries splitting on just a simple newline, allowing either format to be used, as appropriate:  

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-08 Thread Måns
Eric - is it somehow possible to make the script work on a lineseperated list produced by a fET? This would give infinite possibilites for producing tables with data fetched from tiddlers - and sorted by the fET.. I know how to make a single multicolumned table in a fET already - but it would

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-06 Thread AlanBCohen
First question, I m not familiar with the term hr-seperated list.. Do you mean a list which has each item separated by a 'hard return' or CarriageReturnLineFeed combination? Or is there some other character string separating the items? If this is a one-time occurrence to take this list and

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-06 Thread Eric Shulman
First question, I m not familiar with the term hr-seperated list.. An 'HR-separated list' is a text-based syntax that I've developed and used in numerous TiddlyTools plugins and inline scripts. Basically, it's a tiddler containing lines of text, divided up into 'items' of one or more lines,

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-06 Thread Måns
Hi Eric - this is true magic : - ) Of course *you* would say that it's easy - I only had a hunch - that it ought to be easy - considering what I've seen uptill now!! 2 questions: 1) If I could make it work with any hr-seperated lists like this: tiddler TiddlerContainingScript with

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-06 Thread Eric Shulman
tiddler TiddlerContainingScript with SomeTiddlerName I presume it's a matter of changing (SomeTiddler,) to ('$1','') ?? Am I on the right track? Yup. That will work. (note: the with: param above needs to have a : on the end of it) My next action with the hr-seperated list would be to add

[tw] Re: How to turn a hr-seperated list into a table with several columns?

2009-09-06 Thread Eric Shulman
Can I automake a hr-seperated list from a normal lineseperated list with quickeditplugin in some way? If the tiddler contains single lines, you could use it as is, by changing the script from var items=store.getTiddlerText($1,).split(\n\n) to just var