X-Git-Url: https://plomlompom.com/repos/do_day?a=blobdiff_plain;f=enhance_table.py;h=28c472eeeda95650488700c8b4384c3cae7e4d44;hb=c284e595f130dc4ca3354d474932c59c305e8149;hp=4a060a4b758a654ee5593662cf0f66386e037bf1;hpb=fca28d3ad3def405de5853c253e0ef130eb41fdc;p=berlin-corona-table diff --git a/enhance_table.py b/enhance_table.py index 4a060a4..28c472e 100755 --- a/enhance_table.py +++ b/enhance_table.py @@ -134,6 +134,7 @@ for i in range(len(sorted_dates)): db[district][date]['week_incidence'] = (week_sum / district_pop) * 100000 # Optimized for web browser viewing. +import calendar if output_type == 'html': print(""" @@ -143,12 +144,13 @@ th { text-align: left; vertical-align: bottom; } .vertical_header { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: normal; } .repeated_head th { padding-top: 0.5em; border-bottom: 1px solid black; } .bold { font-weight: bold } +.date { vertical-align: top; padding-top: 0.5em; }
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).
+Updated daily at 7pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". Source code. Plain text view (optimized for terminal curl).
""") @@ -170,7 +172,8 @@ th { text-align: left; vertical-align: bottom; } (translate[district], district)) print(' | |||
---|---|---|---|
%s | ' % date) + weekday = calendar.day_name[datetime.date.fromisoformat(date).weekday()] + print('%s %s | ' % (date, weekday))
print('
|