From 99d62eaf48bd65338840d6da91607d587c7cf650 Mon Sep 17 00:00:00 2001 From: James Yoo Date: Sat, 14 Jun 2025 17:12:18 -0700 Subject: [PATCH] Start implementing a "total mileage" column for the schedule --- _bin/mkical.py | 2 ++ _includes/schedule_table.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/_bin/mkical.py b/_bin/mkical.py index de9ec07..bb16551 100755 --- a/_bin/mkical.py +++ b/_bin/mkical.py @@ -59,6 +59,8 @@ def dtstart(date, time): for run in sched: date = datetime.strptime(run['date'], '%Y-%m-%d') phases = run['plan'] + # Maybe something here? + # total_dist = 0 if 'cancelled' in run.keys(): continue for i in range(len(phases)): diff --git a/_includes/schedule_table.html b/_includes/schedule_table.html index 72a653a..9eb3d64 100644 --- a/_includes/schedule_table.html +++ b/_includes/schedule_table.html @@ -5,7 +5,8 @@ Date Time - Route (miles) + Routes (miles) + Total mileage {% endif %} @@ -58,6 +59,9 @@ {% if route.gpx %}   {% endif %} + {% if forloop.last %} + TODO: fill in total mileage + {% endif %} {% if plan.notes %}