On Thu, 25 Apr 2013, Gary Hodgson wrote:
> I am starting to slowly develop parts of what might be considered core
> parts of TiddlyWeb, for our company's instance, and I am a little unsure
> how best to integrate my changes.
I think we talked about this in person but probably what you want to
do is create your own tiddlyweb plugin that represents the company
application (sometimes called a vertical). This would be similar to how
tiddlywebwiki is an application of tiddlyweb that assembles the
necessary tiddlyweb and tiddlywiki parts, or how
tiddlywebplugins.tiddlyspace is an application of tiddlyweb that does
the same (including tiddlywebwiki).
There's a brief, but very old, plugin tutorial which explains some
of the ways to get at functionality:
http://tiddlyweb.tiddlyspace.com/TiddlyWeb%20Plugin%20Tutorial
However inspecting the tiddlywebwiki and tiddlyspace source is
probably going to be most informative. The config.py, instance.py
and setup.py define and control the structure of the plugin and
dependencies.
Other resources that are important would be:
https://pypi.python.org/pypi/tiddlywebplugins.imaker
https://pypi.python.org/pypi/tiddlywebplugins.ibuilder
These are used to package up default resources that you need with
your plugin.
Quite some time ago and thing called pluginmaker was created which
demonstrates the basic structure when making a tiddlyweb plugin:
https://github.com/tiddlyweb/pluginmaker
> As an example, my initial mod is in BinaryTiddlersPlugin - adding filename
> functionality (i.e. the name of the file is remembered and not replaced
> with the tiddler title). Would you expect these changes to go into the
> source project (i.e. the js files in tiddlywebwiki) or as instance
> modifications to the actual Tiddler, and somehow deployed that way?
First you should determine if there's any chance that your
functionality could be useful to other people and integrated into
the existing plugin as an option. If so, then I'd recommend forking
it and submitting the changes back to the maintainer so that
everyone can benefit.
If not then the next thing to determine is if your additional
functionality can be accomplished by subclassing or monkey-patching
the existing thing. If so, then I would write the code in that way
and include it in your vertical.
If not then I would have your new version in your vertical in such a
way that when your vertical is installed or updated it clobbers the
existing plugin.
> The, slightly related, follow-up question is how do people usually develop
> on tiddlyweb itself? Do you modify the project and then build and deploy a
> local package using pip? Or is there another way? (I ask because running
> pip bundle seems to take quite a while to run).
Does the above information answer this question at all? If not,
shout out with some more concrete questions and I'm happy to provide
some guidance. At this point I'm not entire following whether you're
trying to create TiddlyWiki or TiddlyWeb side functionality (or
both) nor the development process you're following.
--
Chris Dent
http://burningchrome.com/
[...]