Quickly create a temporary TiddlyWiki

If you use NodeJS and a shell scripting setup like bash or fish-shell then you can use mktemp command to create temporary TW. You can also use it Linux SubSystem on Windows.

Here is my fish-shell script for reference.

function tiddlytemp -d "Create temporary TiddlyWiki"
   set temp (mktemp -d)
   set port 9999
   tiddlywiki $temp/temp --init server
   and begin
       tm_printMessage "Created temporary TiddlyWiki at $temp"
       open http://127.0.0.1:$port
       tiddlywiki  $temp/temp --listen --port $port
       tm_printMessage "Clean up $temp"
       trash -rf $temp
   end
end
  1. Create a temporary directory
  2. Create TW server edition in the temp directory
  3. Launch the TW server
  4. Open the URL in the browser
  5. Delete the temporary directory when the user stops the server
  6. The trash commands moves the TW to the recycle bin, so I can restore it if necessary.

I use these temporary TW to quickly try plugins, configurations, or bugs etc.

1 Like