2023-11-21 17:13:30 +00:00
|
|
|
import argparse
|
|
|
|
|
2023-12-19 13:36:37 +00:00
|
|
|
from .app import (
|
|
|
|
register_join_parser,
|
|
|
|
register_overview_parser,
|
|
|
|
show_overview,
|
|
|
|
)
|
2023-11-21 17:13:30 +00:00
|
|
|
|
|
|
|
|
2023-11-23 13:37:05 +00:00
|
|
|
def main() -> None:
|
2023-11-23 12:56:25 +00:00
|
|
|
parser = argparse.ArgumentParser(description="clan-vm-manager")
|
2023-12-05 12:41:02 +00:00
|
|
|
|
|
|
|
# Add join subcommand
|
2023-12-04 18:23:35 +00:00
|
|
|
subparser = parser.add_subparsers(
|
|
|
|
title="command",
|
|
|
|
description="command to execute",
|
|
|
|
help="the command to execute",
|
|
|
|
)
|
|
|
|
register_join_parser(subparser.add_parser("join", help="join a clan"))
|
2023-12-05 12:41:02 +00:00
|
|
|
|
2023-12-08 10:56:27 +00:00
|
|
|
register_overview_parser(subparser.add_parser("overview", help="overview screen"))
|
|
|
|
|
2023-12-05 12:41:02 +00:00
|
|
|
# Executed when no command is given
|
2023-12-06 17:38:19 +00:00
|
|
|
parser.set_defaults(func=show_overview)
|
2023-11-23 13:37:05 +00:00
|
|
|
args = parser.parse_args()
|
|
|
|
args.func(args)
|