From ca219e56c352a578a98368243e28744e8744582a Mon Sep 17 00:00:00 2001 From: fleaz Date: Sun, 20 Oct 2024 14:24:05 +0200 Subject: [PATCH] Added cli tool --- cli.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 cli.py diff --git a/cli.py b/cli.py new file mode 100755 index 0000000..85b1815 --- /dev/null +++ b/cli.py @@ -0,0 +1,23 @@ +#! /usr/bin/env python3 +from sys import argv +from convert import convert_dhl, convert_hermes + + +if __name__ == "__main__": + if len(argv) != 3: + print("Usage:") + print("./cli.py ") + print("Method can be 'hermes' or 'dhl'") + exit(1) + + method = argv[1] + id = argv[2] + + match method: + case "dhl": + convert_dhl(id) + case "hermes": + convert_hermes(id) + case _: + print("Unknown method") +