Hi Chris I'm afraid that I ended up going down a rather long rabbit hole there. I hope to be committing a major rewrite in the next day or two.
The background is that I realised there was a common element between your requirements for customising the link behaviour and some requirements that came out of my consultancy work. In both cases, I wanted to be able to make it easier to customise the behaviour of components within TiddlyWiki. So, I've radically re-engineered the current code to incorporate a flexible mechanism for plugins. In fact, TW5 is now a 500 line micro-kernel that runs on node.js or in the browser, and everything else is plugins. The kernel boots just enough of the TiddlyWiki environment to allow it to load tiddlers as plugins and execute them (a barebones tiddler class, a barebones wiki store class, some utilities etc.). Plugin modules are written like node.js modules; you can use require() to invoke sub components and to control load order. There are several different types of plugins: parsers, serializers, deserializers, macros etc. To my pleasure, I've been able to go much further than I expected. For example, individual tiddler fields are plugins, too: there's a plugin that knows how to handle the tags field, and another that knows how to handle the special behaviour of the modified and created fields. Some plugins have further sub-plugins; the wikitext parser, for instance, accepts rules as individual plugins. It's been fun doing such a major refactoring. I ended up starting from scratch, writing the new boot kernel first and then one by one transferring modules from the old code base to the new, refactoring as I've gone. One quite satisfying aspect is that I'm using the previous version of TW5 to build the new version. I've been thinking about this approach for a while. I'd consciously avoided implementing anything until I felt I understood enough of the requirements to be confident that any new mechanism was elegant and sufficient. It feels absolutely right, and is definitely a step up from the rather crude plugin model in classic TW. I'm now at the point where everything is up and running again, I'm just fixing some typos and fixing some bugs and then I'll commit the code. Once that's done I'll create a starter TiddlySpace plugin that we can use to refine tw5ikifier. Best wishes Jeremy -- Jeremy Ruston [email protected] On 29 Apr 2012, at 14:02, "[email protected]" <[email protected]> wrote: > On Fri, 20 Apr 2012, Jeremy Ruston wrote: > >> Just to let you know that I'm now going ahead and implementing >> TiddlySpace links directly in TW5, hopefully will be done later today. >> You may want to wait until those commits before you pick this up, > > Oh cool, glad to hear it. What's the status now? > > -- > Chris Dent http://burningchrome.com/ > [...] > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/tiddlywikidev?hl=en. > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
