home
·
contact
·
privacy
projects
/
berlin-corona-table
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3d2a65
)
Remove redundant in-code whitespace.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 3 Jul 2020 17:40:17 +0000
(19:40 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 3 Jul 2020 17:40:17 +0000
(19:40 +0200)
update.sh
patch
|
blob
|
history
diff --git
a/update.sh
b/update.sh
index 27a9dd1fe476f16009fb0d94f0af5fa62eeccc86..11bfb0f997b323ff876ea1d968e3fd04622eaa53 100755
(executable)
--- a/
update.sh
+++ b/
update.sh
@@
-1,16
+1,16
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
-CSV_URL=https://www.berlin.de/lageso/_assets/gesundheit/publikationen/corona/bezirkstabelle.csv
+CSV_URL=https://www.berlin.de/lageso/_assets/gesundheit/publikationen/corona/bezirkstabelle.csv
table_path=daily_infections_table.txt
# If we don't have a table file yet, we need to provide its header.
header=" CW FK Li MH Mi Ne Pa Re Sp SZ TS TK sum"
table_path=daily_infections_table.txt
# If we don't have a table file yet, we need to provide its header.
header=" CW FK Li MH Mi Ne Pa Re Sp SZ TS TK sum"
-if [ ! -f "${table_path}" ]; then
+if [ ! -f "${table_path}" ]; then
echo "${header}" > "${table_path}"
fi
echo "${header}" > "${table_path}"
fi
-# Parse Lageso day table of new infections by district into new line for history table.
+# Parse Lageso day table of new infections by district into new line for history table.
today="$(date +%Y-%m-%d)"
curl "${CSV_URL}" \
| awk 'BEGIN { FS=";"; ORS=""; print "'${today}'" }; '\
today="$(date +%Y-%m-%d)"
curl "${CSV_URL}" \
| awk 'BEGIN { FS=";"; ORS=""; print "'${today}'" }; '\