From 76f85e8fda55c1ca253840c3068474234fc1ddfd Mon Sep 17 00:00:00 2001 From: Kload Date: Wed, 10 Oct 2012 18:13:39 +0200 Subject: [PATCH] Documentation --- yunohost | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/yunohost b/yunohost index 904728b1..b1975874 100755 --- a/yunohost +++ b/yunohost @@ -56,6 +56,8 @@ stored in args dictionnary. Usage: You can add a category at the first level, action at the second one, and arguments at the third one. + If the action need LDAP connexion, don't forget to add 'ldap' : True + to the action parameters. Documentation: You can see all arguments settings at the argparse documentation: @@ -72,7 +74,7 @@ action_dict = { 'general_arguments' : { '-v' : { 'full' : '--version', - 'help' : 'Display %(prog)s version', + 'help' : _('Display %(prog)s version'), 'action' : 'version', 'version' : '%(prog)s ' + __version__, }, @@ -81,62 +83,67 @@ action_dict = { # User # ############################# 'user' : { - 'category_help' : 'Manage users', + 'category_help' : _('Manage users'), 'actions' : { ### user_list() 'list' : { - 'action_help' : 'List users', + 'action_help' : _('List users'), 'ldap' : True, 'arguments' : { '-a' : { 'full' : '--all', - 'help' : 'Display all users', + 'help' : _('Display all users'), 'action' : 'store_true' }, } }, ### user_add() 'add' : { - 'action_help' : 'Create user', + 'action_help' : _('Create user'), 'ldap' : True, 'arguments' : { '-u' : { 'full' : '--username', + 'metavar' : _('username'), }, '-f' : { 'full' : '--firstname', + 'metavar' : _('firstname'), }, '-l' : { 'full' : '--lastname', + 'metavar' : _('lastname'), }, '-m' : { 'full' : '--mail', + 'metavar' : _('mail'), }, '-p' : { 'full' : '--password', + 'metavar' : _('password'), }, } }, 'info' : { 'ldap' : True, - 'action_help' : 'Get user informations', + 'action_help' : _('Get user informations'), }, } }, 'domain' : { - 'category_help' : 'Manage domains', + 'category_help' : _('Manage domains'), 'actions' : {} }, 'app' : { - 'category_help' : 'Manage apps', + 'category_help' : _('Manage apps'), 'actions' : {} }, 'monitor' : { - 'category_help' : 'Monitoring functions', + 'category_help' : _('Monitoring functions'), 'actions' : {} }, 'tools' : { - 'category_help' : 'Specific tools', + 'category_help' : _('Specific tools'), 'actions' : {} } }