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>