X-Git-Url: https://plomlompom.com/repos/?p=berlin-corona-table;a=blobdiff_plain;f=enhance_table.py;h=4a060a4b758a654ee5593662cf0f66386e037bf1;hp=0ca53d7a200f5f5b4255fb85acaf3452dc4ff425;hb=fca28d3ad3def405de5853c253e0ef130eb41fdc;hpb=43820a07318a4751ac914b42a80aaa346a6e85a9
diff --git a/enhance_table.py b/enhance_table.py
index 0ca53d7..4a060a4 100755
--- a/enhance_table.py
+++ b/enhance_table.py
@@ -140,9 +140,8 @@ if output_type == 'html':
Berlin's Corona infection numbers, development by districts
@@ -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('date | ')
- print('? | ')
- for district in sorted_districts:
- print('%s | ' %
- (translate[district], district))
- print('
')
+ weekday_count = 0
for date in sorted_dates:
+ if weekday_count == 0:
+ print('')
+ print('date | ')
+ print('? | ')
+ for district in sorted_districts:
+ print('%s | ' %
+ (translate[district], district))
+ print('
')
print('')
print('%s | ' % date)
print('')
@@ -195,6 +195,10 @@ th { text-align: left; vertical-align: bottom; }
print(' ')
print(' | ')
print('
')
+ weekday_count += 1
+ if weekday_count != 7:
+ continue
+ weekday_count = 0
print('')
print('Symbols
')
print('')