From 8de18a9c786e747826bd23501ca9005122b35582 Mon Sep 17 00:00:00 2001 From: monoid Date: Fri, 22 Apr 2022 23:10:54 +0900 Subject: [PATCH] tool: add issueUpdate --- cli.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 7dfd08a..79383f2 100644 --- a/cli.py +++ b/cli.py @@ -37,9 +37,21 @@ def help(_args): for command in commandList.keys(): print("\t", command) +def issueUpdate(args): + parser = argparse.ArgumentParser(description='Update issues', prog="cli.py issueUpdate") + parser.add_argument('-v', '--verbose', action='store_true', help='verbose mode') + parser.add_argument('--outDir', default="build", help='output directory') + args = parser.parse_args(args) + if args.verbose: + print("update issues") + issuePath = os.path.join(args.outDir,"issues.json") + p = subprocess.run(["deno", "run", "-A","tools/getIssue.ts", "--path",issuePath]) + p.check_returncode() + commandList = { 'build': build, - 'help': help + 'help': help, + 'issueUpdate': issueUpdate } def main():