Hi fellow trac-hacks users,
I'm finishing up a new version of the WatchlistPlugin which add several
new features inclusive an updated UI and i18n support (i.e. multiple
languages). Because some users need some helo getting starting with it I
came to the idea to provide a help page / manual, of course as TracWiki.
Because it supports i18n there should be different localised versions of
this manual: e.g. WatchlistManual, WatchlistManual/de,
WatchlistManual/fr, ...
This manual page could be placed on TH, but following the manual pages
of trac itself there should be installed on the users trac server.
I already figured out how to do this:
import pkg_resources
from trac.wiki.admin import WikiAdmin
def do_upgrade(env):
env[WikiAdmin].load_pages(
pkg_resources.resource_filename('tracwatchlist', 'manual'),
ignore=[], create_only=[])
Here all manual wiki pages are in the `manual` directory of the plugin
package.
Now, what is the best way/position to trigger this?
In the IEnvironmentSetupParticipant.upgrade_environment method ?
It's not really a DB upgrade and new versions of the manual could be
released independently from the source code. The best way would be to
hook in the `trac-admin wiki upgrade` command, but there is no interface
for this.
Any ideas about this?
Are there already any plugins which install their own wiki pages?
Best Regards,
Martin
_______________________________________________
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users