diff --git a/.env.template b/.env.template index cab265e..309b7b5 100644 --- a/.env.template +++ b/.env.template @@ -12,4 +12,5 @@ THEME="" SUBREDDIT="" # Range is 0 -> 1 -OPACITY="0.9" +TITLE_OPACITY="1" +COMMENT_OPACITY="0.9" \ No newline at end of file diff --git a/main.py b/main.py index 1b66e8c..4f3a451 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ from video_creation.final_video import make_final_video from dotenv import load_dotenv import os, time, shutil -REQUIRED_VALUES = ["REDDIT_CLIENT_ID","REDDIT_CLIENT_SECRET","REDDIT_USERNAME","REDDIT_PASSWORD", "OPACITY"] +REQUIRED_VALUES = ["REDDIT_CLIENT_ID","REDDIT_CLIENT_SECRET","REDDIT_USERNAME","REDDIT_PASSWORD", "COMMENT_OPACITY", "TITLE_OPACITY"] 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." diff --git a/video_creation/final_video.py b/video_creation/final_video.py index fe10b2a..a8f6a81 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -21,7 +21,8 @@ def make_final_video(number_of_clips): # Calls opacity from the .env load_dotenv() - opacity = os.getenv('OPACITY') + titleopacity = os.getenv('COMMENT_OPACITY') + commentopacity = os.getenv('TITLE_OPACITY') print_step("Creating the final video...") @@ -51,7 +52,7 @@ def make_final_video(number_of_clips): .set_duration(audio_clips[i + 1].duration) .set_position("center") .resize(width=W - 100) - .set_opacity(float(opacity)), + .set_opacity(float(commentopacity)), ) image_clips.insert( 0, @@ -59,7 +60,7 @@ def make_final_video(number_of_clips): .set_duration(audio_clips[0].duration) .set_position("center") .resize(width=W - 100) - .set_opacity(float(opacity)), + .set_opacity(float(titleopacity)), ) image_concat = concatenate_videoclips(image_clips).set_position( ("center", "center")