[kforge-dev] programaticaly installing plugin

Martin Fuzzey mfuzzey at gmail.com
Mon Feb 25 17:33:34 UTC 2008


Hi all,

I'm trying to install plugins from a script.

docs/plugin_system.txt says to do :

$ kforge-admin create plugin <plugin-name>


However this command is not recognized "Sorry, not a valid command: create
plugin svn"

Indeed I can't see anywhere in the code where this command is implemented

cli_shell.txt on the other hand gives another approach involving directly
manipulating the domain objects in python.

This works when run manually in interactive mode so I thought I could use
the "-c" option to kforge-admin to pass a script file, however the -c option
appears not to be implemented

Indeed from dm/cli/admin.py:

    def runScript(self):
        # todo: Generalise implementation in provide.cli.admin
        pass



So what's the correct way of installing plugins - I like the "korge-admin
create plugin" method since it keeps the knowledge of the domain model
within kforge itself.

Am I missing something here?

I _could_ make it work as is by doing a kforge-admin --interactive combined
with input redirection but that seems a bit of a hack to me.

So unless there are any objections I propose to patch kforge/cli/admin.py to
implement the "create plugin" command.

OTOH maybe "plugin create" would be more consistent with the otther commands
which are of noun/verb form "db init" "www build" etc

Regards,

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/kforge-dev/attachments/20080225/5a097874/attachment-0001.html>


More information about the kforge-dev mailing list