[TW5] How does $:/core/save/all work?

129 views
Skip to first unread message

TheDiveO

unread,
Aug 31, 2014, 11:37:07 AM8/31/14
to tiddly...@googlegroups.com
I'm still having many difficulties in finding my way through the TW5 boot process and the core. I see in boot/boot.js that when running in Node.js (server mode) the wiki directories get scanned and all files in there get loaded as tiddlers. But how is $:/core/save/all assembled? I've tried to find where this happens but I seem to be blind. Please help!

Best regards,
TheDiveO

Andreas Hahn

unread,
Aug 31, 2014, 11:56:23 AM8/31/14
to tiddly...@googlegroups.com
Hi TheDiveO,

great to see that you are interested in this. Th tiddler $:/core/save/all (as well as the other save/* tiddlers) can be found in the folder hirarchy under core/templates/save-all.tid. Also if you want to learn more about TW5's architecture, i believe you should also have a look at this: https://homepages.thm.de/~cjrk68/Wiki.html (which was shown in a recent hangout)

Coincidentally I am also currently experimenting with templates and trying to understand the tiddlers in core/templates/* and how they work to generate static versions of the wiki and the css.

/Andreas
--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

TheDiveO

unread,
Aug 31, 2014, 12:48:12 PM8/31/14
to tiddly...@googlegroups.com
Hi Andreas,

thank you for the pointers. By coincidence I had noticed the fine work of Christian Heigele and Christian Jurke also a few weeks ago; it's a useful resource about the inner workings of TW5.

But more important to me was you mentioning that the $:/core/save/all tiddler isn't special (as I was afraid of) but instead can be found inside the TW5 repository and there inside the core/templates/ folder. I completely missed this folder as for some reason my searches didn't brought up the $:/core/save/all tiddler, albeit it is sitting here: core/templates/save-all.tid. So thank you very much for making me aware of it. I'm to focused on the repo file structure exactly representing the system tiddler structure, it seems...

So I can now try to roll my own "save-all-except-things-already-in-my-plugin"... any idea on how to filter those tiddlers that are present both as a normal tiddler and a shadow tiddler (from my plugin)? The rationale is that I want to save a TW5 edition that contains my plugin tiddler as well as some associated documentation, but not the plugin tiddlers that have shadows; this is because I'm developing my plugin in TW5 using my hierarchical file saver adaptor in order to use a single repository structure without any need for symbolic links or copying files around.

Any help appreciated,
TheDiveO

Jeremy Ruston

unread,
Sep 1, 2014, 4:34:48 AM9/1/14
to TiddlyWikiDev
Hi TheDiveO

 I completely missed this folder as for some reason my searches didn't brought up the $:/core/save/all tiddler

It sounds like what you need is a reliable way of searching across the entire TiddlyWiki5 repository directory tree. I use search all the time during development to help me locate things. I use a text editor called Sublime Text 2 that has decent search capabilities, but I'm sure there are many others.

So I can now try to roll my own "save-all-except-things-already-in-my-plugin"... any idea on how to filter those tiddlers that are present both as a normal tiddler and a shadow tiddler (from my plugin)? The rationale is that I want to save a TW5 edition that contains my plugin tiddler as well as some associated documentation, but not the plugin tiddlers that have shadows; this is because I'm developing my plugin in TW5 using my hierarchical file saver adaptor in order to use a single repository structure without any need for symbolic links or copying files around.

I'll create a repo showing how to do this.

Best wishes

Jeremy.






--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

PMario

unread,
Sep 1, 2014, 7:26:35 AM9/1/14
to tiddly...@googlegroups.com, jeremy...@gmail.com
On Monday, September 1, 2014 10:34:48 AM UTC+2, Jeremy Ruston wrote:
Hi TheDiveO

 I completely missed this folder as for some reason my searches didn't brought up the $:/core/save/all tiddler

It sounds like what you need is a reliable way of searching across the entire TiddlyWiki5 repository directory tree. I use search all the time during development to help me locate things. I use a text editor called Sublime Text 2 that has decent search capabilities, but I'm sure there are many others.

I use the Brackets [1] editor. It's free, open source, has a lot of extensions eg: git integration, jshint, .. , supported for many OSes ..
It's based on codemirror, so it may be possible in the future, to get a tiddlywiki syntax highlighter plugin :)

For javascript it has the "edit / view inline"
eg: if you have code like this

$tw.utils.pus][hTop(classes,this.selectedClass.split(" "));

and you want to know how .pushTop() works just place the cursor ][ there and hit <ctrl><e>
It opens the the

exports.pushTop = function(array,value) { .... }

source within the active editor. ... That's the best feature of all :)

have fun!
mario

[1] http://brackets.io/
Reply all
Reply to author
Forward
0 new messages