Could you use a similar technique to add characters to lines in a tiddler at
specific places? For example after a tiddler contains a list of references
in this format;

Aaker, D.A. (1991) Managing brand equity: Capitalizing on the value of a
brand name, NY: Free Press

Aaker, D.A. (1996) Building strong brands, NY: Free Press

I would like to add tabs after each field

Aaker, D.A. [tab] (1996) [tab ] Building strong brands, [tab] NY: [tab] Free
Press


The reason is that I have 1000 + references in this form in a TW and need to
have them in endnote as well.  I thought if I could add the tabs using
javascript (perhaps my first adventure into reg ex) then export as plain
text , the job would be a good one.

Anyone else using end note and TW?

Best Wishes
Alex


2009/4/29 Eric Shulman <[email protected]>

>
> > 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
> >
>


-- 
t: 0161 442 2202
m: 0781 372 50 17
skype: alexhough
delicious: alexhough

--~--~---------~--~----~------------~-------~--~----~
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