MCPcopy
hub / github.com/elebumm/RedditVideoMakerBot / main

Function main

main.py:49–64  ·  view source on GitHub ↗
(POST_ID=None)

Source from the content-addressed store, hash-verified

47
48
49def main(POST_ID=None) -> None:
50 global reddit_id, reddit_object
51 reddit_object = get_subreddit_threads(POST_ID)
52 reddit_id = extract_id(reddit_object)
53 print_substep(f"Thread ID is {reddit_id}", style="bold blue")
54 length, number_of_comments = save_text_to_mp3(reddit_object)
55 length = math.ceil(length)
56 get_screenshots_of_reddit_posts(reddit_object, number_of_comments)
57 bg_config = {
58 "video": get_background_config("video"),
59 "audio": get_background_config("audio"),
60 }
61 download_background_video(bg_config["video"])
62 download_background_audio(bg_config["audio"])
63 chop_background(bg_config, length, reddit_object)
64 make_final_video(number_of_comments, length, reddit_object, bg_config)
65
66
67def run_many(times) -> None:

Callers 2

run_manyFunction · 0.85
main.pyFile · 0.85

Calls 10

get_subreddit_threadsFunction · 0.90
extract_idFunction · 0.90
print_substepFunction · 0.90
save_text_to_mp3Function · 0.90
get_background_configFunction · 0.90
chop_backgroundFunction · 0.90
make_final_videoFunction · 0.90

Tested by

no test coverage detected