summaryrefslogtreecommitdiff
path: root/generate-schedule.py
diff options
context:
space:
mode:
Diffstat (limited to 'generate-schedule.py')
-rwxr-xr-xgenerate-schedule.py245
1 files changed, 122 insertions, 123 deletions
diff --git a/generate-schedule.py b/generate-schedule.py
index 63c3a10..ae9f52c 100755
--- a/generate-schedule.py
+++ b/generate-schedule.py
@@ -31,7 +31,13 @@ def render_schedule(events):
day = event.when.day
time = event.time or event.location.time
assert time, 'no time given either in location or event'
- info = event.info or event.location.info
+ info = ''
+ if event.location.info:
+ info += event.location.info
+ if event.info:
+ if event.location.info:
+ info += '<br>'
+ info += event.info
infotxt = f'<br><div class="info">{info}</div>' if info else ''
week_change = False
@@ -40,21 +46,30 @@ def render_schedule(events):
week_change = True
week = new_week
- if week_change:
+ if False and week_change:
s += '<br>\n'
- s += f'''<div class="event {'special' if event.special else ''} {'cancelled' if event.cancelled else ''} {'changed' if event.changed else ''}">
+ s += f'''<div class="event {'special' if event.special else ''} {'cancelled' if event.cancelled else ''} {'changed' if event.changed else ''}" data-timestamp="{ event.when.isoformat() }">
<div class="event-data">
<strong>{weekday}, {month} {day}</strong> &middot; {time}
</div>
<div class="instance">
- <a href="{event.location.url}">{event.location.name}</a>,
- <span class="neighborhood">{event.location.neighborhood}</span>
+ <a href="{event.location.url}">{event.location.name}</a>
+ <span class="neighborhood">{event.location.neighborhood}</span>
{infotxt}
</div>
-</div>'''
+</div>
+'''
return s
+summermccarren = Location(
+ "McCarren Park",
+ "https://maps.app.goo.gl/7YQBG3XVHNLWkyAM9",
+ "Williamsburg",
+ "6:30p",
+ info='North corner, west side. Rain or above 90°: at Spritzenhaus33.'
+)
+
mccarren = Location(
"Spritzenhaus33",
"https://maps.app.goo.gl/4jKTTTJ3h61dGPyz6",
@@ -118,6 +133,12 @@ bkcentrallibrary = Location(
info="Trustees Room"
)
+bkcentral = Location(
+ "Brooklyn Central Library",
+ "https://maps.app.goo.gl/fPijDbTN47TbFpFf6",
+ "Prospect Heights",
+)
+
bkcentral_info_commons = Location(
"Brooklyn Central Library",
"https://maps.app.goo.gl/fPijDbTN47TbFpFf6",
@@ -173,125 +194,103 @@ williamsburgh = Location(
"Williamsburg",
)
+ridgewoodlibrary = Location(
+ "Ridgewood Library",
+ "https://maps.app.goo.gl/mE51fsx1HrSqFCvb9",
+ "Ridgewood",
+)
+
+artsculture = Location(
+ "Library for Arts & Culture",
+ "https://maps.app.goo.gl/GssCUr9QF2aFxgiQA",
+ "Fort Greene",
+)
+
+artsculture = Location(
+ "Library for Arts & Culture",
+ "https://maps.app.goo.gl/GssCUr9QF2aFxgiQA",
+ "Fort Greene",
+)
+
+brightonbeachasserlevy = Location(
+ "Asser Levy Park",
+ "https://maps.app.goo.gl/2i3isUmEH7TQEKjV9",
+ "Brighton Beach",
+ info="Rain or above 90°: at Brighton Beach Library"
+)
+
+redhookgarden = Location(
+ "Red Hook Library Garden",
+ "https://maps.app.goo.gl/CcmnXvZUCLZRTTGX7",
+ "Red Hook",
+ info="Garden on Sullivan St bet. Conover/Van Brunt"
+)
+
+centralpark = Location(
+ "Central Park",
+ "https://partiful.com/e/SNyZW0KDIBTgioRJV0HO",
+ "Central Park",
+ info="Check link for location updates on day of event."
+)
+
schedule = [
- # Event(jefferson, date(2024, 10, 30)),
- # Event(nook, date(2024, 11, 2)),
- # Event(bookclub, date(2024, 11, 3)),
- # Event(mccarren, date(2024, 11, 4), info='Book Swap and <a href="https://booksthroughbarsnyc.org/donate/donate-books/">NYC Books Through Bars</a> Book Drive.', special=True),
- # Event(jefferson, date(2024, 11, 6), info='Elevator in lobby to third floor. Book Swap and <a href="https://booksthroughbarsnyc.org/donate/donate-books/">NYC Books Through Bars</a> Book Drive.', special=True),
- # Event(nook, date(2024, 11, 9)),
- # Event(mccarren, date(2024, 11, 11)),
- # Event(abraco, date(2024, 11, 13), changed=True, info='Wednesday Jefferson Market Library Quiet Reading moved for this week.'),
- # Event(bushwicklibrary, date(2024, 11, 14), time='6p', special=True),
- # Event(nook, date(2024, 11, 16)),
- # Event(wyckoffbondgarden, date(2024, 11, 16), time='12p', special=True),
- # Event(mccarren, date(2024, 11, 18)),
- # Event(jefferson, date(2024, 11, 20)),
- # Event(bkcentrallibrary, date(2024, 11, 20), time='6:30p', special=True),
- # Event(dekalblibrary, date(2024, 11, 21), time='6p', special=True),
- # Event(nook, date(2024, 11, 23)),
- # Event(mccarren, date(2024, 11, 25)),
- # Event(jefferson, date(2024, 11, 27), info='<strong>Cancelled due to Thanksgiving.</strong>', cancelled=True),
- # Event(nook, date(2024, 11, 30)),
- # Event(bookclub, date(2024, 12, 1)),
- # Event(mccarren, date(2024, 12, 2)),
- # Event(liz, date(2024, 12, 3)),
- # Event(jefferson, date(2024, 12, 4)),
- # Event(nook, date(2024, 12, 7)),
- # Event(mccarren, date(2024, 12, 9)),
- # Event(jefferson, date(2024, 12, 11)),
- # Event(nook, date(2024, 12, 14)),
- # Event(mccarren, date(2024, 12, 16)),
- # Event(canarsielibrary, date(2024, 12, 17), time='5p'),
- # Event(jefferson, date(2024, 12, 18)),
- # Event(dekalblibrary, date(2024, 12, 19), time='6p'),
- # Event(bushwicklibrary, date(2024, 12, 19), time='6p'),
- # Event(nook, date(2024, 12, 21)),
- # Event(mccarren, date(2024, 12, 23)),
- # Event(jefferson, date(2024, 12, 25), info='<strong>Cancelled.</strong>', cancelled=True),
- # Event(nook, date(2024, 12, 28)),
- # Event(mccarren, date(2024, 12, 30)),
- # Event(jefferson, date(2025, 1, 1), info='<strong>Cancelled.</strong>', cancelled=True),
- # Event(sunsetpark, date(2025, 1, 2), time='6p'),
- # Event(nook, date(2025, 1, 4)),
- # Event(bookclub, date(2025, 1, 5)),
- # Event(mccarren, date(2025, 1, 6)),
- # Event(liz, date(2025, 1, 7), info='Zora Neale Hurston book launch.', special=True),
- # Event(jefferson, date(2025, 1, 8)),
- # Event(nook, date(2025, 1, 11)),
- # Event(mccarren, date(2025, 1, 13)),
- # Event(jefferson, date(2025, 1, 15)),
- # Event(dekalblibrary, date(2025, 1, 16), time='6p'),
- # Event(sunsetpark, date(2025, 1, 16), time='6p'),
- # Event(nook, date(2025, 1, 18)),
- # Event(mccarren, date(2025, 1, 20)),
- # Event(jefferson, date(2025, 1, 22)),
- # Event(nook, date(2025, 1, 25)),
- # Event(mccarren, date(2025, 1, 27)),
- # Event(nook, date(2025, 2, 15)),
- # Event(mccarren, date(2025, 2, 17)),
- # Event(jefferson, date(2025, 2, 19)),
- # Event(nook, date(2025, 2, 22)),
- # Event(mccarren, date(2025, 2, 24)),
- # Event(jefferson, date(2025, 2, 26)),
- # Event(easternparkway, date(2025, 2, 27), time='6p'),
- # Event(nook, date(2025, 3, 1)),
- # Event(bookclub, date(2025, 3, 2)),
-
- # Event(mccarren, date(2025, 3, 3)),
- # Event(liz, date(2025, 3, 4)),
- # Event(jefferson, date(2025, 3, 5)),
- # Event(nook, date(2025, 3, 8)),
-
- # Event(mccarren, date(2025, 3, 10)),
- # Event(jefferson, date(2025, 3, 12)),
- # Event(sunsetpark, date(2025, 3, 13), time='6p'),
- # Event(nook, date(2025, 3, 15)),
-
- # Event(mccarren, date(2025, 3, 17)),
- # Event(jefferson, date(2025, 3, 19)),
- # Event(dekalblibrary, date(2025, 3, 20), time='6p'),
- # Event(nook, date(2025, 3, 22)),
-
- # Event(mccarren, date(2025, 3, 24)),
- # Event(jefferson, date(2025, 3, 26)),
- # Event(nook, date(2025, 3, 29)),
-
- # Event(mccarren, date(2025, 3, 31)),
- # Event(liz, date(2025, 4, 1)),
- # Event(kingsbay, date(2025, 4, 1), time='6p'),
- # Event(jefferson, date(2025, 4, 2)),
- # Event(nook, date(2025, 4, 5)),
- # Event(bookclub, date(2025, 4, 6)),
-
- Event(mccarren, date(2025, 4, 7)),
- Event(windsorterrace, date(2025, 4, 8), time='6p'),
- Event(kingsbay, date(2025, 4, 8), time='6p'),
- Event(bkcentral_info_commons, date(2025, 4, 9), time='6p'),
- Event(jefferson, date(2025, 4, 9)),
- Event(greenpoint, date(2025, 4, 10), time='6p'),
- Event(nook, date(2025, 4, 12)),
- Event(williamsburgh, date(2025, 4, 12), time='10:30a'),
-
- Event(mccarren, date(2025, 4, 14)),
- Event(jefferson, date(2025, 4, 16)),
- Event(nook, date(2025, 4, 19)),
-
- Event(mccarren, date(2025, 4, 21)),
- Event(kingsbay, date(2025, 4, 22), time='6p'),
- Event(jefferson, date(2025, 4, 23)),
- Event(nook, date(2025, 4, 26)),
-
- Event(wyckoffbondgarden, date(2025, 4, 27), time='11a'),
- Event(mccarren, date(2025, 4, 28)),
- Event(kingsbay, date(2025, 4, 29), time='6p'),
- Event(jefferson, date(2025, 4, 30)),
- Event(nook, date(2025, 5, 3)),
-
- Event(williamsburgh, date(2025, 5, 10), time='10:30a'),
- Event(dekalblibrary, date(2025, 5, 15), time='6p'),
- Event(dekalblibrary, date(2025, 6, 12), time='6p'),
+ Event(nook, date(2025, 5, 17)),
+
+ Event(summermccarren, date(2025, 5, 19)),
+ Event(jefferson, date(2025, 5, 21)),
+ Event(nook, date(2025, 5, 24)),
+
+ Event(summermccarren, date(2025, 5, 26), special=True, info='Picnic. Bring food and drinks!'),
+ Event(jefferson, date(2025, 5, 28)),
+ Event(nook, date(2025, 5, 31)),
+
+ Event(summermccarren, date(2025, 6, 2)),
+ Event(jefferson, date(2025, 6, 4)),
+ Event(brightonbeachasserlevy, date(2025, 6, 5), time='6p', special=True),
+ Event(nook, date(2025, 6, 7)),
+
+ Event(summermccarren, date(2025, 6, 9)),
+ Event(windsorterrace, date(2025, 6, 10), time='6p'),
+ Event(jefferson, date(2025, 6, 11)),
Event(greenpoint, date(2025, 6, 12), time='6p'),
+ Event(dekalblibrary, date(2025, 6, 12), time='6p'),
+ Event(ridgewoodlibrary, date(2025, 6, 12), time='6p', info='Library garden. Inclement weather: in auditorium.', special=True),
+ Event(nook, date(2025, 6, 14)),
+
+ Event(summermccarren, date(2025, 6, 16)),
+ Event(bkcentral, date(2025, 6, 18), time='1:30p', info='Meeting Room 4'),
+ Event(jefferson, date(2025, 6, 18)),
+ Event(nook, date(2025, 6, 21)),
+
+ Event(summermccarren, date(2025, 6, 23)),
+ Event(jefferson, date(2025, 6, 25)),
+ Event(redhookgarden, date(2025, 6, 27), time='3:30p', special=True),
+ Event(nook, date(2025, 6, 28)),
+
+ Event(summermccarren, date(2025, 6, 30)),
+ Event(liz, date(2025, 7, 1)),
+ Event(jefferson, date(2025, 7, 2)),
+ Event(brightonbeachasserlevy, date(2025, 7, 3), time='6p', special=True),
+ Event(nook, date(2025, 7, 5)),
+ Event(centralpark, date(2025, 7, 5), time='1p'),
+
+ Event(summermccarren, date(2025, 7, 7)),
+ Event(jefferson, date(2025, 7, 9)),
+ Event(nook, date(2025, 7, 12)),
+
+ Event(summermccarren, date(2025, 7, 14)),
+ Event(jefferson, date(2025, 7, 16)),
+ Event(bkcentral_info_commons, date(2025, 7, 16), time='1:30p'),
+ Event(nook, date(2025, 7, 19)),
+
+ Event(summermccarren, date(2025, 7, 21)),
+ Event(jefferson, date(2025, 7, 23)),
+ Event(nook, date(2025, 7, 26)),
+
+ Event(summermccarren, date(2025, 7, 28)),
+ Event(jefferson, date(2025, 7, 30)),
+
+ Event(brightonbeachasserlevy, date(2025, 8, 7), time='6p', special=True),
] # maybe autosort it and sort code by event?
with open('index.base') as base: