Hello,

The 
TimingAndEstimationPlugin<http://trac-hacks.org/wiki/TimingAndEstimationPlugin>has
a user
manual<http://trac-hacks.org/browser/timingandestimationplugin/branches/trac0.12/timingandestimationplugin/usermanual.py>that
I upgrade
through the standard
IEnvironmentSetupParticipant<http://trac-hacks.org/browser/timingandestimationplugin/branches/trac0.12/timingandestimationplugin/api.py#L214>functions.
 Its a bit kludgey but it has been working through a couple
versions of trac and thus I haven't needed to upgrade for anything better.
I also haven't needed to deal with i18n yet, so I'm not sure how that would
affect my strategy.  I certainly like your package resouce stuff, better
than my giant python string :)

Cheers and hope this helps,
Russ

On Tue, Sep 21, 2010 at 6:01 PM, Martin Scharrer
<[email protected]>wrote:

> 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
>
_______________________________________________
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users

Reply via email to