diff options
author | Blaise Thompson <blaise@untzag.com> | 2024-09-08 15:19:08 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2024-09-08 15:19:08 -0500 |
commit | 25ffc2ff4e36801a777c02253a9b1cba71961bfe (patch) | |
tree | 05664dd2b20f91b4d4c6eabd5dadb94062d0a89d | |
parent | 0918e792374eb35607c8d9ae6741a7f4e4207465 (diff) |
add uw-madison
-rw-r--r-- | build.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -2,6 +2,7 @@ import os import pathlib +import subprocess import datetime @@ -55,6 +56,26 @@ with open(org_fp, "r") as org: events.append(Event(line)) +url = "https://outlook.office365.com/owa/calendar/db2d3e0f0490459a80c4b837118e4bf1@wisc.edu/f6a2b5209cd6432c96f52939cacdbedd2266851683387467601/calendar.ics" +subprocess.run("curl", url, ">", "/home/nginx/pycal2org/uw-madison.ics") +subprocess.run("python3", "/home/nginx/pycal2org/pycal2org.py", "/home/nginx/pycal2org/uw-madison.ics", ">", "/home/nginx/pycal2org/uw-madison.org") +org_fp = "/home/nginx/pycal2org/uw-madison.org" + +with open(org_fp, "r") as org: + for line in org: + line = line.strip() + if not line: + continue + if not line[0] == "*": + continue + if ":private:" in line: + continue + if ":info:" in line: + continue + events.append(Event(line)) + + + # create html ------------------------------------------------------------------------------------- |