added the option to comfirm the thread

pull/456/head
Thomas Devlamminck 3 years ago
parent 862d7f25e3
commit 83bb3bfb52

@ -10,6 +10,10 @@ REDDIT_2FA=""
#If no, it will ask you a thread link to extract the thread, if yes it will randomize it. #If no, it will ask you a thread link to extract the thread, if yes it will randomize it.
RANDOM_THREAD="yes" RANDOM_THREAD="yes"
# Once the thread is generated you can comfirm it or generate a new one. (Yes for this to be active).
# If this is left blank the bot will choose a thread randomly and make the video
ONE_CLICK="yes"
# Valid options are "light" and "dark" # Valid options are "light" and "dark"
THEME="" THEME=""

@ -109,8 +109,16 @@ except ValueError:
exit() exit()
console.log("[bold green]Enviroment Variables are set! Continuing...") console.log("[bold green]Enviroment Variables are set! Continuing...")
if configured: def main():
reddit_object = get_subreddit_threads() reddit_object = get_subreddit_threads()
if os.getenv("ONE_CLICK") == "yes": #The user isn't forced to choose the random thread
u_inp = input("Is this a good threads?(Y/N/Stop) :")
if u_inp.upper() == 'STOP': exit()
elif u_inp.upper() != 'Y':
console.log(f"[red]Searching for a new thread...")
main()
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(
reddit_object, number_of_comments, os.getenv("THEME", "light") reddit_object, number_of_comments, os.getenv("THEME", "light")
@ -121,3 +129,7 @@ if configured:
if noerror is True: if noerror is True:
break break
final_video = make_final_video(number_of_comments) final_video = make_final_video(number_of_comments)
if configured:
main()

Loading…
Cancel
Save