home · contact · privacy
Fix vertical header cell orientation bug for Chromium.
[berlin-corona-table] / enhance_table.py
index 46e0b41b85b9fe5eddc1935204c435b7838ca1ce..d37205ee11220cc828b2e4eb75163a0eb3a2c295 100755 (executable)
@@ -143,8 +143,9 @@ table, tr, th, td { border: 1px solid black; text-align: center; }
 </style>
 <title>Berlin's Corona infection numbers, development by districts</title>
 </head>
+<a href="/">home</a> · <a href="/contact.html">contact</a> · <a href="/privacy.html">privacy</a>
 <h1>Berlin's Corona infection numbers, development by districts</h1>
-<p>Updated daily at 9pm. <a href="https://plomlompom.com/repos/?p=berlin-corona-table">Source code</a>. <a href="berlin_corona.txt">Text view optimized for terminal curl</a>.</p>
+<p>Updated daily at 9pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung". <a href="https://plomlompom.com/repos/?p=berlin-corona-table">Source code</a>. <a href="berlin_corona.txt">Text view optimized for terminal curl</a>.</p>
 <table>
 <tr>
 <th>date</th>""")
@@ -155,7 +156,9 @@ table, tr, th, td { border: 1px solid black; text-align: center; }
         if sum_district == district:
             print('<th>%s</th>' % long_form)
         else:
-            print('<th class="district_name">%s</th>' % long_form)
+            # Wrap in div because the vertical orientation otherwise fails
+            # in Chromium.
+            print('<th><div class="district_name">%s</div></th>' % long_form)
     print('</tr>')
     for date in sorted_dates:
         print('<tr class="day_row">')
@@ -195,7 +198,7 @@ elif output_type == 'txt':
     # Explain what this is.
     intro = \
 """Table of Berlin's Corona infection number development by districts.
-Updated daily at 9pm.
+Updated daily at 9pm based on data from the "Senatsverwaltung für Gesundheit, Pflege und Gleichstellung".
 
 Abbrevations/explanations:
 """