diff --git a/index.html b/index.html index 55a28926..df9d1b8e 100644 --- a/index.html +++ b/index.html @@ -12,9 +12,8 @@ text-decoration: none; color: #81A2BE; } - ul { - list-style-type: none; - padding: 0; + table { + margin: 1em auto; } .red { color: #CC6666; @@ -29,58 +28,186 @@ -

RKI Inzidenz Historie nach Landkreisen und Städten

+

RKI Inzidenz Historie

+

RKI Stand: 16.05.2021 +
Letztes Update: 2021-05-16 19:34:30.733886

SK Kaufbeuren

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
03.05.139.65
04.05.159.92
05.05.139.65
06.05.139.65
07.05.144.15
08.05.135.14
09.05.146.40
10.05.164.42
11.05.159.92
12.05.130.64
13.05.141.90
14.05.123.88
15.05.85.59
16.05.83.34

LK Ostallgäu

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
03.05.155.12
04.05.160.79
05.05.146.62
06.05.135.29
07.05.145.20
08.05.133.87
09.05.135.29
10.05.140.24
11.05.126.08
12.05.111.91
13.05.115.45
14.05.110.50
15.05.80.75
16.05.85.00

LK Weilheim-Schongau

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
03.05.129.91
04.05.126.22
05.05.104.81
06.05.92.27
07.05.101.12
08.05.96.69
09.05.97.43
10.05.96.69
11.05.108.50
12.05.101.12
13.05.95.96
14.05.96.69
15.05.81.93
16.05.76.03
\ No newline at end of file diff --git a/python/__pycache__/updatehtml.cpython-37.pyc b/python/__pycache__/updatehtml.cpython-37.pyc deleted file mode 100644 index 0f118ddb..00000000 Binary files a/python/__pycache__/updatehtml.cpython-37.pyc and /dev/null differ diff --git a/python/index.html b/python/index.html deleted file mode 100644 index 84fb4909..00000000 --- a/python/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - RKI Inzidenz Historie - - - - -

RKI Inzidenz Historie nach Landkreisen und Städten

-

SK Kaufbeuren

- -

LK Ostallgäu

- -

LK Weilheim-Schongau

- -
- - \ No newline at end of file diff --git a/python/requirements.txt b/requirements.txt similarity index 100% rename from python/requirements.txt rename to requirements.txt diff --git a/python/updatehtml.py b/updatehtml.py similarity index 67% rename from python/updatehtml.py rename to updatehtml.py index dd77b993..2dc0b17e 100644 --- a/python/updatehtml.py +++ b/updatehtml.py @@ -2,8 +2,9 @@ import requests import tempfile import urllib.parse +import datetime -filter = [9777,9190,9762] +filter = ['LKNR',9777,9190,9762] def getrkixlsx(url, path): file = '%s/inzidenzen.xlsx' %(path) @@ -15,12 +16,17 @@ def getdata(file): xlsx = openpyxl.load_workbook(file, read_only=True) sheet = xlsx['LK_7-Tage-Inzidenz'] data = {} - for row in sheet.iter_rows(min_row=6, values_only=True): + for row in sheet.iter_rows(min_row=5, values_only=True): if not row[1] == None and row[2] in filter: + if row[2] == 'LKNR': + index = 'date' + else: + index = row[1] + if row[-1] == None: - data[row[1]] = row[-15:-1] + data[index] = row[-15:-1] else: - data[row[1]] = row[-14:] + data[index] = row[-14:] xlsx.close() return data @@ -42,9 +48,8 @@ def generatehtml(data, path): ' text-decoration: none;', ' color: #81A2BE;', ' }', - ' ul {', - ' list-style-type: none;', - ' padding: 0;', + ' table {', + ' margin: 1em auto;', ' }', ' .red {', ' color: #CC6666;', @@ -59,22 +64,28 @@ def generatehtml(data, path): ' ', ' ', ' ', - '

RKI Inzidenz Historie nach Landkreisen und Städten

', '' + '

RKI Inzidenz Historie

', + '

RKI Stand: %s' %(data['date'][-1].strftime("%d.%m.%Y")), '
' + ' Letztes Update: %s

' %(datetime.datetime.now()), '' ])) for lk in data: + if lk == 'date': continue id = urllib.parse.quote_plus(lk) f.write('

%s

\n' %(id, id, lk)) - f.write('