Skip to content

Commit d39f61b

Browse files
committed
Update build script
1 parent 0bf967f commit d39f61b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

build.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def handle_starttag(self, tag, attrs):
4040
p = NavHTMLParser()
4141
p.feed(open(os.path.join(dir, file), "rb").read().decode())
4242
p.close()
43-
html_files[os.path.join(dir[5:], file)] = p.title
43+
html_files[os.path.join(dir[6:], file)] = p.title
4444
print(os.path.join(dir, file), "SUCCESS")
4545
except Exception as e:
4646
print(os.path.join(dir, file), e)
@@ -49,9 +49,7 @@ def handle_starttag(self, tag, attrs):
4949
with open("./www/nav.html", "wb") as f:
5050
f.write("<html><head><title>Navigation</title></head><body>".encode())
5151
for file, title in html_files.items():
52-
f.write(
53-
f'<div><a href="{quote_plus(file)}">{html_escape(file)}</a>'.encode()
54-
)
52+
f.write(f'<div><a href="{file}">{html_escape(file)}</a>'.encode())
5553
if title:
5654
f.write(f"&#58; {html_escape(title)}".encode())
5755
f.write(f"</div>".encode())

0 commit comments

Comments
 (0)