> This crazy idea is to populate columns in a table with content from a
> list.
Basically, what you want is a generator that reads content in one
format and writes it out in a different format, based on some
programmatic rules. Fortunately, this is reasonably easy to do by
using a combination of a tiddler section and TiddlyTools'
InlineJavascriptPlugin, like this:
[[SomeTiddler]]
---------------------------
/%
!tasks
1. got to do now
1. another important task
2. do soon
3. do in a month
4. on the back burner
2. maybe it can be in any order
!end
%/<script>
var here=story.findContainingTiddler(place); if (!here) return;
var lines=store.getTiddlerText(here.getAttribute('tiddler')
+'##tasks','').split('\n');
var out=[]; for (var i=0; i<lines.length; i++) {
var c=parseInt(lines[i]); if (isNaN(c)) continue;
out[c-1]=(out[c-1]?out[c-1]+'<br>':'')+lines[i].replace(new RegExp(c
+'\. '),'');
}
return '\n|'+out.join('|')+'|\n';
</script>
---------------------------------------
The first part of the tiddler defines a *hidden section* called
'tasks', into which you type your input list. The second part of the
tiddler is the script that parses the lines of text from the 'tasks'
section of the current tiddler and adds them to an array of column
text, based on the numeric prefix value on each line. That array is
then assembled into a TW table (i.e., leading/trailing "|", plus a "|"
in between each item) and returned by the script so that it will be
automatically rendered into the tiddler display.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios