diff --git a/.env.template b/.env.template index e95c209..b5de1f6 100644 --- a/.env.template +++ b/.env.template @@ -18,3 +18,6 @@ SUBREDDIT="" # Range is 0 -> 1 OPACITY="0.9" + +# Once the thread is generated you can comfirm it or generate a new one. (Yes for this to be active) +ONE_CLICK="yes" diff --git a/main.py b/main.py index 9aabe78..33ac2ac 100644 --- a/main.py +++ b/main.py @@ -89,8 +89,16 @@ except: exit() console.log("[bold green]Enviroment Variables are set! Continuing...") -if configured: +def main(): 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) download_screenshots_of_reddit_posts( reddit_object, number_of_comments, os.getenv("THEME", "light") @@ -98,3 +106,8 @@ if configured: download_background() chop_background_video(length) final_video = make_final_video(number_of_comments) + +if configured: + main() + +