From c3b65150d000d2f2bb6f874f9282635449c7a4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 11 Jan 2023 19:29:38 +0100 Subject: [PATCH] Add verbose option --- cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 952e310..4109dd6 100644 --- a/cli.py +++ b/cli.py @@ -68,9 +68,15 @@ def cli(): parser.add_argument('-i', '--input-file', help="The blocklist to use") parser.add_argument('-r', '--remote-blocklist', help="The remote blocklist as json for debugging reasons") parser.add_argument('-o', '--output', help="Filename where to export the blocklist") + parser.add_argument('-v', '--verbose', + action='store_true') args = parser.parse_args() - logging.basicConfig(level=logging.WARN) + if args.verbose: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.WARN) + """if there is a remote blocklist provided load this instead of fetching it from a server (for debugging reasons)""" if args.remote_blocklist: with open(args.remote_blocklist) as f: remote_blocklist = blocklist_json_to_instances(json.load(f))