Validate YAML to check events
This commit is contained in:
parent
a607f29259
commit
5964899a00
|
@ -2,8 +2,10 @@
|
|||
"""Load YAML data to ensure validity."""
|
||||
|
||||
import os
|
||||
from datetime import date, timedelta
|
||||
|
||||
import agenda.conference
|
||||
import agenda.data
|
||||
import agenda.travel
|
||||
import agenda.trip
|
||||
|
||||
|
@ -26,3 +28,10 @@ print(len(trains), "trains")
|
|||
|
||||
conferences = agenda.conference.get_list(os.path.join(data_dir, "conferences.yaml"))
|
||||
print(len(conferences), "conferences")
|
||||
|
||||
today = date.today()
|
||||
last_year = today - timedelta(days=365)
|
||||
next_year = today + timedelta(days=2 * 365)
|
||||
|
||||
events = agenda.data.read_events_yaml(data_dir, last_year, next_year)
|
||||
print(len(events), "events")
|
||||
|
|
Loading…
Reference in a new issue