mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Documentation
This commit is contained in:
parent
a5d6bc524d
commit
76f85e8fda
1 changed files with 17 additions and 10 deletions
27
yunohost
27
yunohost
|
@ -56,6 +56,8 @@ stored in args dictionnary.
|
||||||
Usage:
|
Usage:
|
||||||
You can add a category at the first level, action at the second one,
|
You can add a category at the first level, action at the second one,
|
||||||
and arguments at the third 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:
|
Documentation:
|
||||||
You can see all arguments settings at the argparse documentation:
|
You can see all arguments settings at the argparse documentation:
|
||||||
|
@ -72,7 +74,7 @@ action_dict = {
|
||||||
'general_arguments' : {
|
'general_arguments' : {
|
||||||
'-v' : {
|
'-v' : {
|
||||||
'full' : '--version',
|
'full' : '--version',
|
||||||
'help' : 'Display %(prog)s version',
|
'help' : _('Display %(prog)s version'),
|
||||||
'action' : 'version',
|
'action' : 'version',
|
||||||
'version' : '%(prog)s ' + __version__,
|
'version' : '%(prog)s ' + __version__,
|
||||||
},
|
},
|
||||||
|
@ -81,62 +83,67 @@ action_dict = {
|
||||||
# User #
|
# User #
|
||||||
#############################
|
#############################
|
||||||
'user' : {
|
'user' : {
|
||||||
'category_help' : 'Manage users',
|
'category_help' : _('Manage users'),
|
||||||
'actions' : {
|
'actions' : {
|
||||||
### user_list()
|
### user_list()
|
||||||
'list' : {
|
'list' : {
|
||||||
'action_help' : 'List users',
|
'action_help' : _('List users'),
|
||||||
'ldap' : True,
|
'ldap' : True,
|
||||||
'arguments' : {
|
'arguments' : {
|
||||||
'-a' : {
|
'-a' : {
|
||||||
'full' : '--all',
|
'full' : '--all',
|
||||||
'help' : 'Display all users',
|
'help' : _('Display all users'),
|
||||||
'action' : 'store_true'
|
'action' : 'store_true'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
### user_add()
|
### user_add()
|
||||||
'add' : {
|
'add' : {
|
||||||
'action_help' : 'Create user',
|
'action_help' : _('Create user'),
|
||||||
'ldap' : True,
|
'ldap' : True,
|
||||||
'arguments' : {
|
'arguments' : {
|
||||||
'-u' : {
|
'-u' : {
|
||||||
'full' : '--username',
|
'full' : '--username',
|
||||||
|
'metavar' : _('username'),
|
||||||
},
|
},
|
||||||
'-f' : {
|
'-f' : {
|
||||||
'full' : '--firstname',
|
'full' : '--firstname',
|
||||||
|
'metavar' : _('firstname'),
|
||||||
},
|
},
|
||||||
'-l' : {
|
'-l' : {
|
||||||
'full' : '--lastname',
|
'full' : '--lastname',
|
||||||
|
'metavar' : _('lastname'),
|
||||||
},
|
},
|
||||||
'-m' : {
|
'-m' : {
|
||||||
'full' : '--mail',
|
'full' : '--mail',
|
||||||
|
'metavar' : _('mail'),
|
||||||
},
|
},
|
||||||
'-p' : {
|
'-p' : {
|
||||||
'full' : '--password',
|
'full' : '--password',
|
||||||
|
'metavar' : _('password'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'info' : {
|
'info' : {
|
||||||
'ldap' : True,
|
'ldap' : True,
|
||||||
'action_help' : 'Get user informations',
|
'action_help' : _('Get user informations'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'domain' : {
|
'domain' : {
|
||||||
'category_help' : 'Manage domains',
|
'category_help' : _('Manage domains'),
|
||||||
'actions' : {}
|
'actions' : {}
|
||||||
},
|
},
|
||||||
'app' : {
|
'app' : {
|
||||||
'category_help' : 'Manage apps',
|
'category_help' : _('Manage apps'),
|
||||||
'actions' : {}
|
'actions' : {}
|
||||||
},
|
},
|
||||||
'monitor' : {
|
'monitor' : {
|
||||||
'category_help' : 'Monitoring functions',
|
'category_help' : _('Monitoring functions'),
|
||||||
'actions' : {}
|
'actions' : {}
|
||||||
},
|
},
|
||||||
'tools' : {
|
'tools' : {
|
||||||
'category_help' : 'Specific tools',
|
'category_help' : _('Specific tools'),
|
||||||
'actions' : {}
|
'actions' : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue