print("\t-l | --list \t\t\t\tLists all users in the userdb-file")
print("\t-a <username> | --add <username>\tAdd a user with the given username. Email and password will be queried via the terminal.")
print("\t-g <username> | --get <username>\tPrint all information about the given username (i.e. username, email and password hash).")
print("\t-d <username> | --delete <username>\tDelete the given user from the file. This also deletes email and the stored password hash. This can not be undone. A Confirmation via the Terminal is required.")
print("Multiple operations can be done with one call, but they can be executed in any order. Email/password entry and deletion confirmation will have a label to show which username is currently used.")
elifoptin("-l","--list"):
foruserinuserdb.list():
print(user)
elifoptin("-a","--add"):
user=UserInDB(username=arg)
user.email=input("Enter email for user \""+arg+"\": ")
password=getpass.getpass()
user.hashed_password=get_password_hash(password)
userdb.add(user)
elifoptin("-g","--get"):
user=userdb.get(arg)
print(user)
elifoptin("-d","--delete"):
confirmation=input("Are you sure you want to delete user \""+arg+"\"?(Y/default:N)")