Node.js save to single-tiddlywiki html file

77 views
Skip to first unread message

Christoph Chalfin

unread,
Nov 26, 2020, 6:47:11 AM11/26/20
to TiddlyWiki

Hello,

I am currently running Tiddlywiki via node.js, so all tiddlers are saved in separate files. I now need to convert these tiddlers into a single html file with all the tiddlywiki functionalities. So basically converting a node.js-version into a single-file version.

Is that possible or is there a template I can use together with the --render command?

Thank you!

Mark S.

unread,
Nov 26, 2020, 9:57:34 AM11/26/20
to TiddlyWiki
If memory serves, from the command line you want:

tiddlywiki mynewwiki --build index

(where mynewwiki is your wiki name). 

This will put your wiki as "index.html" in directory "output"  below your existing tiddlywiki file.

soren.b...@gmail.com

unread,
Nov 26, 2020, 10:07:08 AM11/26/20
to TiddlyWiki
To export the wiki to a single file exactly as it is:

--render "$:/core/save/all"

That doesn't work so great, though, because it includes the plugins that sync with the node.js server, which means you'll get a bunch of errors when you try to view it anywhere else. Better is to use the --build command as Mark says, which will take care of extracting that stuff for you.

--build just executes a series of other commands found in the "build" section of the tiddlywiki.info file. By default there is an "index" target in there that does what you want. If you're curious to see exactly what's going on, or you need to tweak something, take a look there.

scheuermann.chr

unread,
Nov 26, 2020, 2:07:57 PM11/26/20
to tiddl...@googlegroups.com
Perfect, thank you for your help! I will try it later tonight! 



Von meinem/meiner Galaxy gesendet


-------- Ursprüngliche Nachricht --------
Datum: 26.11.20 16:07 (GMT+01:00)
An: TiddlyWiki <tiddl...@googlegroups.com>
Betreff: [tw5] Re: Node.js save to single-tiddlywiki html file

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/7G-l2alVK8E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5c1f22cf-230e-464d-9604-ca7f3745adbfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages