mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-26 00:28:53 +01:00
Update list-weather.ps1
This commit is contained in:
parent
19a3d9ef17
commit
6ea66c2a5a
@ -38,6 +38,7 @@ function GetDescription { param([string]$Text)
|
||||
"Moderate or heavy snow showers"{ return "❄️ moderate or heavy snow showers ⚠️" }
|
||||
"Moderate or heavy freezing rain"{ return "💧 moderate or heavy freezing rain ⚠️" }
|
||||
"Moderate rain" { return "💧 moderate rain" }
|
||||
"Moderate rain at times" { return "💧 moderate rain at times" }
|
||||
"Moderate snow" { return "❄️ moderate snow" }
|
||||
"Mist" { return "🌫 misty" }
|
||||
"Overcast" { return "☁️ overcast" }
|
||||
@ -79,7 +80,7 @@ function GetWindDir { param([string]$Text)
|
||||
}
|
||||
|
||||
try {
|
||||
Write-Progress "⏳ Loading data from http://wttr.in ..."
|
||||
Write-Progress "⏳ Loading weather data from http://wttr.in ..."
|
||||
$Weather = (Invoke-WebRequest -URI http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
|
||||
Write-Progress -completed "."
|
||||
$Area = $Weather.nearest_area.areaName.value
|
||||
|
Loading…
Reference in New Issue
Block a user