From a5785092c4d05abfd010acb4f0b51409cdbd0028 Mon Sep 17 00:00:00 2001 From: Govindas Date: Sat, 22 Jan 2022 16:19:47 +0200 Subject: [PATCH] Small improvements --- generate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/generate.py b/generate.py index 987a0ef..cc9a1c6 100644 --- a/generate.py +++ b/generate.py @@ -21,8 +21,8 @@ def generateNavigationBar(lines): global navbar navbar = E for line in lines: - split = line.strip().split(";", 1) - navbar = navbar.li(HTML("" + split[0] + "")) + title, link = line.strip().split(";", 1) + navbar = navbar.li(HTML("" + title + "")) def generateLines(title, lines): global document @@ -54,7 +54,10 @@ if os.path.exists("./navbar"): else: print("No 'navbar' file found, there will be no navigation bar.") +pagescount = 0 for file in os.listdir("./"): if file.endswith(".page"): with open(file, 'r') as page: generateLines(os.path.basename(file), page.readlines()) + pagescount=pagescount+1 +print("Generated " + str(pagescount) + " pages")