trap10.net



2021-04-27

I have always been a big fan of tiddlywiki and its ability to write itself to disk. Over time, as browser security has improved, it has become harder to get tiddlywiki files to save themselves back to disk.

It has now gotten to the point that it is better to have the saving process as an external bit of software. After investigating the current programs/methods of saving tiddy files I decided to have a go at writing something that better suited my needs.


The software I have written is a partial implementaion of a web server with the tiddlyspot saver code built in. This means that the server can serve and save individual tiddlywiki files as well as serve normal html pages and other file types (css, javascript, images, etc). This allows files to be linked externally to the tiddlywiki and not have to embed them in the tiddlywiki file.

The executable is stand alone and written using the D programming language. It defaults to listening on the local address 127.0.0.1 port 9090 and should never be placed on an address that is internet facing as the software may have bugs that leave it open to being hacked.

If you prefix your tiddly files with "tiddly-", then browsing to /tiddly will list them as links and make it easier to access them.

If you use this software I would welcome comments/suggestions on improving the software for the use of others, the email address is shown in the --help output.

Output from --help
--config <file> load settings from config file named 'file'
--ip <address> set the interface to listen on (default is 127.0.0.1)
--php-path <path> specify the full path to the php-cgi binary (no default)
--port n  set the port to listen on (default is 9090)
--root <path>  set the path to the document root (default is current directory)
--version display the version string associated with this release
--help this help text                                                                   

Open up a terminal and run the executable, it will output some config text and then print the address and port it is listening on. In your web browser, browse to the address shown and append the name of the tiddlywiki file you have. For example if your file was called tiddly.html and you were using the default address and port, then type http://127.0.0.1:9090/tiddly.html to load the tiddly wiki file into the browser.


Configuring tiddlywiki to save using the executable

The software uses the URL /savetiddly to invoke the save code, so use that in the Server URL entry, the image shown below shows how the TiddlySpot saver panel should be completed. The password field must be completed but is not used at present. If you set a backup directory and create a directory with that name under the html root (as set by --root), then a copy of the original html file will be placed there when saving.




Windows Intel 64 bit download link (version 95355f2f91) 2021-04-27
sha256: 543c01549f6bba52518831c0ea2ed92b7318e7a5991a94ea24f3bc65cf429247
md5: df9743f4ad5ab1186471fcca6cdaa3a5
download: main.exe

Linux Intel 64 bit download link (version 95355f2f91) 2021-04-27
sha256: 609e23f53839376c710b8dfc74d5c52305a80bc60ebe27b80cd441b2cc881b25
md5: 67967f1c4f97173d6b6f45a2ff03aac2
download: main