Compare commits

..

No commits in common. "ad47f291f8f32a8fbd2a770ba0c7fbacfed32bd9" and "82de51109f5ccc705e6c05c9f9501fb8eded55ff" have entirely different histories.

3 changed files with 4 additions and 13 deletions

View file

@ -29,17 +29,13 @@ class Trip:
travel: list[StrDict] = field(default_factory=list)
accommodation: list[StrDict] = field(default_factory=list)
conferences: list[StrDict] = field(default_factory=list)
events: list[StrDict] = field(default_factory=list)
@property
def title(self) -> str:
"""Trip title."""
return (
format_list_with_ampersand(
[conf["name"] for conf in self.conferences]
+ [event["title"] for event in self.events]
)
or "[unnamed trip]"
format_list_with_ampersand([conf["name"] for conf in self.conferences])
or "[no conference]"
)
@property
@ -64,7 +60,7 @@ class Trip:
"""Countries visited as part of trip, in order."""
seen: set[str] = set()
items: list[Country] = []
for item in self.conferences + self.accommodation + self.events:
for item in self.conferences + self.accommodation:
if "country" not in item:
continue
if item["country"] in seen:

View file

@ -68,8 +68,6 @@
{% endmacro %}
{% macro flight_row(item) %}
{% set full_flight_number = item.airline + item.flight_number %}
{% set url = "https://www.radarbox.com/data/flights/" + full_flight_number %}
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
<div class="grid-item">{{ item.from }} &rarr; {{ item.to }}</div>
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
@ -80,9 +78,7 @@
{% endif %}
</div>
<div class="grid-item">{{ item.duration }}</div>
<div class="grid-item">
<a href="{{ url }}">{{ full_flight_number }}</a>
</div>
<div class="grid-item">{{ item.airline }}{{ item.flight_number }}</div>
<div class="grid-item">{{ item.booking_reference }}</div>
{% endmacro %}

View file

@ -178,7 +178,6 @@ def build_trip_list() -> list[Trip]:
"travel": travel_items,
"accommodation": travel.parse_yaml("accommodation", data_dir),
"conferences": travel.parse_yaml("conferences", data_dir),
"events": travel.parse_yaml("events", data_dir),
}
for key, item_list in data.items():