Commit 4a04e943 authored by Joanne Hugé's avatar Joanne Hugé Committed by Lu Xu

software/ors-amarisoft: add delete option to render-templates script

parent c3894640
#!/usr/bin/env python3
from jinja2 import Template
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('-d', '--delete', action='store_true')
args = parser.parse_args()
if args.delete:
directory = os.path.dirname(os.path.realpath(__file__))
test_directory = os.path.join(directory, 'test')
for f in os.listdir(directory):
if 'tdd' in f:
os.remove(os.path.join(directory, f))
for f in os.listdir(test_directory):
if 'testTDD' in f:
os.remove(os.path.join(test_directory, f))
exit()
global_context = {
'generated_file_message': "This file was generated using a jinja2 template and the render-templates script, don't modify directly."
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment