parent
f028e40df8
commit
b7d655a21e
|
@ -48,8 +48,9 @@ class Conference:
|
||||||
|
|
||||||
def get_list(filepath: str) -> list[Event]:
|
def get_list(filepath: str) -> list[Event]:
|
||||||
"""Read conferences from a YAML file and return a list of Event objects."""
|
"""Read conferences from a YAML file and return a list of Event objects."""
|
||||||
return [
|
events: list[Event] = []
|
||||||
Event(
|
for conf in (Conference(**conf) for conf in yaml.safe_load(open(filepath, "r"))):
|
||||||
|
event = Event(
|
||||||
name="conference",
|
name="conference",
|
||||||
date=conf.start,
|
date=conf.start,
|
||||||
end_date=conf.end,
|
end_date=conf.end,
|
||||||
|
@ -57,5 +58,15 @@ def get_list(filepath: str) -> list[Event]:
|
||||||
url=conf.url,
|
url=conf.url,
|
||||||
going=conf.going,
|
going=conf.going,
|
||||||
)
|
)
|
||||||
for conf in (Conference(**conf) for conf in yaml.safe_load(open(filepath, "r")))
|
events.append(event)
|
||||||
]
|
if not conf.cfp_end:
|
||||||
|
continue
|
||||||
|
cfp_end_event = Event(
|
||||||
|
name="cfp_end",
|
||||||
|
date=conf.cfp_end,
|
||||||
|
title="CFP end: " + conf.display_name,
|
||||||
|
url=conf.cfp_url or conf.url,
|
||||||
|
)
|
||||||
|
events.append(cfp_end_event)
|
||||||
|
|
||||||
|
return events
|
||||||
|
|
Loading…
Reference in a new issue