On Mar 24, 3:03 pm, FND <[email protected]> wrote:
> > 1. get a copy of the plugin module file [...]
> > 2. put it in the instance directory
> > 3. edit tiddlywebconfig.py
>
> I think a significant bottleneck here is #3 - at least with regards to
> the initial setup. It's also problematic because it means the respective
> user/admin has to write at least a tiny bit of Python code.

I'd like to hear from other people if they think this (above) is a
considerable issue.

> As discussed a few months ago, it might be nice if TiddlyWeb were to
> automatically pick up all plugins in a given directory.
> Since direct inclusion might be a bit odd due to sys.path and whatnot,
> perhaps twanager could do some "preprocessing" to amend the
> configuration before starting the server?

My initial reluctance was based around a few issues:

* Code duplication on the server. If there are multiple instances on
the same machine, if TiddlyWeb picks up plugins from ./plugins or
something like that then the admin needs to either do a bunch of
symlinking or have multiple copies of stuff. If they symlink one
directory to all instances, then may as well use Python packages in
site-packages.
* Similar to previous: if there are multiple copies of plugins
scattered around the server then keeping those plugins up to date as
bugs are fixed and what not becomes a real chore.
* I don't really want to add complexity to the core code where there
already exist mechanisms for enabling the desired behavior.

Python already has sys.path() which tells a process from where to
import modules. TiddlyWeb plugins are just modules.

Python already has packages, pypi, and easy_install which are systems
for installing and upgrading modules. TiddlyWeb plugins are just
modules.

The cost of taking advantage of these built in (to the Python context)
systems is that one has to explicitly state which plugins one wants,
in the tiddlywebconfig.py file. I think this is a good thing. Try
running this:

   python -m this |grep -iw explicit

All that said: If somebody wanted to write a TiddlyWeb plugin manager
plugin and it became wildly popular then the people have spoken and
such behavior ought to be included in the core. What a plugin would
need to do is:

* know a directory or directories where plugins live
* list the .py files in those directories
* add the names to config['system_plugins'] and/or config
['twanager_plugins']

> > updating TiddlyWeb plugins [...] can be a bit tedious
>
> True - that's a different angle from the above though...

But is connected.

> > the leading contender for "how to distribute" TiddlyWeb plugins is
> > simply to distribute them as Python packages

[snip]

> How about something similar to instance_tiddlers - i.e. automatically
> pulling in a set of TiddlyWeb plugins when creating/updating an instance?

That's certainly an option. The emerging way to do it is just to use a
script with some wget or curl commands. This methods appears to be
insufficiently self-contained for some participants.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to