Wrapping up TiddlyWiki

Over the past few weeks I've been exploring the free, open source, personal, portable, browser-based wiki system called TiddlyWiki, one of the most brilliant ideas I've seen for a long time. (I just discovered that some people call these types of applications "single page applications", or SPAs, and Google Code features a page dedicated to them.

Last week I discussed two of the five key TiddlyWiki components (macros and plugins), so we have just one more cover, cookies.

Browser cookies, as we all know, are small data files that are uploaded and downloaded to and from Web sites to store persistent site-specific information.

In the case of TiddlyWiki, cookies store configuration details, such as the wiki author's name and where backup files are located, so they can be used across multiple local browser sessions.

While this data could be stored in a tiddler (a page or document) it would mean that someone else using a copy of that TiddlyWiki would, erroneously, inherit the original author's configuration details.

The way that TiddlyWiki uses cookies when run locally reveals an interesting technical detail: The cookies use file URIs (as opposed to the usual http URIs). Cookies with file URIs are supported by most modern browsers but are not well documented and it's worth noting that the Google Chrome browser doesn't support them. (According to the Google Code page on SPAs there are good technical reasons for this limitation.)

Now that we have most of the important parts of TiddlyWiki covered we can look at the bigger context of these systems. As I explained two weeks ago, many TiddlyWikis are available online. If you want to use their content – which might be macros and plugins as well as text-based – rather than copy the content using cut and paste, you can import content from them.

In your TiddlyWiki (or mine on Tiddlyspot) you'll notice at the top right-hand corner of the user interface a link labeled "backstage". Click on the link and a menu will open across the top of the display offering you a number of system management options.

One of these options is "import". You'll find that trying to import tiddlers into an online TiddlyWiki won't work because of the limitations imposed by the "same origin" policy used by most JavaScript implementations (this prevents cross-site scripting). If you try the same operation, importing from an online or offline TiddlyWiki into a local TiddlyWiki, it will work fine as the policy doesn't apply to scripts and content loaded from file URIs.

What the import service looks for are tiddlers in the target TiddlyWiki. Tiddlers are formatted as follows:

<div title="Tiddler_Title" modifier="Tiddler_Author"

created="yyyymmddhhmm" modified=" yyyymmddhhmm"

changecount="n" tags="tag1 tag2 …">

<pre>Tiddler_Content</pre>

</div>

You are then offered a list of all tiddlers found and you choose which to import. On the backstage menu there's also a sync option which, if you imported tiddlers with the "save details" option, allows you to update your copies from the original tiddlers at any subsequent time.

Of course, with such predictable formatting you might guess that content can be easily imported and exported in forms other than as tiddlers. Thus many third party developers have created TiddlyWiki plugins that export content, such as RSS feeds and HTML pages, as well as others that import RSS feeds and Twitter tweets.

If you try TiddlyWiki, as I absolutely think you should, you'll want to test the different versions offered by TiddlySpot and you have to install the TiddlySnip Firefox extension. TiddlySnip turns a TiddlyWiki into a scrapbook – just right click in a page or on a selection in a page and you can save the content to your TiddlyWiki.

The sheer scale and richness of the TiddlyWiki world is remarkable and its potential in organizations as a means of distributing content and encouraging collaboration is enormous. So, go on, try TiddlyWiki out and let me know what you think.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Now read: Getting grounded in IoT