Small improvements
This commit is contained in:
parent
c5cf7e970d
commit
a5785092c4
@ -21,8 +21,8 @@ def generateNavigationBar(lines):
|
||||
global navbar
|
||||
navbar = E
|
||||
for line in lines:
|
||||
split = line.strip().split(";", 1)
|
||||
navbar = navbar.li(HTML("<a href='" + split[1] + "'>" + split[0] + "</a>"))
|
||||
title, link = line.strip().split(";", 1)
|
||||
navbar = navbar.li(HTML("<a href='" + link + "'>" + title + "</a>"))
|
||||
|
||||
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")
|
||||
|
Loading…
Reference in New Issue
Block a user