|
|
@ -53,8 +53,10 @@ if not Path(".env").is_file():
|
|
|
|
configured = False
|
|
|
|
configured = False
|
|
|
|
console.log("[red] Your .env file is invalid, or was never created. Standby.")
|
|
|
|
console.log("[red] Your .env file is invalid, or was never created. Standby.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Checks to see if all values in .env are provided
|
|
|
|
|
|
|
|
# If they aren't, then asks to launch setup wizard
|
|
|
|
for val in REQUIRED_VALUES:
|
|
|
|
for val in REQUIRED_VALUES:
|
|
|
|
#print(os.getenv(val))
|
|
|
|
# print(os.getenv(val))
|
|
|
|
if val not in os.environ or not os.getenv(val):
|
|
|
|
if val not in os.environ or not os.getenv(val):
|
|
|
|
console.log(f'[bold red]Missing Variable: "{val}"')
|
|
|
|
console.log(f'[bold red]Missing Variable: "{val}"')
|
|
|
|
configured = False
|
|
|
|
configured = False
|
|
|
@ -65,20 +67,20 @@ for val in REQUIRED_VALUES:
|
|
|
|
console.log(
|
|
|
|
console.log(
|
|
|
|
"[red]We can also launch the easy setup wizard. type yes to launch it, or no to quit the program."
|
|
|
|
"[red]We can also launch the easy setup wizard. type yes to launch it, or no to quit the program."
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
while True: #Asks user whether they want to launch setup wizard until an understandable input is given
|
|
|
|
setup_ask = input("Launch setup wizard? > ")
|
|
|
|
setup_ask = input("Launch setup wizard? > ")
|
|
|
|
if setup_ask == "yes":
|
|
|
|
if setup_ask.casefold() == "yes":
|
|
|
|
console.log("[bold green]Here goes nothing! Launching setup wizard...")
|
|
|
|
console.log("[bold green]Here goes nothing! Launching setup wizard...")
|
|
|
|
time.sleep(0.5)
|
|
|
|
time.sleep(0.5)
|
|
|
|
os.system("python3 setup.py")
|
|
|
|
os.system("python3 setup.py")
|
|
|
|
|
|
|
|
|
|
|
|
elif setup_ask == "no":
|
|
|
|
elif setup_ask.casefold() == "no":
|
|
|
|
console.print("[red]Exiting...")
|
|
|
|
console.print("[red]Exiting...")
|
|
|
|
time.sleep(0.5)
|
|
|
|
time.sleep(0.5)
|
|
|
|
exit()
|
|
|
|
exit()
|
|
|
|
else:
|
|
|
|
|
|
|
|
console.print("[red]I don't understand that. Exiting...")
|
|
|
|
console.print("[red]I don't understand that.")
|
|
|
|
time.sleep(0.5)
|
|
|
|
time.sleep(0.5)
|
|
|
|
exit()
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
float(os.getenv("OPACITY"))
|
|
|
|
float(os.getenv("OPACITY"))
|
|
|
|
except:
|
|
|
|
except:
|
|
|
@ -90,6 +92,7 @@ except:
|
|
|
|
console.log("[bold green]Enviroment Variables are set! Continuing...")
|
|
|
|
console.log("[bold green]Enviroment Variables are set! Continuing...")
|
|
|
|
|
|
|
|
|
|
|
|
if configured:
|
|
|
|
if configured:
|
|
|
|
|
|
|
|
# Video generation
|
|
|
|
reddit_object = get_subreddit_threads()
|
|
|
|
reddit_object = get_subreddit_threads()
|
|
|
|
length, number_of_comments = save_text_to_mp3(reddit_object)
|
|
|
|
length, number_of_comments = save_text_to_mp3(reddit_object)
|
|
|
|
download_screenshots_of_reddit_posts(
|
|
|
|
download_screenshots_of_reddit_posts(
|
|
|
|