implementation of -t parameter

pull/280/head
iaacornus 3 years ago
parent 4bea2372dc
commit 0e70327bd3
No known key found for this signature in database
GPG Key ID: 281739AE7252598C

@ -38,6 +38,12 @@ def program_options():
help="Set a filename for the video.", help="Set a filename for the video.",
action="store" action="store"
) )
parser.add_argument(
"-t",
"--thread",
help="Use the given thread link instead of randomized.",
action="store"
)
args = parser.parse_args() args = parser.parse_args()
@ -46,7 +52,8 @@ def program_options():
main( main(
args.subreddit, args.subreddit,
args.background, args.background,
args.filename args.filename,
args.thread,
) )
else: else:
print_substep("Error occured!", style="bold red") print_substep("Error occured!", style="bold red")

@ -12,7 +12,7 @@ from video_creation.final_video import make_final_video
from utils.console import print_markdown, print_substep from utils.console import print_markdown, print_substep
def main(subreddit_=None, background=None, filename=None): def main(subreddit_=None, background=None, filename=None, thread_link_=None):
""" """
Load .env file if exists. If it doesnt exist, print a warning and Load .env file if exists. If it doesnt exist, print a warning and
launch the setup wizard. If there is a .env file, check if the launch the setup wizard. If there is a .env file, check if the
@ -61,7 +61,7 @@ def main(subreddit_=None, background=None, filename=None):
console.log("[bold green]Enviroment Variables are set! Continuing...[/bold green]") console.log("[bold green]Enviroment Variables are set! Continuing...[/bold green]")
reddit_object = get_subreddit_threads(subreddit_) reddit_object = get_subreddit_threads(subreddit_, thread_link_)
length, number_of_comments = save_text_to_mp3(reddit_object) length, number_of_comments = save_text_to_mp3(reddit_object)
download_screenshots_of_reddit_posts( download_screenshots_of_reddit_posts(
reddit_object, reddit_object,

Loading…
Cancel
Save