Thanks!
Mark
http://www.tiddlytools.com/#StorySaverPlugin
http://www.tiddlytools.com/#StorySaverPluginInfo
regards Måns Mårtensson
Thanks, but that's not what I'm looking for. I don't want to save a
story as a story, I want to compile the contents of the current story
into one tiddler.
My idea here is that if I use tiddlysnip several times on one web
page, I can then pack it all back together into one tiddler. Currently
I would have to do this meticulously by hand.
Thanks,
Mark
On Jan 6, 11:13 am, Måns <humam...@gmail.com> wrote:
> Yep
>
> http://www.tiddlytools.com/#StorySaverPluginhttp://www.tiddlytools.com/#StorySaverPluginInfo
Couldn't you speed up the process with StorySaverPlugin?
It gives you a tiddler with a list of wikilinked tiddlertitles for the
current story..
Next step would be to enclose each wikilinked tiddlertitle with the
tiddler macro <<tiddler [[tiddlertitle]]>> - wouldn't it?
Sorry if I don't get the point right...
regards Måns Mårtensson
On 6 Jan., 20:43, "Mark S." <throa...@yahoo.com> wrote:
> Hi Måns,
>
> Thanks, but that's not what I'm looking for. I don't want to save a
> story as a story, I want to compile the contents of the current story
> into one tiddler.
>
> My idea here is that if I use tiddlysnip several times on one web
> page, I can then pack it all back together into one tiddler. Currently
> I would have to do this meticulously by hand.
>
> Thanks,
> Mark
>
> On Jan 6, 11:13 am, Måns <humam...@gmail.com> wrote:
>
> > Yep
>
> >http://www.tiddlytools.com/#StorySaverPluginhttp://www.tiddlytools.co...
Hi Mark,
I think that would be useful. You helped me with a script a while back
that's almost there.
<script label="Backup">
var out=".";
var append=store.getTiddlerText(title);
var title="NewBackup";
*var tids=store.getTaggedTiddlers("mytag").reverse();*
for (var t=0; t<tids.length; t++)
append+=store.getTiddlerText(tids[t].title)+"\n";
store.saveTiddler(title,title,append);
return out;
</script>
Perhaps you could replace the *store.getTaggedTiddlers* with something
like this.
story.forEachTiddler(
function (title, element) {
out += "[["+title+"]]\n" ;
});
I tried it but am not knowledgeable enough to get the open tiddler
text, but only the titles.
Morris
This takes all the tiddlers in the current story, and packs them into
the top tiddler in the story. There may be other ways that would make
more sense, but that's the way it works at this point. All the other
tiddlers in the story are deleted.
The goal was that, if you have collected a half dozen snippets with
TiddlySnip, that you can quickly pack them into one tiddler. That was
the goal, but I've figured out an entirely different approach to
collecting web info (Using NoteTab pasteboard mode plus "Its all
text").
Mark
<script label="Compile">
//{{{
// This script should not be run from a tiddler that is
// part of the story!
var first = true;
var summaryTitle = "AccidentalTitle" ; // Need more scripting to
protect against empty story
var who, when, out,tags,fields, summaryElement ;
story.forEachTiddler(function(title,ele) {
//tid = story.findContainingTiddler(tid) ;
tid = store.getTiddler(title) ;
if(first) {
//var tid=store.getTiddler(t);
summaryTitle = title ;
summaryElement = ele ;
var who=tid?tid.modifier:config.options.txtUserName;
var when=tid?tid.modified:new Date();
out=tid?tid.text:'' ;
var tags=tid?tid.tags:[];
var fields=tid?tid.fields:{};
first = false ;
} else {
out+=tid.text ;
store.removeTiddler(title) ;
story.closeTiddler(title) ;
}
/*-- FOR LATER get new tags and add to existing tags (if any) */
//var newtags=curTiddler.tagsfield.value.readBracketedList();
//for (var i=0; i<newtags.length; i++) tags.pushUnique(newtags
[i]);
} ) ; // foreach
/* write and show tiddler */
store.saveTiddler(summaryTitle,summaryTitle,out, who, when, tags,
fields);
story.refreshAllTiddlers(true) ;
//story.displayTiddler(story.findContainingTiddler
(summaryElement),summaryTitle);
//}}}
</script>
Now I get it :-)
Great idea (and great coding I suppose..)- and thanks for sharing -
However as usual I'm having problems when guessing where the
linebreaks should be.
I'm getting this error: SyntaxError: missing ) after argument list
Here's the script: http://journalermm.tiddlyspot.com/#Compile
Regards Måns Mårtensson
It's a brilliant addition to the backpack of great tools available for
TiddlyWiki.
Eric's SplitTiddler transclusion and your Compile Story script are
good companions...
I often use spreadsheets and other programs to process similar tasks
with tiddlerdata-
with these tools I can stay with TiddlyWiki all the way - I love it! -
Thanks.
Maybe you could even add some of the functionalties from Eric's
SplitTiddler transclusion?
Choose tiddlers to include by title, tags etc - option for setting
linebreaks interval between compiled tiddlers... get a list of
tiddlers to compilation to rearrange order ... that said - I think
your script is doing a great job as it is.
Regards Måns Mårtensson