summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-09 15:04:02 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-09 15:04:02 +0800
commitd9a4056f738aff322d2c350b3d62a3e4f00cdcfa (patch)
tree6c4477c079ed2afac2d32c82bedc27ca574ddc06 /sh
parentd21c3ac57900ca3890d807ad2656a7c4dd8bfb9f (diff)
wtr new location, use open-meteo lat. and lon. for the city
Diffstat (limited to 'sh')
-rwxr-xr-xsh/wtr2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/wtr b/sh/wtr
index 14598b7..4ac0518 100755
--- a/sh/wtr
+++ b/sh/wtr
@@ -1,7 +1,7 @@
#!/bin/sh
# https://github.com/open-meteo/open-meteo
-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
+curl -sS -G -d "latitude=${1:-31.38}" -d "longitude=${2:-120.95}" -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';;