Calling the tiddlywiki --rendertiddlers command directly on a .html TW

86 views
Skip to first unread message

Adithya B

unread,
Aug 22, 2020, 12:12:16 AM8/22/20
to TiddlyWiki
Hi,

Is it possible to use the tiddlywiki --rendertiddlers command on a single-file html TW?

I have been using the -load and -rendertiddlers commands seperately using an node server. 

I prefer to keep my TW as a single file for now. There is a usecase in mind which can work if the command can be used directly.

Cheers,
Adithya

Mark S.

unread,
Aug 22, 2020, 12:26:42 AM8/22/20
to TiddlyWiki
You can use tiddlyserver to serve up single file TW files as if they were a data folder (node) instance.

Adithya B

unread,
Aug 22, 2020, 2:31:59 AM8/22/20
to TiddlyWiki
Hi Mark,

My specific use is for generating my static webpage using TW5. 

To do this, I have been first calling 'tiddlywiki -load wikifile.html" and then "tiddlywiki --rendertiddler <some option here>" to render the static website. My question is if the first step can be omited somehow.

I hope that clarifies the problem.

Cheers,
Adithya

TW Tones

unread,
Aug 22, 2020, 2:34:37 AM8/22/20
to TiddlyWiki
Adithya

I think the answer is firmly no, but since I don't use commands against tiddlywiki but tend to operate inside wikis, I can assure you can achieve the same inside tiddlywiki by other means. In the pre-release there is a method to zip files so generated from within the interactive tiddlywiki. It is possible from inside the browser for both server and single file wikis.

What are you using this command to achieve? - you have now answered.?
Do you know this is deprecated now and you should use https://tiddlywiki.com/#RenderCommand ?

I posted recently on using the export facility for this.

Regards
Tony

Adithya B

unread,
Aug 22, 2020, 4:09:12 AM8/22/20
to TiddlyWiki
Thanks Tony.

I tried the --render command recently and it didnt function as expected. So switched back to rendertiddlers. Maybe its time to try that again.

I have automated the export of my TW into a static webpage (every week or so). This is automatically pushed to https://adithyab.in using github page.
Can the same be done from inside the TW?

Cheers,
Adithya

amreus

unread,
Aug 23, 2020, 12:35:45 PM8/23/20
to TiddlyWiki
Not sure this is exactly on topic, but may serve as an example workflow.  Below is an example of a Makefile I have been using to build a single-file genealogy wiki from multiple files.  The command line uses "--load" to handle several types of tidders including html, json, and tid, and then renders them all out as a single-html file.

I am a Windows user and I have "node" installed via the "scoop" package manager, as well as "make", "git",  and many other tools.  The Makefile uses the version of the TW command that I have checked out in my local copy of the main TW wiki.


TW = C:/Users/Amreus/Code/Repos/Jermolene/tiddlywiki5/tiddlywiki.js
GEDCOM = C:\Users\Amreus\genealogy\master-gedcom\gene.ged
TIDS := $(wildcard tiddlers/*.tid)

.PHONY: clean gene

gene.html: empty.html gene.json twig.json $(TIDS)
  node $(TW) --verbose \
    --load empty.html \
    --load gene.json \
    --load twig.json \
    --load tiddlers \
    --output . \
    --render $$:/core/save/all gene.html text/plain

empty.html:
  curl https://tiddlywiki.com/empty.html > empty.html

gene.json: gene.ged ged2tw5-2.rb
  ruby ged2tw5-2.rb gene.ged > gene.json

clean:
  del gene.html

Reply all
Reply to author
Forward
0 new messages