Modify cli
This commit is contained in:
@@ -20,7 +20,7 @@ def load_config(path: str) -> Config | None:
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(prog="beaky")
|
||||
parser.add_argument("--config", help="Path to config file.", default="config/application.yml")
|
||||
parser.add_argument("mode", choices=["screenshotter"], help="Mode of operation.")
|
||||
parser.add_argument("mode", choices=["screenshotter", "parser", "class"], help="Mode of operation.")
|
||||
|
||||
args = parser.parse_args()
|
||||
config = load_config(args.config)
|
||||
@@ -40,5 +40,12 @@ def main() -> None:
|
||||
screenshotter = Screenshotter(config)
|
||||
screenshotter.capture_tickets(data.links)
|
||||
|
||||
if args.mode == "parser":
|
||||
for link in data.links:
|
||||
print(link)
|
||||
|
||||
if args.mode == "class":
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user