diff --git a/.gitignore b/.gitignore index ecd5c4a..da0481a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ final/ .env reddit-bot-351418-5560ebc49cac.json __pycache__ -out \ No newline at end of file +out +*.mp4 diff --git a/main.py b/main.py index b9d13e7..ba5e079 100644 --- a/main.py +++ b/main.py @@ -9,6 +9,8 @@ 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 import random +from dotenv import load_dotenv +import os 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. \n ### This modified version of this tool was created by [@tya.design](https://tya.design) and is available on [GitHub](https://github.com/Tyaaa-aa/RedditVideoMakerBot)." @@ -38,8 +40,9 @@ video_title = reddit_object["thread_title"] chosen_subreddit = reddit_object["subreddit"] ffmpeg_exe = reddit_object["ffmpeg_exe"] +load_dotenv() length, number_of_comments = save_text_to_mp3(reddit_object, MAX_LENGTH, VOICE_ACCENT) -download_screenshots_of_reddit_posts(reddit_object, number_of_comments) +download_screenshots_of_reddit_posts(reddit_object, number_of_comments, os.getenv("THEME")) download_background(BACKGROUND_VIDEO) chop_background_video(BACKGROUND_VIDEO, length) final_video = make_final_video(number_of_comments, chosen_subreddit, video_title, ffmpeg_exe, VIDEO_SPEED)