Skip to content

Commit

Permalink
Add option for debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Javex committed Sep 27, 2023
1 parent 0485ab9 commit 7b9e216
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
from hotprices_au import woolies, coles
import argparse
import logging


def main():
parser = argparse.ArgumentParser()
parser.add_argument('--quick', action='store_true', default=False)
parser.add_argument('--debug', action='store_true', default=False)
parser.add_argument('store', choices=['woolies', 'coles'])
args = parser.parse_args()

if args.debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)

match args.store:
case 'woolies':
woolies.main(args.quick)
Expand Down

0 comments on commit 7b9e216

Please sign in to comment.