Thanks for the script!
Is there a way to get this to sort by author?
I found that I can tweak the EndNote APA style:
BOOK:
`|`author`|`Author`|`
`|`year`|`(Year)`|`
`|`title`|`Title`|`
`|`(Translator, Trans.)`|`
`|`city`|`City`|`
`|`publisher`|`Publisher`|`
to get EndNote to output the slices:
|author|Goble, P.|
|year|(1980)|
|title|The gift of the sacred dog: story and illustrations|
|place|Scarsdale, N.Y.|
|publisher|Bradbury Press|
<script>
var out=[];
var fmt='%0 //[[%1]]//. %2. %3, %4<br>';
var tids=store.getTaggedTiddlers('DogsFolklore');
for (var i=0; i<tids.length; i++) { var t=tids[i].title;
var val1=store.getTiddlerSlice(t,'author')
var val2=store.getTiddlerSlice(t,'title')
var val3=store.getTiddlerSlice(t,'city')
var val4=store.getTiddlerSlice(t,'publisher')
var val5=store.getTiddlerSlice(t,'year')
out.push(fmt.format([val1,val2,val3,val4,val5]));
}
return out.join('\n');
</script>
Bibliography:
Goble, P. [[The gift of the sacred dog: story and illustrations]].
Scarsdale, N.Y.. Bradbury Press, (1980).
This is nice.
Now, if I had several such books tagged DogsFolklore, is there a way
to change the inline script so that the resulting bibliography is
sorted by author?
On Apr 28, 8: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
-~----------~----~----~----~------~----~------~--~---