[dev] [draft] Proposal for jp subcommands

kedals0 at gmail.com kedals0 at gmail.com
Dim 17 Nov 11:36:38 CET 2013


Hi,

I'm implementing subcommand for jp client. In the attached archive, you
can find a first draft of this proposal. 

Each features (or group of features, bring by a plugin for instance) are
specified in a module which is imported by jp. The objective is to
dynamically enable a subcommand (or group of subcommands) if the bridge
offers required methods. this is currently not implemented but it will
be easy to check this on subcommand module loading.

In attachment, you will find:
- main.py : load jp subcommand modules
- base.py : base classes to write module
- message.py : to send message (this works for me)
- profile.py : to manage profile (this works for me)
- file.py : to send files to contact (doesn't work for me). Moreover, I
  have to add recv subcommands.

To see subcommands structure:
$ python main.py --help

About the profile that jp has to used, I propose to use an environnment
variable such as SAT_PROFILE (not implemented yet). Moreover, when a
command needs a profile, a '-p' argument can be specified which
overloads the environnment variable.

As you will see, the code is not really clean (ok, really dirty!). But I
can't take time to clean it without your approval.  

So I'm waiting for your opinion.
+
Dal.

-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: jp_subcommands.tgz
Type: application/x-gtar-compressed
Taille: 4956 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20131117/7aa3fd16/attachment.tgz>


Plus d'informations sur la liste de diffusion dev