|
|
@ -1,8 +1,9 @@ |
|
|
|
import base64 |
|
|
|
import logging |
|
|
|
import random |
|
|
|
import string |
|
|
|
from typing import Optional |
|
|
|
from os import path |
|
|
|
from typing import Optional |
|
|
|
|
|
|
|
import click |
|
|
|
from click import Context |
|
|
@ -111,7 +112,14 @@ def list_users(): |
|
|
|
[click.echo(user.name) for user in all_users] |
|
|
|
|
|
|
|
|
|
|
|
@click.command(name='base64') |
|
|
|
@click.argument('text') |
|
|
|
def convert_to_base64(text: str): |
|
|
|
print(base64.b64encode(text.encode('utf8')).decode('utf8')) |
|
|
|
|
|
|
|
|
|
|
|
main.add_command(user_command_group) |
|
|
|
main.add_command(convert_to_base64) |
|
|
|
user_command_group.add_command(register_user) |
|
|
|
user_command_group.add_command(register_admin_user) |
|
|
|
user_command_group.add_command(delete_user) |
|
|
|