[Mailman-Developers] [GSoC 2014] Mailman CLI Project

Rajeev S rajeevs1992 at gmail.com
Tue May 20 03:15:45 CEST 2014


Hi,

I have pushed the revision 53, that has the following changes.

1. Refactoring as mentioned in the comments by Steve
2. Grouping of options and sub commands using subparsers
3. Changed the format of the command from *mmclient <scope> <action>*
     to *mmclient <action> <scope>*
4. Replaced ambiguous action *list* with *show*


The change mentioned in point 2 solves many/most of the problems
raised during the recent discussions.

The options are now paired with their corresponding sub commands.
The implications of this change is that the extra options/arguments
raise command syntax errors, which were ignored earlier. Further,
an great extent of leniency can be allowed in the command format.
To be specific, the parser can support the commands

*mmclient create list --list list1 --domain domain.org*

and

*mmclient set --key "foo" --value "bar"*

at the same time. Note that the second command has not specified a
scope.(PS: scope as in list, domain, user etc, and not site-wide, domain 
etc).

The change also prevents argparse from generating a dictionary
with all possible options (which may be huge).

The agreed change to add a positional argument for the *name*
(commands of the form *mmclient create list list at domain.org*)
has been postponed to the next revision, as this revision mostly
contains code refactoring.

http://bazaar.launchpad.net/~rajeevs1992/mailman.client/mailmancli/revision/53




More information about the Mailman-Developers mailing list