1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

More weather emoji

This commit is contained in:
Chris Cummer 2018-03-29 03:34:36 -07:00 committed by Chris Cummer
parent 3393882dc8
commit 0b86262560

View File

@ -30,6 +30,7 @@ func Widget() tview.Primitive {
} }
// icon returns an emoji for the current weather // icon returns an emoji for the current weather
// src: https://github.com/chubin/wttr.in/blob/master/share/translations/en.txt
func icon(data *owm.CurrentWeatherData) string { func icon(data *owm.CurrentWeatherData) string {
var icon string var icon string
@ -39,11 +40,19 @@ func icon(data *owm.CurrentWeatherData) string {
case "cloudy": case "cloudy":
icon = "⛅️" icon = "⛅️"
case "heavy rain": case "heavy rain":
icon = "🌧" icon = "💦"
case "heavy snow":
icon = "⛄️"
case "light intensity shower rain":
icon = "☔️"
case "light rain": case "light rain":
icon = "🌧" icon = "🌦"
case "light snow":
icon = "🌨"
case "moderate rain": case "moderate rain":
icon = "🌧" icon = "🌧"
case "moderate snow":
icon = "🌨"
case "overcast": case "overcast":
icon = "🌥" icon = "🌥"
case "overcast clouds": case "overcast clouds":
@ -55,7 +64,7 @@ func icon(data *owm.CurrentWeatherData) string {
case "sunny": case "sunny":
icon = "☀️" icon = "☀️"
default: default:
icon = "🌈" icon = "💥"
} }
return icon return icon