Skip to content

Commit 5ae0d9e

Browse files
committed
Add repo name to slides.
1 parent 7613c49 commit 5ae0d9e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

uc_python/build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
from subprocess import run
33
from pathlib import Path
44

5+
from .repos import repos
6+
57
folder = Path("repos").absolute()
68
repo_paths = [f for f in folder.glob("*") if f.is_dir()]
79

810
for repo in repo_paths:
911
os.chdir(folder / repo)
12+
# Figure out which Repo this corresponds to.
13+
repo_name = [r for r in repos if repo.name in r.url][0].name
14+
1015
if not (repo / "Makefile").exists():
1116
print("no Makefile, skipping")
1217
continue
@@ -18,7 +23,7 @@
1823
print("generating index.html")
1924
index = slides_dir / "index.html"
2025
with open(index, "at") as f:
21-
f.write("<h1>Slides</h1>\n")
26+
f.write(f"<h1>{repo_name}</h1>\n")
2227
f.write("<ul>\n")
2328
slide_files = sorted(slides_dir.glob("*.slides.html"))
2429
for slide_file in slide_files:

0 commit comments

Comments
 (0)