tool: add issueUpdate

This commit is contained in:
monoid 2022-04-22 23:10:54 +09:00
parent f0524c1c87
commit 8de18a9c78

14
cli.py
View File

@ -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():