summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Guégan <manzerbredes@mailbox.org>2025-07-26 09:16:50 +0200
committerLoïc Guégan <manzerbredes@mailbox.org>2025-07-26 09:16:50 +0200
commitfbe8d65a7c0d32760080e12e20e029a5fe289955 (patch)
treebd1c62dc1eae7324b2c6f0b2135b8405334361be
parent1acc917c5ea6e9cda86f539773b8110565e84c4c (diff)
Minor changes
-rw-r--r--infos.yaml17
-rwxr-xr-xmain.py10
2 files changed, 15 insertions, 12 deletions
diff --git a/infos.yaml b/infos.yaml
index ea158e3..c6eeeb0 100644
--- a/infos.yaml
+++ b/infos.yaml
@@ -5,9 +5,12 @@ semester:
end: "15/12/2025"
lectures:
slots:
- monday:
- start: "2pm"
- end: "3pm"
+ friday:
+ start: "12:15"
+ end: "14:00"
+ wednesday:
+ start: "09:15"
+ end: "10:00"
output:
date_format: "%b %d"
@@ -18,7 +21,7 @@ output:
calendar:
hidden: no
show_events: yes
- show_time: no
+ show_time: yes
show_lecturers: yes
show_assignments: yes
show_dates: yes
@@ -64,9 +67,9 @@ lectures:
name: "Introduction"
date: "13/08/2025"
who: "Loïc"
- slot:
- start: "5pm"
- end: "6pm"
+ # slot:
+ # start: "09:00"
+ # end: "09:00"
2:
name: "Parallel software and hardware"
date: "22/08/2025"
diff --git a/main.py b/main.py
index 07c77ed..f987060 100755
--- a/main.py
+++ b/main.py
@@ -22,9 +22,9 @@ def getweek(d):
def getgloballectureslot(d):
dname=d.strftime("%A").lower()
if dname in i["semester"]["lectures"]["slots"].keys():
- start=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["start"], "%I%p")
- end=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["end"], "%I%p")
- (start,end)
+ start=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["start"], "%H:%M")
+ end=datetime.strptime(i["semester"]["lectures"]["slots"][dname]["end"], "%H:%M")
+ return (start,end)
return None
def getassign(d):
val=""
@@ -44,8 +44,8 @@ def getlecture(d):
# Time
startT, endT = (None, None)
if "slot" in i["lectures"][l]:
- startT=datetime.strptime(i["lectures"][l]["slot"]["start"], "%I%p")
- endT=datetime.strptime(i["lectures"][l]["slot"]["end"], "%I%p")
+ startT=datetime.strptime(i["lectures"][l]["slot"]["start"], "%H:%M")
+ endT=datetime.strptime(i["lectures"][l]["slot"]["end"], "%H:%M")
elif slot is not None:
startT, endT=slot
# Content