From a1217c872af40cfcf3d7ef91b472fdf801471186 Mon Sep 17 00:00:00 2001 From: Guy Godfroy Date: Tue, 8 Dec 2020 17:03:59 +0100 Subject: [PATCH] something --- geminer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/geminer.py b/geminer.py index 6693f73..cc4ffcb 100755 --- a/geminer.py +++ b/geminer.py @@ -149,10 +149,11 @@ for page_dict in config.custom_pages: rel_path, filename = os.path.split(page_dict["name"]) if rel_path: os.makedirs(rel_path, exist_ok=True) - basename, extension = os.path.splitext(page_dict["name"]) - if not extension: - extention = config.gmi_extension - filename = basename + extension + basename, extension = os.path.splitext(filename) + if extension = "": + filename = basename + config.gmi_extension + else: + filename = basename + extension filepath = os.path.join(rel_path, filename) with open(tpl_path + "/" + page_dict.get("tpl", basename) + ".tpl", "r") as tpl: template = Template(tpl.read())