|
|
|
@ -56,6 +56,9 @@ console.log("[bold green]Reddit Client Secret")
|
|
|
|
|
console.log("[bold green]Reddit Username")
|
|
|
|
|
console.log("[bold green]Reddit Password")
|
|
|
|
|
console.log("[bold green]Reddit 2FA (yes or no)")
|
|
|
|
|
console.log("[bold green]Opacity (range of 0-1, decimals are OK)")
|
|
|
|
|
console.log("[bold green]Subreddit (without r/ or /r/)")
|
|
|
|
|
console.log("[bold green]Theme (light or dark)")
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
console.print("[green]If you don't have these, please follow the instructions in the README.md file to set them up.")
|
|
|
|
|
console.print("[green]If you do have these, type yes to continue. If you dont, go ahead and grab those quickly and come back.")
|
|
|
|
@ -80,6 +83,9 @@ cliSec = input("Client Secret > ")
|
|
|
|
|
user = input("Username > ")
|
|
|
|
|
passw = input("Password > ")
|
|
|
|
|
twofactor = input("2fa Enabled? (yes/no) > ")
|
|
|
|
|
opacity = input("Opacity? (range of 0-1) > ")
|
|
|
|
|
subreddit = input("Subreddit (without r/) > ")
|
|
|
|
|
theme = input("Theme? (light or dark) > ")
|
|
|
|
|
console.log("Attempting to save your credentials...")
|
|
|
|
|
loader = Loader("Saving Credentials...", "Done!").start()
|
|
|
|
|
# you can also put a while loop here, e.g. while VideoIsBeingMade == True: ...
|
|
|
|
@ -98,6 +104,12 @@ with open('.env', 'a') as f:
|
|
|
|
|
f.write(f'REDDIT_PASSWORD="{passw}"\n')
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
f.write(f'REDDIT_2FA="{twofactor}"\n')
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
f.write(f'THEME="{theme}"\n')
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
f.write(f'SUBREDDIT="{subreddit}"\n')
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
f.write(f'OPACITY="{opacity}"\n')
|
|
|
|
|
|
|
|
|
|
with open('.setup-done-before', 'a') as f:
|
|
|
|
|
f.write("This file blocks the setup assistant from running again. Delete this file to run setup again.")
|
|
|
|
@ -107,4 +119,4 @@ loader.stop()
|
|
|
|
|
console.log("[bold green]Setup Complete! Returning...")
|
|
|
|
|
|
|
|
|
|
# Post-Setup: send message and try to run main.py again.
|
|
|
|
|
os.system("python3 main.py")
|
|
|
|
|
os.system("python3 main.py")
|
|
|
|
|