summaryrefslogtreecommitdiff
path: root/sh/wtr
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2024-10-03 14:56:02 -0700
committerXiao Pan <xyz@flylightning.xyz>2024-10-03 14:56:02 -0700
commit35ef3d36d50fe4cfd20db6f14bb0017b39319899 (patch)
tree6b74f90f392d9e3870286c2a6fd4ad3e3f715acd /sh/wtr
parentb13a0c1b7b5d24a4c0790279e10c89f94253c6c6 (diff)
curl show error when silent
Diffstat (limited to 'sh/wtr')
-rwxr-xr-xsh/wtr2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/wtr b/sh/wtr
index 5b385d6..14598b7 100755
--- a/sh/wtr
+++ b/sh/wtr
@@ -1,7 +1,7 @@
#!/bin/sh
# https://github.com/open-meteo/open-meteo
-curl -s -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do
+curl -sS -G -d "latitude=${1:-37.34}" -d "longitude=${2:--121.89}" -d 'daily=weathercode,temperature_2m_max,temperature_2m_min' -d 'timezone=auto' 'https://api.open-meteo.com/v1/forecast' | jq -r '[.daily|.time, .weathercode, .temperature_2m_max, .temperature_2m_min]|transpose|.[]|@tsv' | while read -r time code max min; do
# https://open-meteo.com/en/docs
case "$code" in
0) code='clear sky';;