parent
94c4f47018
commit
4874fbb190
3 changed files with 11 additions and 1 deletions
|
|
@ -343,8 +343,14 @@ def get_accommodation(from_date: date, filepath: str) -> list[Event]:
|
|||
date=from_date,
|
||||
name="accommodation",
|
||||
title=f"check-in {title} ({night_str})",
|
||||
url=item.get("url"),
|
||||
)
|
||||
checkout = Event(
|
||||
date=to_date,
|
||||
name="accommodation",
|
||||
title="check-out " + title,
|
||||
url=item.get("url"),
|
||||
)
|
||||
checkout = Event(date=to_date, name="accommodation", title="check-out " + title)
|
||||
events += [checkin, checkout]
|
||||
return events
|
||||
|
||||
|
|
@ -356,6 +362,7 @@ def get_travel(from_date: date, method: str, filepath: str) -> list[Event]:
|
|||
date=item["depart"].date(),
|
||||
name="transport",
|
||||
title=f'{method} from {item["from"]} to {item["to"]}',
|
||||
url=item.get("url"),
|
||||
)
|
||||
for item in yaml.safe_load(open(filepath))
|
||||
if item["depart"].date() >= from_date
|
||||
|
|
|
|||
|
|
@ -11,3 +11,4 @@ class Event:
|
|||
name: str
|
||||
date: date
|
||||
title: str | None = None
|
||||
url: str | None = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue