chore: remove debug statements and clean up

pull/440/head
Asad 2 years ago
parent acb6017d5b
commit 8472915cf9

@ -2,14 +2,13 @@
# Main # Main
from utils.console import print_markdown from utils.console import print_markdown
from rich.console import Console from rich.console import Console
import time
from reddit.subreddit import get_subreddit_threads from reddit.subreddit import get_subreddit_threads
from video_creation.background import download_background, chop_background_video from video_creation.background import download_background, chop_background_video
from video_creation.voices import save_text_to_mp3 from video_creation.voices import save_text_to_mp3
from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts
from video_creation.final_video import make_final_video from video_creation.final_video import make_final_video
from dotenv import load_dotenv from dotenv import load_dotenv
import os import time, os
console = Console() console = Console()
@ -22,16 +21,13 @@ REQUIRED_VALUES = [
"OPACITY", "OPACITY",
] ]
print_markdown( print_markdown(
"### Thanks for using this tool! [Feel free to contribute to this project on GitHub!](https://lewismenelaws.com) If you have any questions, feel free to reach out to me on Twitter or submit a GitHub issue." "### Thanks for using this tool! [Feel free to contribute to this project on GitHub!](https://lewismenelaws.com) If you have any questions, feel free to reach out to me on Twitter or submit a GitHub issue."
) )
""" """
Load .env file if exists. If it doesnt exist, print a warning and launch the setup wizard. Load .env file if exists. If it doesnt exist, print a warning and launch the setup wizard.
If there is a .env file, check if the required variables are set. If not, print a warning and launch the setup wizard. If there is a .env file, check if the required variables are set. If not, print a warning and launch the setup wizard.
""" """
client_id = os.getenv("REDDIT_CLIENT_ID") client_id = os.getenv("REDDIT_CLIENT_ID")
@ -45,13 +41,11 @@ load_dotenv()
console.log("[bold green]Checking environment variables...") console.log("[bold green]Checking environment variables...")
time.sleep(1) time.sleep(1)
if not os.path.exists(".env"): if not os.path.exists(".env"):
configured = False configured = False
console.log("[red] Your .env file is invalid, or was never created. Standby.") console.log("[red] Your .env file is invalid, or was never created. Standby.")
for val in REQUIRED_VALUES: for val in REQUIRED_VALUES:
# print(os.getenv(val))
if val not in os.environ or not os.getenv(val): if val not in os.environ or not os.getenv(val):
console.log(f'[bold red]Missing Variable: "{val}"') console.log(f'[bold red]Missing Variable: "{val}"')
configured = False configured = False

Loading…
Cancel
Save