From 64630b423b3332b602e56abbb13b4a1cc797a7e7 Mon Sep 17 00:00:00 2001 From: iaacornus Date: Sat, 4 Jun 2022 23:34:59 +0800 Subject: [PATCH] removed unncessary parameters and include the function calls --- cli.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cli.py b/cli.py index 9abba77..e0dfcb4 100644 --- a/cli.py +++ b/cli.py @@ -1,5 +1,8 @@ import argparse +from main import main +from utils.console import print_substep + def program_options(): description = """\ @@ -17,35 +20,32 @@ def program_options(): help="Create a video.", action="store_true" ) - # this one accepts link as input, as well as already downloaded video, - # defaults to the minecraft video. - parser.add_argument( - "-b", - "--background", - help="Use another video background for video (accepts link).", - action="store" - ) parser.add_argument( # only accepts the name of subreddit, not links. "-S", "--subreddit", help="Use another sub-reddit.", action="store" ) - # show most of the background processes of the program + # this one accepts link as input, defaults to the minecraft video + # does not accept file or already downloaded background yet. parser.add_argument( - "-v", - "--verbose", - help="Show the processes of program.", - action="store_true" + "-b", + "--background", + help="Use another video background for video (accepts link).", + action="store" ) args = parser.parse_args() try: - ... + if args.create: + main(args.subreddit, args.background) + else: + print_substep("Error occured!", style="bold red") + raise SystemExit() except ( ConnectionError, - KeyboardInterrupt + KeyboardInterrupt, ): ...