console.log("[red]Looks like you need to set your Reddit credentials in the .env file. Please follow the instructions in the README.md file to set them up.")
console.log("[red]Looks like you need to set your Reddit credentials in the .env file. Please follow the instructions in the README.md file to set them up.")
@ -12,8 +12,15 @@ from utils.console import print_step
fromutils.consoleimportprint_substep
fromutils.consoleimportprint_substep
fromrich.consoleimportConsole
fromrich.consoleimportConsole
fromutils.loaderimportLoader
fromutils.loaderimportLoader
fromos.pathimportexists
console=Console()
console=Console()
setup_done=exists(".setup-done-before")
ifsetup_done==True:
console.log("[red]Setup was already completed! Please make sure you have to run this script again. If you have to, please delete the file .setup-done-before")
exit()
# These lines ensure the user:
# These lines ensure the user:
# - knows they are in setup mode
# - knows they are in setup mode
# - knows that they are about to erase any other setup files/data.
# - knows that they are about to erase any other setup files/data.
@ -25,7 +32,7 @@ print_markdown(
)
)
# This Input is used to ensure the user is sure they want to continue.
# This Input is used to ensure the user is sure they want to continue.
ensureSetupIsRequired=input("Are you sure you want to continue? > ")
ensureSetupIsRequired=input("Are you sure you want to continue? > ").casefold()
ifensureSetupIsRequired!="yes":
ifensureSetupIsRequired!="yes":
console.print("[red]Exiting...")
console.print("[red]Exiting...")
time.sleep(0.5)
time.sleep(0.5)
@ -33,7 +40,7 @@ if ensureSetupIsRequired != "yes":
else:
else:
# Again, let them know they are about to erase all other setup data.
# Again, let them know they are about to erase all other setup data.
console.print("[bold red] This will overwrite your current settings. Are you sure you want to continue? [bold green]yes/no")
console.print("[bold red] This will overwrite your current settings. Are you sure you want to continue? [bold green]yes/no")
overwriteSettings=input("Are you sure you want to continue? > ")
overwriteSettings=input("Are you sure you want to continue? > ").casefold()