New backup 2025-03-18 17:00:02
This commit is contained in:
parent
626b846926
commit
60a4b97693
1 changed files with 45 additions and 0 deletions
|
@ -1,4 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
wttr_cache="${HOME}/.cache/wttr.json"
|
||||
#jq -r '.current_condition[0].weatherCode' ${wttr_cache}
|
||||
jq -r '.current_condition[0].weatherCode' ${wttr_cache}
|
||||
condition_code="$(jq -r '.current_condition[0].weatherCode' ${wttr_cache})"
|
||||
|
||||
case "${condition_code}" in
|
||||
113)
|
||||
#Sunny
|
||||
echo ""
|
||||
;;
|
||||
116|119|122|143)
|
||||
#Partly cloudy
|
||||
#Cloudy
|
||||
#Overcast
|
||||
#Mist
|
||||
echo ""
|
||||
;;
|
||||
179|227|230)
|
||||
#Patchy snow possible
|
||||
#Blowing snow
|
||||
#Blizzard
|
||||
echo ""
|
||||
;;
|
||||
248|260)
|
||||
#Fog
|
||||
#Freezing fog
|
||||
echo "▒"
|
||||
;;
|
||||
176|182|185|200|263|266|281|284|293|296|299|302|305|308|311)
|
||||
#Patchy rain possible
|
||||
#Patchy sleet possible
|
||||
#Patchy freezing drizzle possible
|
||||
#Thundery outbreaks possible
|
||||
#Patchy light drizzle
|
||||
#Light drizzle
|
||||
#Freezing drizzle
|
||||
#Heavy freezing drizzle
|
||||
#Patchy light rain
|
||||
#Light rain
|
||||
#Moderate rain at times
|
||||
#Moderate rain
|
||||
#Heavy rain at times
|
||||
#Heavy rain
|
||||
#Light freezing rain
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Reference in a new issue