Fixing setup.py creation of .env file with all new parameters #685 #725

pull/731/head
Marcel 3 years ago
parent ec5826e153
commit c0e8ba8f14

@ -60,6 +60,7 @@ console.print("[bold green]Reddit 2FA (yes or no)")
console.print("[bold green]Opacity (range of 0-1, decimals are OK)")
console.print("[bold green]Subreddit (without r/ or /r/)")
console.print("[bold green]Theme (light or dark)")
console.print("[bold green]Random Thread (yes or no)")
console.print(
"[green]If you don't have these, please follow the instructions in the README.md file to set them up."
)
@ -138,6 +139,13 @@ theme = handle_input(
r"(light)|(dark)",
"You need to input 'light' or 'dark'",
)
Random_thread = handle_input(
"Random Thread? (yes/no)",
False,
r"(yes)|(no)",
"You need to input either yes or no",
)
loader = Loader("Attempting to save your credentials...", "Done!").start()
# you can also put a while loop here, e.g. while VideoIsBeingMade == True: ...
console.print("Writing to the .env file...")
@ -148,9 +156,14 @@ REDDIT_CLIENT_SECRET="{client_sec}"
REDDIT_USERNAME="{user}"
REDDIT_PASSWORD="{passw}"
REDDIT_2FA="{twofactor}"
RANDOM_THREAD="no"
RANDOM_THREAD="{Random_thread}"
THEME="{theme}"
SUBREDDIT="{subreddit}"
OPACITY={opacity}
VOICE="Matthew"
TTsChoice="polly"
STORYMODE="False"
"""
)

Loading…
Cancel
Save