28 lines
No EOL
637 B
Python
28 lines
No EOL
637 B
Python
from argparse import ArgumentParser
|
|
|
|
from compiler import compile
|
|
|
|
class Arguments:
|
|
workdir: str
|
|
template: str
|
|
out: str
|
|
force: str
|
|
|
|
def __init__(self):
|
|
pass
|
|
|
|
def main():
|
|
parser = ArgumentParser()
|
|
|
|
parser.add_argument('workdir', action='store')
|
|
parser.add_argument('-t' , '--template', action='store')
|
|
parser.add_argument('-o', '--out', action='store')
|
|
parser.add_argument('-f', '--force', action='store_true', default=False)
|
|
|
|
args = Arguments()
|
|
parser.parse_args(namespace=args)
|
|
|
|
compile(args.workdir, args.template, args.out, args.force)
|
|
|
|
if __name__ == "__main__":
|
|
main() |