summaryrefslogtreecommitdiffstats
path: root/labs
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-03-02 18:29:53 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-03-02 22:45:19 +0100
commit22847e7628420428a0211249a7a7861822029c2c (patch)
tree79759a6e53878de9fa629394daf90b84e165eff0 /labs
parent511ba774f11a6293d9f5635c08204c775bff583a (diff)
generate_config: New `-b` arg for batch processing
Sometimes, parsing multiple j2 templates based on the same PDF+IDF is needed, in which case we'd have to call generate_config once for each template. Add a new argument, `-b`, which allows batch processing of multiple templates in one go: - files ending in '.j2' (e.g. 'template.yml.j2') will be expanded to a file without the '.j2' suffix in the same directory as the source template (e.g. 'template.yml'); - templates not ending in '.j2' are skipped in batch mode; - in order to pass multiple templates, `-j` argument can now be passed multiple times, similar to `-i`; - although relative filepaths still work, it is highly recommended to use the full path (abspath) for j2 templates; - to avoid filename collisions, j2 parser will open '/' (as well as any directories specified via `-i`) and lookup each j2 template by its full path; Add a new argument, `-v` for verbose logging. While at it, import only needed functions from 'os.path' to make our code more compact and easier to read. Change-Id: I2291935d42e4196813cd75154d5b674bcc330183 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'labs')
0 files changed, 0 insertions, 0 deletions