BunsenLabs / bunsen-conky

Interesting scripts and setups for Conky
https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-conky/
GNU General Public License v3.0
39 stars 10 forks source link

weather script #14

Closed spiridonovmv closed 7 years ago

spiridonovmv commented 9 years ago

Function printf not accept numbers whith dot delimiters (37.57) in russian locales. Whith comma delimiters work fine.

I do this: temperature=$(printf '%.0f' $(echo $weather | jq '.main.temp'| tr '.' ','))

Sector11 commented 9 years ago

Will this work - please correct the Russian for me:

temperature=$(printf '%.0f' $(echo $weather | jq '.main.temp'))
# for Russian locales use - для российских локалей
# temperature=$(printf '%.0f' $(echo $weather | jq '.main.temp'| tr '.' ','))

Thank you for the tip. Спасибо за совет. Please excuse my net-translator.