Get the MRE api working #1
@ -2,3 +2,4 @@ flask==3.1.0
|
||||
flask-restx==1.3.0
|
||||
pyopenssl==25.0.0
|
||||
werkzeug==3.1.3
|
||||
jinja2==3.1.6
|
||||
|
||||
@ -21,6 +21,8 @@ if __name__ == '__main__':
|
||||
add_help=True)
|
||||
parser.add_argument('template_path',
|
||||
help='The path to the template to render.')
|
||||
parser.add_argument('var_file_path',
|
||||
help='The path to the file containing the variables to use for rendering the tempalte(s).')
|
||||
parser.add_argument('out_path',
|
||||
help='The path to write the rendered template.')
|
||||
parser.add_argument('-k',
|
||||
@ -34,3 +36,13 @@ if __name__ == '__main__':
|
||||
action='store_true',
|
||||
help='If set the previous template will be overwritten.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if not os.path.exists(args.template_path):
|
||||
print(f'The given template path {args.template_path} does not exist.')
|
||||
exit(1)
|
||||
|
||||
if not os.path.exists(args.var_file_path):
|
||||
print(f'The given template path {args.var_file_path} does not exist.')
|
||||
exit(1)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user