From d9bf0e509b9d3d746be1a000cc3480f095bd79f2 Mon Sep 17 00:00:00 2001 From: CordlessCoder Date: Mon, 6 Jun 2022 21:19:01 +0300 Subject: [PATCH] main.py surface level refactor --- main.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 92cc886..ea944f0 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,6 @@ #!/usr/bin/env python3 # Main from utils.console import print_markdown -from utils.console import print_step -from utils.console import print_substep from rich.console import Console import time from reddit.subreddit import get_subreddit_threads @@ -10,12 +8,10 @@ from video_creation.background import download_background, chop_background_video from video_creation.voices import save_text_to_mp3 from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts from video_creation.final_video import make_final_video -from utils.loader import Loader from dotenv import load_dotenv +import os console = Console() -from dotenv import load_dotenv -import os, time, shutil configured = True REQUIRED_VALUES = [ @@ -82,9 +78,9 @@ for val in REQUIRED_VALUES: exit() try: float(os.getenv("OPACITY")) -except: +except ValueError: console.log( - f"[red]Please ensure that OPACITY is set between 0 and 1 in your .env file" + "[red]Please ensure that OPACITY is set between 0 and 1 in your .env file" ) configured = False exit()