Get the MRE api working #1

Merged
chris merged 50 commits from add_mre_api into main 2025-04-06 23:58:50 +00:00
2 changed files with 14 additions and 1 deletions
Showing only changes of commit 12b7673b6e - Show all commits

View File

@ -2,3 +2,4 @@ flask==3.1.0
flask-restx==1.3.0 flask-restx==1.3.0
pyopenssl==25.0.0 pyopenssl==25.0.0
werkzeug==3.1.3 werkzeug==3.1.3
jinja2==3.1.6

View File

@ -21,6 +21,8 @@ if __name__ == '__main__':
add_help=True) add_help=True)
parser.add_argument('template_path', parser.add_argument('template_path',
help='The path to the template to render.') 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', parser.add_argument('out_path',
help='The path to write the rendered template.') help='The path to write the rendered template.')
parser.add_argument('-k', parser.add_argument('-k',
@ -34,3 +36,13 @@ if __name__ == '__main__':
action='store_true', action='store_true',
help='If set the previous template will be overwritten.') 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)