Better log output

This commit is contained in:
Jake Howard 2017-05-17 21:25:06 +01:00
parent 71b641151e
commit a9038e9315

View file

@ -15,7 +15,7 @@ TEMPLATE_FORMAT = os.path.join(TEMPLATES_DIR, "{}-template.html")
def render_page(input_file, output_file, context):
logger.debug("Rendering {}...")
logger.debug("Rendering {}...".format(os.path.splitext(os.path.basename(output_file))[0].title()))
with open(input_file) as f:
template = Template(f.read())
with open(output_file, "w") as f:
@ -34,4 +34,5 @@ def render_templates(config):
'footer'
]:
render_page(TEMPLATE_FORMAT.format(template), FILE_NAME_FORMAT.format(template), context)
render_page(os.path.join(TEMPLATES_DIR, 'toc-template.xsl'), os.path.join(TEMPLATES_DIR, 'toc.xsl'), context)
if config.get('toc', False):
render_page(os.path.join(TEMPLATES_DIR, 'toc-template.xsl'), os.path.join(TEMPLATES_DIR, 'toc.xsl'), context)