quickly-talk team mailing list archive
-
quickly-talk team
-
Mailing list archive
-
Message #00041
Enhancing quickly add
The command "$quickly add" can only gather plugins for a project from
the originating template e.g.
"$quickly add dialog" only works if the <originating
template>/store/dialog.py file exists.
I would like to extend this for local plugins by having "$quickly
add" search in <originating template>/store and in another path,
perhaps ~/quickly-project-plugins.
Currently "$quickly add" imports the current plugins <originating
template>/store/*.py but import is unwise for 3rd party code.
Existing API
<originating template>/store/*.py
must be importable
contain module attribute option
( e.g. option = 'quickly add dialog <dialog-name>')
contain module attribute help_text, with optional internationalisation
(e.g. help_text= _("""...""")
contain function add
(function signature add(options) )
Proposed API
~/quickly-project-plugins/*.py
plugin is a script (so no import possible or add function necessary)
optionally contains module attribute QUICKLY_OPTIONS
(e.g. QUICKLY_OPTIONS = 'dialog <dialog-name>')
optionally contains module docstring
must be called from project root
( this is true for "$quickly add" anyway)
A disadvantage is lack of internationalisation in docstring
There is a branch lp:~quickly-committers/quickly/add_widgets
containing code but it depends on controversial configuration code.
Follow ups