diff --git a/utils/videos.py b/utils/videos.py index 3a456cd..07659f6 100755 --- a/utils/videos.py +++ b/utils/videos.py @@ -10,7 +10,7 @@ from utils.console import print_step def check_done( - redditobj: Dict[str], + redditobj: Submission, ) -> Submission: # don't set this to be run anyplace that isn't subreddit.py bc of inspect stack """Checks if the chosen post has already been generated @@ -21,7 +21,6 @@ def check_done( Returns: Dict[str]|None: Reddit object in args """ - with open("./video_creation/data/videos.json", "r", encoding="utf-8") as done_vids_raw: done_videos = json.load(done_vids_raw) for video in done_videos: diff --git a/video_creation/final_video.py b/video_creation/final_video.py index e429dbc..81b9b98 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -26,13 +26,13 @@ console = Console() W, H = 1080, 1920 -def make_final_video(number_of_clips: int, length: int, reddit_obj: Dict[str]): +def make_final_video(number_of_clips: int, length: int, reddit_obj: dict): """Gathers audio clips, gathers all screenshots, stitches them together and saves the final video to assets/temp Args: number_of_clips (int): Index to end at when going through the screenshots length (int): Length of the video - reddit_obj (Dict[str]): The reddit object that contains the posts to read. + reddit_obj (dict): The reddit object that contains the posts to read. """ print_step("Creating the final video 🎥") VideoFileClip.reW = lambda clip: clip.resize(width=W) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 670a472..e8afc44 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -17,14 +17,13 @@ from utils.console import print_step, print_substep storymode = False -def download_screenshots_of_reddit_posts(reddit_object: Dict[str], screenshot_num: int): +def download_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): """Downloads screenshots of reddit posts as seen on the web. Downloads to assets/temp/png Args: reddit_object (Dict[str]): Reddit object received from reddit/subreddit.py screenshot_num (int): Number of screenshots to downlaod """ - print_step("Downloading screenshots of reddit posts...") # ! Make sure the reddit screenshots folder exists diff --git a/video_creation/voices.py b/video_creation/voices.py index d02a14e..5105a10 100644 --- a/video_creation/voices.py +++ b/video_creation/voices.py @@ -24,7 +24,7 @@ TTSProviders = { } -def save_text_to_mp3(reddit_obj: Dict[str]) -> Tuple[int, int]: +def save_text_to_mp3(reddit_obj) -> Tuple[int, int]: """Saves text to MP3 files. Args: