From: Christian Heller Date: Tue, 30 Jun 2020 21:21:01 +0000 (+0200) Subject: Add script to daily update the infections table and the website output. X-Git-Url: https://plomlompom.com/repos/?p=berlin-corona-table;a=commitdiff_plain;h=7c65171564d45767cac7ba903dd8206620943b2e Add script to daily update the infections table and the website output. --- 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