Update web viewer

This commit is contained in:
2024-05-31 08:15:58 +02:00
parent d796dbd8d1
commit e102693ce0
2 changed files with 6 additions and 5 deletions

View File

@ -34,12 +34,12 @@ if __name__ == "__main__":
course_content = notes_metadata[year][semester][course]["content"]
if (len(course_content) == 1) and (course_content[0]["name"] is None):
table_of_content += f"<h2><a href='{os.path.join(args.gh_raw_pdf_url, course_content[0]['url'])}'>{course_name}</a></h2>\n"
table_of_content += f"<h3><a href='{os.path.join(args.gh_raw_pdf_url, course_content[0]['url'])}'>{course_name}</a></h3>\n"
else:
table_of_content += f"<h2>{course_name}</h2>\n"
table_of_content += f"<h3>{course_name}</h3>\n"
table_of_content += "<ul>\n"
for content in course_content:
table_of_content += f"<li><h3><a href='{os.path.join(args.gh_raw_pdf_url, content['url'])}'>{content['name']}</a></h3></li>\n"
table_of_content += f"<li><h4><a href='{os.path.join(args.gh_raw_pdf_url, content['url'])}'>{content['name']}</a></h4></li>\n"
table_of_content += "</ul>\n"
with open(os.path.join(args.out_path, "index.html"), "w") as f:

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<title>M.Sc. AI notes</title>
<style>
* {
@ -27,7 +27,8 @@
</head>
<body>
<h1>Table of contents</h1>
<h1>Unibo Master's degree in AI - Notes</h1>
<h2>Table of contents</h2>
<!-- begin-toc -->
<!-- end-toc -->
</body>