Add location tracking to weekend page

Weekend page now shows specific location (city and country) for each
Saturday and Sunday based on travel history:

- Analyzes flight arrivals and accommodation check-ins to determine exact location
- Shows "home" when at Bristol, UK
- Shows "City, 🏴 Country" format when traveling
- Handles multi-location trips by finding most recent travel within trip period
- Optimized to parse YAML files once instead of per-date lookup

Closes #191

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2025-07-16 03:59:35 +02:00
parent f41930f811
commit af492750cb
5 changed files with 235 additions and 6 deletions

View file

@ -11,7 +11,9 @@
<th class="text-end">Week</th>
<th class="text-end">Date</th>
<th>Saturday</th>
<th>Saturday Location</th>
<th>Sunday</th>
<th>Sunday Location</th>
</tr>
</thead>
<tbody>
@ -43,6 +45,14 @@
<strong>free</strong>
{% endif %}
</td>
{% if extra_class %}<td class="{{ extra_class|trim }}">{% else %}<td>{% endif %}
{% set city, country = weekend[day + '_location'] %}
{% if city == "Bristol" and country.alpha_2 | upper == "GB" %}
<strong>home</strong>
{% else %}
{{ city }}, {{ country.flag }} {{ country.name }}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}