rclone serve webdav makes it very easy to serve folders of single file TiddlyWikis on a single address+port. Saving is handled automatically.
Working for me on Debian Buster. These are some notes to help those following the same path as me in the future.
The only moderate gotcha is that changes in the displayed directory take up to 5 minutes to appear - files are saved immediately and but the directory listing seems to take a while to refresh.
starttw.sh
- wrapper to kill previous rclone instances ( assumes you aren’t using rclone elsewhere) and launch a new instance of rclone serving from directory /folder/
to all addresses on port 8093, logging rclone to tw.log
. nohup
runs the instance in the background, so keeps running after you e.g. close the terminal:
#!/bin/sh
kill `pgrep -f rclone`
nohup rclone serve webdav /folder/ --addr 0.0.0.0:8093 2>&1 > tw.log &
Visiting http://localhost:8093
on the same machine (or e.g. http://bob.lan:8093
from network) points you to a web view of /folder/
:
Clicking on a TW e.g. tables.html
above will launch the TiddlyWiki.
killtw.sh
is a script to kill any running instances of rclone:
#!/bin/sh
kill `pgrep -f rclone`
(again, make sure you’re not using rclone elsewhere!)
You can make git
commit any changes every minute with something like dogit.sh
:
#!/bin/sh
cd /srv/data/ds_Vault/TWikis
git add .
git commit -am Auto
which you can have cron
run every minute:
nick@bob:~/Vault/TWikis$ crontab -l
* * * * * /bin/sh /folder/dogit.sh
Notes
-
rclone serve webdav
also works on Windows 10. - Timimi — One saver to rule them all - really amazing, keeps backups as well — however the method described in this post makes it easier to move between machines on a LAN.
HTH
Nick