TW5: automatically import tiddlers?

200 views
Skip to first unread message

Dave

unread,
Jun 30, 2018, 5:18:24 PM6/30/18
to TiddlyWiki
Is there currently a way to import specific tiddlers (e.g. any tiddlers tagged "foo") from a named TW file every time you open another file?



Use Case:

I will have hundreds of files, each one used for a different client, and seeing as I'll never be finished designing the format of my records I anticipate constantly tweaking various macro tiddlers, e.g., and I'd want older files to be updated upon opening.

There used to be a plugin that would allow for this behaviour years ago (I think it was "include" plugin or something like that)



I need this to work for now in the single file version (as opposed to node.js - but eventually I probably want to convert the whole system to node (just not ready right now for that))


Thanks, 
Dave

Mark S.

unread,
Jun 30, 2018, 9:07:03 PM6/30/18
to TiddlyWiki
I believe that "include" plugin was part of TWC.

I suspect that any automated approach will still require node -- even if you don't use the "server", "tiddlers" or other aspects of tiddlywiki on node. In my testing, this seemed to work:

 tiddlywiki --load ./Voodo.html --load ./mymacros.html --output . --rendertiddler "$:/core/save/all" "Voodo.html" "text/plain"

I can imagine a script file with a similar command followed by a browser launch for the "Voodo" file. You could have a batch file like that for each client (hundreds of clients? business must be good!)

Of course, you could just drag and drop your macros onto your client TW whenever you need to update.

Maybe someone will come along with a better idea.

Good luck!
-- Mark

Dave

unread,
Jun 30, 2018, 10:47:48 PM6/30/18
to TiddlyWiki
oh, does that just overwrite the already existing one?

(Just checked - yes it does :)

Thank you Mark!  I'll search this out for once I make the transition to node

Mark S.

unread,
Jun 30, 2018, 11:01:44 PM6/30/18
to TiddlyWiki
Yeah - it overwrites - be sure to have a backup!

TonyM

unread,
Jul 1, 2018, 12:04:11 AM7/1/18
to TiddlyWiki
Dave,

I have wanted to do this myself for some time, and expect the answer is still no, however there is an opportunity to do it if we can get the following to refer to an external file


<$set name="tv-auto-open-on-import" value="no">
<$button>
<$action-sendmessage $message="tm-import-tiddlers" $param="???"/>
Import
</$button>
</$set>

Because rather than a button we could put this action in a tiddler tagged for startup actions https://tiddlywiki.com/#StartupActions

The worst case is you have a button in the first tiddler to click and select the import file.

Tony
Reply all
Reply to author
Forward
0 new messages