diff --git a/html/style.css b/html/style.css index cc5da64..3b81067 100644 --- a/html/style.css +++ b/html/style.css @@ -151,7 +151,8 @@ img.logo { .current .wttr { font-size: 1.5rem; font-weight: bold; text-shadow: var(--dark-glow); } .current .danger { font-size: 1rem; font-weight: normal; text-shadow: var(--dark-glow); } .current .level { font-size: 1.5rem; font-weight: bold; } -.danger p { font-size: 1rem; font-weight: normal; } +.danger a { font-size: 1rem; font-weight: normal; text-decoration: underline dotted #248bcc; color: var(--text); } +.danger p { font-size: 1rem; font-weight: normal; text-decoration: none; color: var(--text); } /* 4 data cats — auto-placed into cols 2 & 3, 2 per row → 2×2 grid */ .cat { @@ -414,7 +415,8 @@ img.logo { .current .wttr { font-size: 1.5rem; } .current .danger { font-size: 1rem; } .current .level { font-size: 1rem; } - .danger p { font-size: 1rem; } + .danger a { font-size: 1rem; text-decoration: underline dotted #248bcc; color: var(--text); } + .danger p { font-size: 1rem; text-decoration: none; color: var(--text); } .cat { font-size: 1rem; } .cat p { padding-left: 14px; } @@ -440,7 +442,8 @@ img.logo { .current .wttr { font-size: 1rem; } .current .danger { font-size: 0.75rem; } .current .level { font-size: 1rem; } - .danger p { font-size: 0.75rem; } + .danger a { font-size: 0.75rem; text-decoration: underline dotted #248bcc; color: var(--text); } + .danger p { font-size: 0.75rem; text-decoration: none; color: var(--text); } .cat { font-size: 0.75rem; } .cat p { padding-left: 12px; } diff --git a/index.sh b/index.sh index 6b49f27..0f9f004 100755 --- a/index.sh +++ b/index.sh @@ -21,12 +21,12 @@ if [ ! -s "$data/atemp.data" ]; then fi ## Depth -curl -s https://www.ag.ch/app/hydrometrie/station/?id=11626 | grep -m 9 td | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data +curl -s --user-agent "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/538.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" https://www.hydrodaten.admin.ch/de/seen-und-fluesse/stationen-und-daten/2099#stationsinfos | grep -A 8 -m 1 'Letzter' | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data if [ ! -s "$data/depth.data" ]; then echo "$(date): depth empty, wait a minute or something" >> /tmp/error.log sleep 30 - curl -s https://www.ag.ch/app/hydrometrie/station/?id=11626 | grep -m 9 td | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data + curl -s --user-agent "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/538.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" https://www.hydrodaten.admin.ch/de/seen-und-fluesse/stationen-und-daten/2099#stationsinfos | grep -A 8 -m 1 'Letzter' | tail -n 1 | grep -Eo '[0-9][0-9][0-9].[0-9][0-9]' | awk '{print $1-398}' > "$data"/depth.data fi ## Discharge @@ -191,18 +191,18 @@ echo -e "
-

🗺 📧

+

🗺 📧

Made with bash. No cookies, no bullshit.

Updated every 20 minutes, curves show past week.

Using open data from:

-
ag.ch wetteronline.ch wttr.in zh.ch
+
admin.ch wetteronline.ch wttr.in zh.ch

Thank you!

Updated at ${utime}

$wttr

-

Danger Level

+

Danger Level

@@ -227,7 +227,7 @@ echo -e "
" > /var/www/hardbrugg.ch/html/index.html