Hi Eric,

Thanks for the code. I was thinking more of a macro solution, since
this kind of thing seems to come up all the time. At least in my
world.  I was putting various kinds of data into tables, but it
becomes increasingly difficult to make changes. Storing the data as
tiddlers with slices would make maintenance much easier. What I'm
heading for would be more like (assuming it also incorporated your
MatchingTiddlers technology) :

  <<slicesToText
     format:<string>
     tag:<matching tiddlers string>
     sliceList:<CSV string>
     header:<string>
     footer:<string>
     sliceMatch:<string>
  >>

Where sliceMatch (and I'm not sure how I would implement this) might
allow something like "date>'2009-03'" ... so might be a pie-in-the-sky
feature.

Thanks,
Mark


On Apr 28, 7:21 pm, Eric Shulman <[email protected]> wrote:
> > I've started working on a plugin that will grab tiddlers that match a
> > tag, and then grab the slices out of them and format per a format
> > string (typically into a table). It occurs to me that maybe this
> > already exists. Is there a plugin like this already out there?
>
> You can do this very easily using
>    http://www.TiddlyTools.com/#InlineJavascriptPlugin
>
> <script>
>    var out=[];
>    var fmt='|%0|%1|%2|';
>    var tids=store.getTaggedTiddlers('someTag');
>    for (var i=0; i<tids.length; i++) { var t=tids[i].title;
>       var val1=store.getTiddlerSlice(t,'SomeSlice1')
>       var val2=store.getTiddlerSlice(t,'SomeSlice2')
>       var val3=store.getTiddlerSlice(t,'SomeSlice3')
>       out.push(fmt.format([val1,val2,val3]));
>    }
>    return out.join('\n');
> </script>
>
> Note: if you want to apply more complex boolean logic to the tag-
> selection criteria, you can also install
>    http://www.TiddlyTools.com/#MatchTagsPlugin
> and then replace this line of the above script:
>    var tids=store.getTaggedTiddlers('someTag');
> with something like this:
>    var tids=store.getMatchingTiddlers('someTag or someOtherTag and not
> somethingElse');
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to