Re:A command-line weather app built using Elixir
by rnhmjoj on Thursday May 07, 2015 @09:04AM
(#9504712)
[ Parent
| on HN ]
Re:A command-line weather app built using Elixir
by q3k on Thursday May 07, 2015 @10:22AM
(#9505211)
But that's not web-scale and written in a functional language!
Re:A command-line weather app built using Elixir
by taternuts on Thursday May 07, 2015 @01:58PM
(#9506977)
Cool!
for fahrenheit you can change the units to imperial
function weather(){curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=imperial" | jq .main.temp | figlet -kcf big}
Re:A command-line weather app built using Elixir
by gknoy on Thursday May 07, 2015 @11:55AM
(#9505965)
Perhaps I'm a bash noob, but when I try to paste that in my shell, it complains about a syntax error near `{curl`. Am I doing something wrong?
Re:A command-line weather app built using Elixir
by cocoflunchy on Thursday May 07, 2015 @12:00PM
(#9506014)
There are spacing issues for me. Try
function weather() { curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=metric" | jq .main.temp | figlet -kcf big ;}
Re:A command-line weather app built using Elixir
by rnhmjoj on Thursday May 07, 2015 @12:46PM
(#9506403)
I wrote this in zsh. It seems in bash you need to add a space before the bracket
Re:A command-line weather app built using Elixir
by tacticiankerala on Thursday May 07, 2015 @12:23PM
(#9506232)
May be you should post a gist. The line is getting truncated.
Re:A command-line weather app built using Elixir
by rnhmjoj on Thursday May 07, 2015 @12:41PM
(#9506371)
It should scroll horizontally.
Re:A command-line weather app built using Elixir
by tacticiankerala on Thursday May 07, 2015 @01:02PM
(#9506544)
my bad :(