2023-10-02 20:35:30 +01:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2024-04-16 22:01:16 +01:00
|
|
|
<title>Agenda - Edward Betts</title>
|
2024-03-30 10:18:21 +00:00
|
|
|
<link href="{{ url_for("static", filename="bootstrap5/css/bootstrap.min.css") }}" rel="stylesheet">
|
2023-11-13 12:08:55 +00:00
|
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📅</text></svg>">
|
2023-11-01 15:04:13 +00:00
|
|
|
|
2024-03-30 10:18:21 +00:00
|
|
|
<script async src="{{ url_for("static", filename="es-module-shims/es-module-shims.js") }}"></script>
|
2023-11-25 16:24:45 +00:00
|
|
|
|
2023-10-02 20:35:30 +01:00
|
|
|
</head>
|
|
|
|
|
2023-10-05 11:07:01 +01:00
|
|
|
{% set event_labels = {
|
2023-11-23 22:09:11 +00:00
|
|
|
"economist": "📰 The Economist",
|
2023-10-05 11:07:01 +01:00
|
|
|
"mothers_day": "Mothers' day",
|
|
|
|
"fathers_day": "Fathers' day",
|
|
|
|
"uk_financial_year_end": "End of financial year",
|
|
|
|
"bank_holiday": "UK bank holiday",
|
|
|
|
"us_holiday": "US holiday",
|
|
|
|
"uk_clock_change": "UK clock change",
|
|
|
|
"us_clock_change": "US clock change",
|
2023-11-10 10:49:27 +00:00
|
|
|
"us_presidential_election": "US pres. election",
|
2023-10-05 11:07:01 +01:00
|
|
|
"xmas_last_second": "Christmas last posting 2nd class",
|
|
|
|
"xmas_last_first": "Christmas last posting 1st class",
|
2023-11-08 14:40:07 +00:00
|
|
|
"up_series": "Up documentary",
|
2023-10-08 19:53:44 +01:00
|
|
|
"waste_schedule": "Waste schedule",
|
2023-10-29 14:59:03 +00:00
|
|
|
"gwr_advance_tickets": "GWR advance tickets",
|
2023-10-29 15:17:24 +00:00
|
|
|
"critical_mass": "Critical Mass",
|
2023-10-05 11:07:01 +01:00
|
|
|
}
|
|
|
|
%}
|
|
|
|
|
2023-10-11 17:31:16 +01:00
|
|
|
{%set class_map = {
|
|
|
|
"bank_holiday": "bg-success-subtle",
|
|
|
|
"conference": "bg-primary-subtle",
|
|
|
|
"us_holiday": "bg-secondary-subtle",
|
|
|
|
"birthday": "bg-info-subtle",
|
|
|
|
"waste_schedule": "bg-danger-subtle",
|
|
|
|
} %}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-02 16:08:22 +00:00
|
|
|
{% from "navbar.html" import navbar with context %}
|
2023-10-02 20:35:30 +01:00
|
|
|
<body>
|
2024-01-02 16:08:22 +00:00
|
|
|
{{ navbar() }}
|
2023-10-02 20:35:30 +01:00
|
|
|
|
2023-11-05 12:15:20 +00:00
|
|
|
<div class="container-fluid mt-2">
|
2023-10-02 20:35:30 +01:00
|
|
|
<h1>Agenda</h1>
|
2023-11-19 15:22:12 +00:00
|
|
|
<p>
|
2023-11-20 19:48:42 +00:00
|
|
|
<a href="/tools">← personal tools</a>
|
2023-11-19 15:22:12 +00:00
|
|
|
</p>
|
2023-10-02 20:35:30 +01:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Today is {{now.strftime("%A, %-d %b %Y")}}</li>
|
2023-11-21 19:19:22 +00:00
|
|
|
{% if gbpusd %}
|
|
|
|
<li>GBPUSD: {{"{:,.3f}".format(gbpusd)}}</li>
|
|
|
|
{% endif %}
|
2023-10-29 14:59:03 +00:00
|
|
|
<li>GWR advance ticket furthest date:
|
|
|
|
{% if gwr_advance_tickets %}
|
|
|
|
{{ gwr_advance_tickets.strftime("%A, %-d %b %Y") }}
|
|
|
|
{% else %}
|
|
|
|
unknown
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
2023-10-30 05:49:21 +00:00
|
|
|
<li>Bristol Sunrise: {{ sunrise.strftime("%H:%M:%S") }} /
|
2023-10-29 21:36:57 +00:00
|
|
|
Sunset: {{ sunset.strftime("%H:%M:%S") }}</li>
|
2023-10-02 20:35:30 +01:00
|
|
|
</ul>
|
|
|
|
|
2024-02-18 22:36:15 +00:00
|
|
|
{% if errors %}
|
|
|
|
{% for error in errors %}
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
Error: {{ error }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
2023-10-30 05:49:21 +00:00
|
|
|
<h3>Stock markets</h3>
|
|
|
|
{% for market in stock_markets %}
|
|
|
|
<p>{{ market }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
|
2023-11-01 15:04:13 +00:00
|
|
|
<h3>Agenda</h3>
|
|
|
|
|
2024-06-18 06:51:45 +01:00
|
|
|
<div>
|
|
|
|
Markets:
|
|
|
|
<a href="{{ url_for(request.endpoint) }}">Hide while away</a>
|
|
|
|
| <a href="{{ url_for(request.endpoint, markets="show") }}">Show all</a>
|
|
|
|
| <a href="{{ url_for(request.endpoint, markets="hide") }}">Hide all</a>
|
|
|
|
</div>
|
|
|
|
|
2024-06-19 22:15:32 +01:00
|
|
|
{% for event in events if start_event_list <= event.as_date <= end_event_list %}
|
2023-12-10 22:34:15 +00:00
|
|
|
{% if loop.first or event.date.year != loop.previtem.date.year or event.date.month != loop.previtem.date.month %}
|
2023-11-05 13:01:35 +00:00
|
|
|
<div class="row mt-2">
|
|
|
|
<div class="col">
|
2023-12-10 22:34:15 +00:00
|
|
|
<h4>{{ event.date.strftime("%B %Y") }}</h4>
|
2023-11-05 13:01:35 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-12-05 00:04:56 +00:00
|
|
|
{% set delta = event.delta_days(today) %}
|
|
|
|
{% if event.name == "today" %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col bg-warning-subtle">
|
|
|
|
<h3>today</h3>
|
|
|
|
</div>
|
2023-11-03 15:39:11 +00:00
|
|
|
</div>
|
2023-12-05 00:04:56 +00:00
|
|
|
{% else %}
|
|
|
|
{% set cell_bg = " bg-warning-subtle" if delta == "today" else "" %}
|
|
|
|
<div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% else %}{{ cell_bg }}{% endif %}">
|
2023-12-28 20:14:03 +00:00
|
|
|
<div class="col-md-2{{ cell_bg }}">
|
2023-12-05 00:04:56 +00:00
|
|
|
{{event.as_date.strftime("%a, %d, %b")}}
|
|
|
|
|
|
|
|
|
|
|
|
{{event.display_time or ""}}
|
|
|
|
|
|
|
|
|
|
|
|
{{event.display_timezone or ""}}
|
|
|
|
</div>
|
2023-10-29 16:08:17 +00:00
|
|
|
|
2023-12-28 20:14:03 +00:00
|
|
|
<div class="col-md-2{{ cell_bg }}">
|
2024-01-01 00:43:24 +00:00
|
|
|
{% if event.end_date %}
|
2024-05-16 15:58:07 +01:00
|
|
|
{% set duration = event.display_duration() %}
|
|
|
|
{% if duration %}
|
2024-01-01 00:43:24 +00:00
|
|
|
end: {{event.end_date.strftime("%H:%M") }}
|
2024-05-16 15:58:07 +01:00
|
|
|
(duration: {{duration}})
|
2024-01-01 00:43:24 +00:00
|
|
|
{% elif event.end_date != event.date %}
|
|
|
|
{{event.end_date}}
|
|
|
|
{% endif %}
|
2023-12-28 20:14:03 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-7 text-start">
|
2023-12-05 00:04:56 +00:00
|
|
|
{% if event.url %}<a href="{{ event.url }}">{% endif %}
|
|
|
|
{{ event_labels.get(event.name) or event.name }}
|
2024-01-16 15:32:39 +00:00
|
|
|
{%- if event.title -%}: {{ event.title_with_emoji }}{% endif %}
|
2023-12-05 00:04:56 +00:00
|
|
|
{% if event.url %}</a>{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col-md-1{{ cell_bg }}">
|
|
|
|
{{ delta }}
|
|
|
|
</div>
|
2023-11-03 15:39:11 +00:00
|
|
|
</div>
|
2023-12-05 00:04:56 +00:00
|
|
|
{% endif %}
|
2023-10-05 11:07:01 +01:00
|
|
|
{% endfor %}
|
|
|
|
|
2024-01-19 07:57:56 +00:00
|
|
|
<div class="mt-2">
|
|
|
|
<h5>Page generation time</h5>
|
|
|
|
<ul>
|
|
|
|
<li>Data gather took {{ "%.1f" | format(data_gather_seconds) }} seconds</li>
|
|
|
|
<li>Stock market open/close took
|
|
|
|
{{ "%.1f" | format(stock_market_times_seconds) }} seconds</li>
|
|
|
|
{% for name, seconds in timings %}
|
|
|
|
<li>{{ name }} took {{ "%.1f" | format(seconds) }} seconds</li>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2023-10-03 14:16:25 +01:00
|
|
|
</div>
|
2024-03-30 10:18:21 +00:00
|
|
|
<script src="{{ url_for("static", filename="bootstrap5/js/bootstrap.bundle.min.js") }}"></script>
|
2023-10-02 20:35:30 +01:00
|
|
|
</body>
|
|
|
|
</html>
|