|
|
@ -23,7 +23,7 @@ def handle_input(
|
|
|
|
nmax=None,
|
|
|
|
nmax=None,
|
|
|
|
oob_error="",
|
|
|
|
oob_error="",
|
|
|
|
):
|
|
|
|
):
|
|
|
|
match = re.compile(match)
|
|
|
|
match = re.compile(match + "$")
|
|
|
|
while True:
|
|
|
|
while True:
|
|
|
|
user_input = input(message + "\n> ").strip()
|
|
|
|
user_input = input(message + "\n> ").strip()
|
|
|
|
if re.match(match, user_input) is not None:
|
|
|
|
if re.match(match, user_input) is not None:
|
|
|
@ -149,7 +149,7 @@ user = handle_input(
|
|
|
|
20,
|
|
|
|
20,
|
|
|
|
"A username HAS to be between 3 and 20 characters",
|
|
|
|
"A username HAS to be between 3 and 20 characters",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
passw = handle_input("Password > ", False, "", "", 8, None, "Password too short")
|
|
|
|
passw = handle_input("Password > ", False, ".*", "", 8, None, "Password too short")
|
|
|
|
twofactor = handle_input(
|
|
|
|
twofactor = handle_input(
|
|
|
|
"2fa Enabled? (yes/no) > ",
|
|
|
|
"2fa Enabled? (yes/no) > ",
|
|
|
|
False,
|
|
|
|
False,
|
|
|
@ -159,7 +159,7 @@ twofactor = handle_input(
|
|
|
|
opacity = handle_input(
|
|
|
|
opacity = handle_input(
|
|
|
|
"Opacity? (range of 0-1) > ",
|
|
|
|
"Opacity? (range of 0-1) > ",
|
|
|
|
float,
|
|
|
|
float,
|
|
|
|
"",
|
|
|
|
".*",
|
|
|
|
"You need to input a number between 0 and 1",
|
|
|
|
"You need to input a number between 0 and 1",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
1,
|
|
|
|
1,
|
|
|
@ -206,4 +206,4 @@ loader.stop()
|
|
|
|
console.log("[bold green]Setup Complete! Returning...")
|
|
|
|
console.log("[bold green]Setup Complete! Returning...")
|
|
|
|
|
|
|
|
|
|
|
|
# Post-Setup: send message and try to run main.py again.
|
|
|
|
# Post-Setup: send message and try to run main.py again.
|
|
|
|
subprocess.call("python3 main.py", shell=True)
|
|
|
|
subprocess.call("python3 main.py", shell=False)
|
|
|
|