From 96d77f7ae0e32d0e44ebb9dc01a8b41200d3b391 Mon Sep 17 00:00:00 2001 From: HallowedDust5 Date: Tue, 21 Jun 2022 21:43:38 -0400 Subject: [PATCH] Added typing and redid function comment --- video_creation/screenshot_downloader.py | 12 +++++++----- video_creation/voices.py | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 6147dff..452bcd9 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -15,12 +15,14 @@ console = Console() storymode = False -def download_screenshots_of_reddit_posts(reddit_object, screenshot_num): - """Downloads screenshots of reddit posts as they are seen on the web. +def download_screenshots_of_reddit_posts(reddit_object:dict[str], screenshot_num:int): + """Downloads screenshots of reddit posts as seen on the web. Downloads to assets/temp/png + Args: - reddit_object: The Reddit Object you received in askreddit.py - screenshot_num: The number of screenshots you want to download. - """ + reddit_object (dict[str]): Reddit object received from 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 aaadd42..97e5917 100644 --- a/video_creation/voices.py +++ b/video_creation/voices.py @@ -23,7 +23,7 @@ def save_text_to_mp3(reddit_obj): """Saves text to MP3 files. Goes through the reddit_obj and generates the title MP3 file and a certain number of comments until the total amount of time exceeds VIDEO_LENGTH seconds. Args: - reddit_obj (dict[str]): Reddit object received from reddit API in askreddit.py + reddit_obj (dict[str]): Reddit object received from reddit API in subreddit.py Returns: tuple[int,int]: (total length of the audio, the number of comments audio was generated for)