Skip to content

Commit

Permalink
Break down historic schedules a bit for clarity
Browse files Browse the repository at this point in the history
* Split out film, music, and performances into their own categories.
* Clearly break out attendee run events.
  • Loading branch information
jellybob committed Jan 21, 2024
1 parent 60344f0 commit a8a9a65
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 35 additions & 1 deletion apps/schedule/historic.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def historic_talk_data(year):
stage_events = []
workshop_events = []
youth_events = []
film_events = []
music_events = []
performance_events = []
attendee_events = []

for event in [parse_event(event) for event in schedule]:
if event["source"] == "external":
Expand All @@ -67,8 +71,19 @@ def historic_talk_data(year):
] # "Some idiot"

# All official (non-external) content is on a stage or workshop, so we don't care about anything that isn't
if event["type"] in ("talk", "performance"):
if not event["is_from_cfp"]:
events_list = attendee_events
elif event["type"] == "talk":
events_list = stage_events
elif event["type"] == "performance":
if "[Film]" in event.get("title"):
event["title"] = event["title"].replace("[Film] ", "")
events_list = film_events
elif "[Music]" in event.get("title") or event.get("venue") == "Null Sector":
event["title"] = event["title"].replace("[Music] ", "")
events_list = music_events
else:
events_list = performance_events
elif event["type"] == "workshop":
events_list = workshop_events
elif event["type"] == "youthworkshop":
Expand All @@ -87,6 +102,7 @@ def sort_key(event):
stage_events.sort(key=sort_key)
workshop_events.sort(key=sort_key)
youth_events.sort(key=sort_key)
performance_events.sort(key=sort_key)

venues = [
{"name": "Main Stages", "events": stage_events},
Expand All @@ -96,6 +112,24 @@ def sort_key(event):
if len(youth_events) > 0:
venues.append({"name": "Youth Workshops", "events": youth_events})

if len(music_events) > 0:
venues.append({"name": "Music", "events": music_events})

if len(film_events) > 0:
venues.append({"name": "Films", "events": film_events})

if len(performance_events) > 0:
venues.append({"name": "Performances", "events": performance_events})

if len(attendee_events) > 0:
venues.append(
{
"name": "Attendee Events",
"description": "We encourage people to run their own talks, performances, workshops, and community meetups during the event. These are the ones that people added to the schedule.",
"events": attendee_events,
}
)

return {"year": year, "venues": venues, "event": event_data}


Expand Down
3 changes: 3 additions & 0 deletions templates/schedule/historic/talks.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ <h2 itemprop="name">{{event_name}}</h2>
{% set venue_loop = loop %}

<h3>{{ venue.name }}</h3>
{% if venue.description %}
<p>{{ venue.description }}</p>
{% endif %}
<table class="table">
<thead>
<tr>
Expand Down

0 comments on commit a8a9a65

Please sign in to comment.