File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44from __future__ import annotations
55
66from dataclasses import dataclass
7- from datetime import UTC , datetime
7+ from datetime import datetime , timezone
8+ import os
89from pathlib import Path
10+ import shutil
11+ import sys
912from zoneinfo import ZoneInfo
10- import tomllib
13+
14+ try :
15+ import tomllib
16+ except ModuleNotFoundError :
17+ py312 = shutil .which ("python3.12" )
18+ if py312 and sys .executable != py312 :
19+ os .execvp (py312 , [py312 , __file__ , * sys .argv [1 :]])
20+ raise RuntimeError ("build-calendar-ics.py requires Python 3.11+ or an available python3.12" )
1121
1222
1323ROOT = Path (__file__ ).resolve ().parent .parent
@@ -68,7 +78,7 @@ def parse_front_matter(page_path: Path) -> dict:
6878
6979def parse_utc (timestamp : str ) -> datetime :
7080 # Content stores UTC timestamps with trailing Z.
71- return datetime .fromisoformat (timestamp .replace ("Z" , "+00:00" )).astimezone (UTC )
81+ return datetime .fromisoformat (timestamp .replace ("Z" , "+00:00" )).astimezone (timezone . utc )
7282
7383
7484def ical_escape (value : str ) -> str :
Original file line number Diff line number Diff line change @@ -217,4 +217,19 @@ DESCRIPTION:BitDevs is a place for open discussion of the technical aspec
217217 ard to gain admission\, but you do not need to RSVP in public.
218218URL :https://trianglebitdevs.org/socratic-seminar-50/
219219END :VEVENT
220+ BEGIN :VEVENT
221+ UID :socratic-seminar-51-20260408t220000z@trianglebitdevs.org
222+ DTSTAMP :20260408T220000Z
223+ DTSTART ;TZID=America/New_York :20260408T180000
224+ DTEND ;TZID=America/New_York :20260408T200000
225+ SUMMARY :Socratic Seminar 51
226+ LOCATION :Fidelity Investments - Corporate Office\, Durham\, North Carolin
227+ a
228+ DESCRIPTION :BitDevs is a place for open discussion of the technical aspec
229+ ts of bitcoin and related protocols. Be advised: discussion will be tech
230+ nical. Please RSVP or email trianglebitdevs at protonmail dot com to con
231+ firm your attendance. You will be required to show ID to the security gu
232+ ard to gain admission\, but you do not need to RSVP in public.
233+ URL :https://trianglebitdevs.org/socratic-seminar-51/
234+ END :VEVENT
220235END :VCALENDAR
You can’t perform that action at this time.
0 commit comments