Skip to content

Commit 8543311

Browse files
committed
feat: add build file
1 parent 0804d41 commit 8543311

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
index.html

make_title.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import glob
2+
import os
3+
4+
files = glob.glob("./pages/*.html")
5+
for file in files:
6+
print(file)
7+
8+
if os.path.exists("./index.html"):
9+
os.remove("./index.html")
10+
11+
html = "<h1>RiST 初心者向け Webページ公開編</h1>\n"
12+
html += "<ul>"
13+
for file in files:
14+
user_name = file.split("/")[-1].split(".")[0]
15+
path = file
16+
html += f"<li><a href='{path}'>{user_name}</li>"
17+
18+
html += "</ul>"
19+
20+
with open('index.html', mode="w") as f:
21+
f.write(html)

0 commit comments

Comments
 (0)