From 27d911cf01028ff3e2fe9f87b453f3e34222adae Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 3 Jul 2020 21:31:24 +0200 Subject: [PATCH] Auto-open sum details in HTML table. --- enhance_table.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/enhance_table.py b/enhance_table.py index 0b30d21..785e231 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -145,6 +145,7 @@ if output_type == 'html': 'transform: rotate(180deg);">%s' % long_form) print('') sorted_dates.reverse() + sum_district = sorted_districts[-1] for date in sorted_dates: print('') print('%s' % date) @@ -163,7 +164,10 @@ if output_type == 'html': week_inc = '%.1f' % district_data['week_incidence'] print('') print(new_infections) - print('
') + if district == sum_district: + print('
') + else: + print('
') print('' % (long_wsum, week_sum)) print('' % (long_wavg, week_avg)) print('' % (long_winc, week_inc)) -- 2.30.2
%s%s
%s%s
%s%s