Update readme

uid 3 years ago
parent 69959d0b18
commit 6003807e44

@ -9,3 +9,50 @@ APIs for the Unit hacklab.
* Python >= 3.5
Create a virtual environment and activate it (optional):
virtualenv --python=/usr/bin/python3 env
source env/bin/activate
Run the setup:
python setup.py install
## Setup
In the ldap section of `config.yml` change host, port and password according to
your setup.
## Command Line
usage: phicli [-h] [--config config.yml]
{showuser,adduser,deluser,showgroup,listgroups,addtogroup} ...
optional arguments:
-h, --help show this help message and exit
--config config.yml custom configuration file
showuser dispaly user fields
adduser add a new user
deluser delete an user
showgroup show a group
listgroups list all groups
addtogroup add an user to a group
phicli showuser [-h] user_id
phicli adduser [-h] user_id
phicli deluser [-h] user_id
phicli showgroup [-h] common_name
phicli listgroups [-h]
phicli addtogroup [-h] user_id group_common_name

@ -45,7 +45,7 @@ def adduser(uid):
print('\nuid: {}\n{}\n\n'.format(uid, pp(user)))
@cli.register('delete an unser', ['user identifier'])
@cli.register('delete an user', ['user identifier'])
def deluser(uid):
check = input('Are you sure? [y/N] ') or 'N'
if check.lower() != 'y':