From: Christian Heller Date: Fri, 3 Jul 2020 19:31:24 +0000 (+0200) Subject: Auto-open sum details in HTML table. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=27d911cf01028ff3e2fe9f87b453f3e34222adae;p=berlin-corona-table Auto-open sum details in HTML table. --- 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))
%s%s
%s%s
%s%s