diff --git a/Dockerfile b/Dockerfile index 7ae75da..aa96062 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN go get -u github.com/mattn/go-colorable && \ cd /app && CGO_ENABLED=0 go build . # Application stage -FROM alpine:3.16 +FROM alpine:3.21.1 WORKDIR /app diff --git a/lib/view/line.py b/lib/view/line.py index 4a884f2..b3a81ae 100644 --- a/lib/view/line.py +++ b/lib/view/line.py @@ -128,6 +128,12 @@ def render_condition_plain(data, query): return weather_condition +def render_condition_int(data, query): + """Weather condition code as integer (i) + """ + return data['weatherCode'] + + def render_humidity(data, query): """ humidity (h) @@ -284,6 +290,7 @@ FORMAT_SYMBOL = { 'c': render_condition, 'C': render_condition_fullname, 'x': render_condition_plain, + 'i': render_condition_int, 'h': render_humidity, 't': render_temperature, 'f': render_feel_like_temperature, diff --git a/requirements.txt b/requirements.txt index ad24997..a13ca26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,3 +24,4 @@ numba emoji>=1.6.0,<=1.7.0 grapheme pycountry +aiohttp>=3.10.11 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/share/bash-function.txt b/share/bash-function.txt index 69bbfef..8b857c5 100644 --- a/share/bash-function.txt +++ b/share/bash-function.txt @@ -20,12 +20,12 @@ fi wttr() { local location="${1// /+}" - command shift - local args="" + test "$#" -gt 0 && shift + local args=() for p in $WTTR_PARAMS "$@"; do - args+=" --data-urlencode $p " + args+=("--data-urlencode" "$p") done - curl -fGsS -H "Accept-Language: ${LANG%_*}" $args --compressed "wttr.in/${location}" + curl -fGsS -H "Accept-Language: ${LANG%_*}" "${args[@]}" --compressed "wttr.in/${location}" } wttr "$@" diff --git a/share/emoji/☀️.png b/share/emoji/☀️.png index 183386f..28d45ce 100644 Binary files a/share/emoji/☀️.png and b/share/emoji/☀️.png differ diff --git a/share/emoji/☁️.png b/share/emoji/☁️.png index 5660627..5bf00c1 100644 Binary files a/share/emoji/☁️.png and b/share/emoji/☁️.png differ diff --git a/share/emoji/⛅️.png b/share/emoji/⛅️.png index 72b417d..6eb7b65 100644 Binary files a/share/emoji/⛅️.png and b/share/emoji/⛅️.png differ diff --git a/share/emoji/⛈.png b/share/emoji/⛈.png index ddacbf1..f27e24a 100644 Binary files a/share/emoji/⛈.png and b/share/emoji/⛈.png differ diff --git a/share/emoji/✨.png b/share/emoji/✨.png index f6419fa..a215220 100644 Binary files a/share/emoji/✨.png and b/share/emoji/✨.png differ diff --git a/share/emoji/❄️.png b/share/emoji/❄️.png index d4a3f9c..8349b4a 100644 Binary files a/share/emoji/❄️.png and b/share/emoji/❄️.png differ diff --git a/share/emoji/🌒.png b/share/emoji/🌒.png index e7aa0ae..5a6042a 100644 Binary files a/share/emoji/🌒.png and b/share/emoji/🌒.png differ diff --git a/share/emoji/🌓.png b/share/emoji/🌓.png index 84e0a21..945e3ca 100644 Binary files a/share/emoji/🌓.png and b/share/emoji/🌓.png differ diff --git a/share/emoji/🌔.png b/share/emoji/🌔.png index ebdfd35..9d9feed 100644 Binary files a/share/emoji/🌔.png and b/share/emoji/🌔.png differ diff --git a/share/emoji/🌕.png b/share/emoji/🌕.png index 975682f..81a1123 100644 Binary files a/share/emoji/🌕.png and b/share/emoji/🌕.png differ diff --git a/share/emoji/🌖.png b/share/emoji/🌖.png index b5c9791..9fff2ec 100644 Binary files a/share/emoji/🌖.png and b/share/emoji/🌖.png differ diff --git a/share/emoji/🌗.png b/share/emoji/🌗.png index 2358e7c..0f83b58 100644 Binary files a/share/emoji/🌗.png and b/share/emoji/🌗.png differ diff --git a/share/emoji/🌘.png b/share/emoji/🌘.png index 325eb50..07bca94 100644 Binary files a/share/emoji/🌘.png and b/share/emoji/🌘.png differ diff --git a/share/emoji/🌦.png b/share/emoji/🌦.png index b5063f9..f679c02 100644 Binary files a/share/emoji/🌦.png and b/share/emoji/🌦.png differ diff --git a/share/emoji/🌧.png b/share/emoji/🌧.png index b4352b7..0d102ae 100644 Binary files a/share/emoji/🌧.png and b/share/emoji/🌧.png differ diff --git a/share/emoji/🌨.png b/share/emoji/🌨.png index c1d1e1f..8ae2aaa 100644 Binary files a/share/emoji/🌨.png and b/share/emoji/🌨.png differ diff --git a/share/emoji/🌩.png b/share/emoji/🌩.png index bb84231..44800e6 100644 Binary files a/share/emoji/🌩.png and b/share/emoji/🌩.png differ diff --git a/share/static/example-tmux-status-line.png b/share/static/example-tmux-status-line.png index 2f755f6..ca3fe2c 100644 Binary files a/share/static/example-tmux-status-line.png and b/share/static/example-tmux-status-line.png differ diff --git a/share/static/example-wttr-v2.png b/share/static/example-wttr-v2.png index 153d88a..67896ca 100644 Binary files a/share/static/example-wttr-v2.png and b/share/static/example-wttr-v2.png differ