main: Provide additional template variables about each source path.

This commit is contained in:
Brett Smith 2017-12-27 11:39:56 -05:00
parent 40552d665a
commit 07d22418d4

View file

@ -36,8 +36,11 @@ class FileImporter:
raise errors.UserInputFileError("no importers available", in_file.name)
source_vars = {
'source_abspath': in_path.absolute().as_posix(),
'source_absdir': in_path.absolute().parent.as_posix(),
'source_dir': in_path.parent,
'source_name': in_path.name,
'source_path': in_path.as_posix(),
'source_stem': in_path.stem,
}
with contextlib.ExitStack() as exit_stack:
output_path = self.config.get_output_path()