Skip to content
Snippets Groups Projects

Catch breaks/holidays during creation of lecture calendar

Merged Lukas Kluft requested to merge revise-ical into main
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -23,6 +23,10 @@ def extract_lecture_dates(markdown_file, output_file):
for table_entry in soup.findAll("tr")[1:]:
date, title, lecturers = [e.contents[0] for e in table_entry.findAll("td")]
if lecturers == "-":
# Table entries without lecturer are considered to be breaks/holidays.
continue
# Define lecture start/end. Needs to be adapated every semester!
dt = datetime.strptime(date, "%Y-%m-%d")
lecture_start = datetime(dt.year, dt.month, dt.day, 13)
Loading