2020-06-10 20:23:53 +00:00
|
|
|
import argparse
|
|
|
|
from tasks import Tasker
|
|
|
|
|
|
|
|
t = Tasker()
|
|
|
|
|
|
|
|
task_map = {"match":None, "metric":None, "pit":None}
|
|
|
|
status_map = {"match":None, "metric":None, "pit":None}
|
|
|
|
status_map.update(task_map)
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(prog = "TRA")
|
|
|
|
subparsers = parser.add_subparsers(title = "command", metavar = "C", help = "//commandhelp//")
|
|
|
|
|
|
|
|
parser_start = subparsers.add_parser("start", help = "//starthelp//")
|
2020-06-10 21:47:54 +00:00
|
|
|
parser_start.add_argument("targets", metavar = "T", nargs = "*", choices = task_map.keys())
|
2020-06-10 21:32:43 +00:00
|
|
|
parser_start.set_defaults(which = "start")
|
2020-06-10 20:23:53 +00:00
|
|
|
|
|
|
|
parser_stop = subparsers.add_parser("stop", help = "//stophelp//")
|
2020-06-10 21:47:54 +00:00
|
|
|
parser_stop.add_argument("targets", metavar = "T", nargs = "*", choices = task_map.keys())
|
2020-06-10 21:32:43 +00:00
|
|
|
parser_stop.set_defaults(which = "stop")
|
2020-06-10 20:23:53 +00:00
|
|
|
|
|
|
|
parser_status = subparsers.add_parser("status", help = "//stophelp//")
|
2020-06-10 21:47:54 +00:00
|
|
|
parser_status.add_argument("targets", metavar = "T", nargs = "*", choices = status_map.keys())
|
2020-06-10 21:32:43 +00:00
|
|
|
parser_status.set_defaults(which = "status")
|
2020-06-10 20:23:53 +00:00
|
|
|
|
2020-06-10 21:47:54 +00:00
|
|
|
args = parser.parse_args()
|