From 7c65171564d45767cac7ba903dd8206620943b2e Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 30 Jun 2020 23:21:01 +0200 Subject: [PATCH] Add script to daily update the infections table and the website output. --- update.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 update.sh diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..a136185 --- /dev/null +++ b/update.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Parse Lageso day table of new infections by district into new line for history table. +today="$(date +%Y-%m-%d)" +curl https://www.berlin.de/lageso/_assets/gesundheit/publikationen/corona/bezirkstabelle.csv \ +| awk 'BEGIN { FS=";"; ORS=""; print "'${today}'" }; '\ +'!/^Bezirk/ { printf "%4d", $3 }; '\ +'END { printf "\n" }' "${filename}" >> /home/plom/meldetabelle/daily_infections_table.txt + +# Write enhanced table output to directory served by web server. +./enhance_table.py > /var/www/html/berlin_corona.txt -- 2.30.2