OokTech / TW5-Bob

A plugin that makes tiddlywiki a multi-user wiki on node
BSD 3-Clause "New" or "Revised" License
216 stars 28 forks source link

TW5-Bob

BIG DISCLAMER OF DOOM - Back up your data. Do it. This has been tested but there may be bugs that I don't know about. Also see notes below.

What does it do?

A lot of the documentation is in the tiddler files in the Documentation folder of the plugin, or in the wiki in the plugin information on the control panel.

How do I set it up?

Easiest Version (Bundled Application)

To make this more accessible to people I made it so you can download a single file and then run it and everything should work. When you run it it should even open the wiki in your default browser.

To do use this go here (https://github.com/OokTech/TW5-BobEXE) and download the file for your system (BobLinux for linux, BobWin.exe for windows and BobOSX for mac). Then run the file.

It will create an index wiki in the same folder where you run the file, so if you want you can copy the file somewhere else. If you want to move it after you have run it the first time just be sure to copy the IndexWiki folder to the same location or it will create a new one without any changes you have made.

Manual Version

If you are familiar with using tiddlywiki on node than you just need to put the plugin into your plugins folder and include it in your tiddlywiki.info file. For the moment this plugin must be located in the OokTech/Bob subfolder of your plugins folder and listed as OokTech/Bob in the tiddlywiki.info file. You start the server using the wsserver command instead of the server command.

Also see Configuration.md.

Step by step instructions (using Node)

If you want to use a fresh local install of tiddlywiki here are command line instructions:

Clone the tiddlywiki repo and get the plugin (Only do this the first time to install everything):

git clone --depth=1 --branch v5.1.22 https://github.com/Jermolene/TiddlyWiki5.git
git clone --depth=1 https://github.com/OokTech/TW5-Bob.git TiddlyWiki5/plugins/OokTech/Bob
mkdir TiddlyWiki5/Wikis
cp -r TiddlyWiki5/plugins/OokTech/Bob/MultiUserWiki TiddlyWiki5/Wikis/BobWiki/

After that is finished, and to start up tiddlywiki later type:

cd TiddlyWiki5
node ./tiddlywiki.js Wikis/BobWiki  --wsserver

In a browser go to 127.0.0.1:8080 and the wiki should load. From here any tiddlers you create should have .tid files created in the Wikis/BobWiki/tiddlers folder, any edits you do to those files should be immediately reflected in the browser. Open the tiddler called $:/ServerIP, if you go to the ip address listed there on port 8080 (on mine right now the tiddler says 192.168.0.15, so I put 192.168.0.15:8080 in the browser of another computer on the same network to access the wiki). Now any changes you make to tiddlers on one computer will be reflected almost immediately on the other, and any changes you make to tiddlers or the file system will be almost immediately reflected in all connected wikis.

If you want to use the global tiddlywiki install you have to set the environment variable TIDDLYWIKI_PLUGIN_PATH and TIDDLYWIKI_EDITION_PATH to the folder where you have your plugins. On OSX or Linux you open a terminal and type these commands:

export TIDDLYWIKI_PLUGIN_PATH="/path/to/your/plugins"
export TIDDLYWIKI_EDITION_PATH="/path/to/your/editions"
tiddlywiki editions/BobWiki  --wsserver

If you want to change settings see Configuration.md for information.

Updating Bob on a manual install

When a new version of Bob is released you can update your plugin like this. If you followed the instructions above exactly than you use this. If you cloned the repo elsewhere than you need to cd into the folder where you cloned the plugin.

You can do this to make sure you have the most recent version, running this command when you already have the newest version does nothing and won't break anything so you can try it if you are not sure without worrying.

In a terminal type these commands:

cd TiddlyWiki5
cd plugins/OokTech/Bob
git pull

Updating TiddlyWiki on a manual install

This is to update your version of tiddlywiki, not Bob.

When TiddlyWiki release a new version you need to update your TiddlyWiki version also. This assumes that you followed the above instructions exactly. If you cloned the TiddlyWiki repo somewhere else than you have to cd into that folder instead.

In a terminal type these commands:

cd TiddlyWiki5
git fetch --all --tags --prune
git checkout tags/v5.1.22

To use future or previous versions you would change the 5.1.22 in the last command to match the version number you want to use.

Notes

NOTE 1 - .meta files: there isn't full support for .meta files. The only currently known limitation is that when you rename either the .meta file or the file it describes the changes aren't correctly reflected in the browsers. Renaming in the browser works as expected. Also empty .tid files are created for any tiddler with a _canonical_uri field in addition to the .meta file. This has no effect on the wiki.

NOTE 2 - command line arguments and configuration: I am terrible with command line arguments. To prevent the need to have 10 or 15 command line arguments in order to fully configure a wiki I instead added a settings folder in the same folder that holds the tiddlers folder and the tiddlywiki.info file. Inside this folder there is a settings.json file that you can use the configure the wiki. This also lets you change the wiki's settings from within the wiki. Most of the settings wouldn't take effect until the wiki server is reset, so I made a way to reset the wiki server from inside the wiki. You can also shutdown the wiki server from inside the wiki.


More Details

Here is a more detailed list of things added or changed by this plugin