CLI: Use API functions

This commit is contained in:
Qubasa
2023-10-02 15:36:02 +02:00
parent 29efda9608
commit 6640c78089
12 changed files with 259 additions and 149 deletions

View File

@@ -5,6 +5,11 @@ from . import register_parser
if __name__ == "__main__":
# this is use in our integration test
parser = argparse.ArgumentParser()
# call the register_parser function, which adds arguments to the parser
register_parser(parser)
args = parser.parse_args()
# call the function that is stored
# in the func attribute of args, and pass args as the argument
# look into register_parser to see how this is done
args.func(args)