28 lines
579 B
Python
28 lines
579 B
Python
|
from argparse import ArgumentParser
|
||
|
from dataclasses import dataclass
|
||
|
|
||
|
from compiler import compile
|
||
|
|
||
|
@dataclass
|
||
|
class Arguments:
|
||
|
templatedir: str
|
||
|
workdir: str
|
||
|
outdir: str
|
||
|
|
||
|
def __init__(self):
|
||
|
pass
|
||
|
|
||
|
def main():
|
||
|
parser = ArgumentParser()
|
||
|
|
||
|
parser.add_argument('templatedir', action='store')
|
||
|
parser.add_argument('workdir', action='store')
|
||
|
parser.add_argument('outdir', action='store')
|
||
|
|
||
|
args = Arguments()
|
||
|
parser.parse_args(namespace=args)
|
||
|
|
||
|
compile(args.templatedir, args.workdir, args.outdir)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|