Building Older Versions of TiddlyWiki Using Git and Node

Continuing the discussion from Mermaid-tw5 plugin update to mermaid 8.13.2:

If for any reason you want to create an older (or the opposite “prerelease”) version of a TiddlyWiki, you can use git and node to build one from the Github repository.

For example, here are the commands to build a single-file empty v5.2.1 (I’m using Windows command line, but Linux would look identical I think.)

> git clone https://github.com/Jermolene/TiddlyWiki5.git
> cd TiddlyWiki5
> git checkout v5.2.1
> cd ..
> node TiddlyWiki5/tiddlywiki.js newwiki --init
> node Tiddlywiki5/tiddlywiki.js newwiki --build

There should be a v5.2.1 file named empty.html in the newwiki/ouput folder.

The first command is a one-time operation - it only needs to be done once to create the repository locally.

To keep the repository up to date…

> cd TiddlyWiki5
> git checkout master
> git pull

Or delete the TiddlyWiki5 folder if you’re done with it - you can always just clone it again anytime.

To view the available versions, you can type (in the TiddlyWiki5 repository folder)

> git tag --list
(clipped for bevity)
v5.1.22
v5.1.23
v5.1.3
v5.1.4
v5.1.5
v5.1.6
v5.1.7
v5.1.8
v5.1.9
v5.2.0
v5.2.1
v5.2.2
v5.2.3

If you just want a copy of an empty TiddlyWiki of a previous version, they can also be found in the git commit history where each entry corresponds to a different release: History for empty.html - Jermolene/jermolene.github.io · GitHub
(Edited August 14, 2022 by saqimtiaz)

1 Like

Thanks @amreus!
Worked like a charm, after inverting backslashes to forward slashes (on linux here).

Fred

Cool! I did switch the example to forward slashes - they actually work on Windows command line too. It’s just tab-completion does not work as it does when you use \.