On May 22, 8:31 pm, Oveek <[email protected]> wrote:
> I've taken a stab at creating a basic load on demand setup and just
> pushed two plugins to my fork of tiddlyweb-plugins:
>
> *
> loadinitial:http://github.com/moveek/tiddlyweb-plugins/tree/8e7421acb8dc6a242dfec...
> *
> tiddlylinkfilter:http://github.com/moveek/tiddlyweb-plugins/tree/8e7421acb8dc6a242dfec...
Well this is just awesome. Very happy to see this.
By the way, if you haven't already done it, it's probably best to make
your fork for tiddlyweb-plugins have tiddlyweb/tiddlyweb-plugins as
its upstream, not cdent/tididlyweb-plugins.
> To try this out, grab both plugins, copy the config from the
> tiddlywebconfig.py supplied with loadinitial, and optionally tweak the
> list of initial tiddlers. The list of initial tiddlers in the config
> file is just an mselect query expressed as a dictionary (more on this
> below and in the README). The tiddlylinkfilter plugin extends the
> filter syntax with a new select attribute that is used in specifying
> some of the intial tiddlers in the aforementioned dictionary. I should
> note loadinitial requires the presence of the mselect plugin.
This is a nicely clever idea. Takes advantage of existing parts of the
system very well.
> Actually there's one minor issue that needs fixing before you can plug
> and play. The loadinitial plugin makes use of a custom key in the
> config dictionary called 'initial_tiddlers'. On encountering this
> custom key, the try block in the read_config() function (in config.py)
> throws a KeyError that is currently unhandled. Simply adding it to the
> except clause solves this problem.
I've got a fix for this that I'm just about to check in. Guess I never
tried to add a dict to the config for non-existent key.
> The plugins aim to provide a logical default selection based on the
> tiddlers listed above, and provide an easy way to add or remove
> tiddlers as desired.
Is nice.
> The custom select attribute 'in' is provided by the tiddlylinkfilter
> plugin. It takes the name of a tiddler (call it the condition tiddler)
> and selects the condition tiddler and all tiddlers referenced in the
> condition tiddler. If the condition tiddler links to 20 other
> tiddlers, then all 20 of those tiddlers plus the condition tiddler are
> selected. In the example above, the filter first creates a list of all
> the tiddlylinks in the body of DefaultTiddlers; the compiled list of
> tiddlers is then used for selection.
This is a very useful filter, for a variety of things. It will be
handy for abstracting a lot of duplicated code in some of the plugins
that already exist.
> Well that's about it. I'm running this setup right now and noting
> problems that come up. This is just experimental and of course doesn't
> solve any other issues like handling of searches, but it provides a
> pretty good way of further testing a load on demand setup.
How's it working out so far? Any surprises?
It's really great to see you doing this work. I'm especially glad that
you've posted up the code so people can have a poke themselves.
The way you've created your plugins is cool to see and really shows
off some of the flexibility I hoped, but wasn't sure, that I was
building into the system. You've made your plugins in a way that is
almost entirely different from how I would do it, but in a perfectly
reasonable and potentially better way.
One of the side effects of on demand loading is that the server will
be respond to [...]/tiddlers/{tiddler_name} URLs more than it has been
in the past, where lists of tiddlers were more common. Work I've been
doing recently should make it possible to make these operations quite
fast. So nice overlap. I'll post about some of that work shortly.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---