X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=enhance_table.py;h=4a060a4b758a654ee5593662cf0f66386e037bf1;hb=fca28d3ad3def405de5853c253e0ef130eb41fdc;hp=c5c11c22bfe1d52518243e13a279ad800c77301d;hpb=dc7fd6818afda18eb8e2d0c8c99af29ccf3655c1;p=berlin-corona-table diff --git a/enhance_table.py b/enhance_table.py index c5c11c2..4a060a4 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -140,16 +140,15 @@ if output_type == 'html': Berlin's Corona infection numbers, development by districts home · contact · privacy

Berlin's Corona infection numbers, development by districts

-

Updated daily at 9pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". Source code. Text view optimized for terminal curl.

+

Updated daily at 9pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". Source code. Plain text view (optimized for terminal curl).

""") @@ -160,15 +159,16 @@ th { text-align: left; vertical-align: bottom; } print('' % translate[district]) print('') - print('') - # In Chromium, the th only stay fixed if also given this class. - print('') - print('') - for district in sorted_districts: - print('' % - (translate[district], district)) - print('') + weekday_count = 0 for date in sorted_dates: + if weekday_count == 0: + print('') + print('') + print('') + for district in sorted_districts: + print('' % + (translate[district], district)) + print('') print('') print('' % date) print('') print('') + weekday_count += 1 + if weekday_count != 7: + continue + weekday_count = 0 print('
%s
date?%s
date?%s
%s') @@ -195,6 +195,10 @@ th { text-align: left; vertical-align: bottom; } print('
') print('
') print('

Symbols

') print('
')