Add verbose option

fix-exception-with-missing-output
Julian-Samuel Gebühr 2023-01-11 19:29:38 +01:00
parent 5b7347ce71
commit c3b65150d0
1 changed files with 7 additions and 1 deletions

8
cli.py
View File

@ -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))