X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=update.sh;fp=update.sh;h=a136185f923650da76b19cef6a7fd4f1b8d8d122;hb=7c65171564d45767cac7ba903dd8206620943b2e;hp=0000000000000000000000000000000000000000;hpb=c47e8179f8330b4b04c7c97e4c2a74272825b8fb;p=berlin-corona-table
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