fix stuff

This commit is contained in:
Guy Godfroy 2020-12-06 15:54:26 +01:00
parent 3de89cdc68
commit 06b82addf8
1 changed files with 3 additions and 4 deletions

View File

@ -143,15 +143,14 @@ for dirname, subdirlist, mdlist in os.walk("."):
template = Template(tpl.read()) template = Template(tpl.read())
# Integrate the GMI content in the template # Integrate the GMI content in the template
rendered_text = template.render(post=post) gmitext = template.render(post=post)
# Dirty fix a weird bug where some lines are CRLF-terminated # Dirty fix a weird bug where some lines are CRLF-terminated
rendered_text = gmitext.replace("\r\n", "\n") gmitext = gmitext.replace("\r\n", "\n")
# Time to write the GMI file # Time to write the GMI file
with open(gmi_subpath + "/" + gmifile, "w") as gmi: with open(gmi_subpath + "/" + gmifile, "w") as gmi:
gmi.write(rendered_text) gmi.write(gmitext)
# Generate home page # Generate home page
with open(tpl_path + "/index.tpl", "r") as tpl: with open(tpl_path + "/index.tpl", "r") as tpl: