If you like the ascii characters like that, you might also enjoy figlet: http://www.figlet.org/
A command-line weather app built using Elixir
51–60 of 67 posts
Re: A command-line weather app built using Elixir
#52I'm excited about this not because I want to use it, but because it is a great example of an Elixir app. I'm in the process of learning Elixir, and it was cool to see someone else's code and be able to make sense of most of it. Thanks for posting this!
I don't know Elixir, but it does some questionable things. For instance, it appears to read and process the entire ascii_chars.txt file for each character in the output. It's not a big file, but it wouldn't be difficult to read it once.
Re: A command-line weather app built using Elixir
#53I'm excited about this not because I want to use it, but because it is a great example of an Elixir app. I'm in the process of learning Elixir, and it was cool to see someone else's code and be able to make sense of most of it. Thanks for posting this!
Re: A command-line weather app built using Elixir
#54Another ASCII art weather (forecast) utility, but in Go: https://github.com/schachmat/wego
This is much much better. Closer to "beautiful" than the one featured here.
1) you think mutable variables are beautiful
2) you think stuffing everything into one file is beautiful
3) you think defining functions at the root namespace is beautiful
4) you think consecutive repeated property accesses stuffed into a consecutively repeating boolean check like this are beautiful: if h.Time == "0" || h.Time == "100" || h.Time == "200" || h.Time == "300" || h.Time == "400" || h.Time == "500" || h.Time == "600" || h.Time == "700" || h.Time == "1400" || h.Time == "1500" || h.Time == "1600" || h.Time == "2300"
5) if you think embedding ANSI color codes across all strings instead of centralizing all that ugliness somewhere is beautiful
6) if you think not separating your command-line-handling code from your problem-modeling code is beautiful (see: Hexagonal Architecture http://alistair.cockburn.us/Hexagonal+architecture)
7) If you think having no fucking test suite to speak of, given all that mangled mutating code is beautiful (to me this is the MOST egregious non-beautiful thing in the entire "project")
Then, yes. WeGo is beautiful.
Frankly I'm shocked that what people call "beautiful" can differ that fucking much.
Re: A command-line weather app built using Elixir
#55Interesting describing ASCII art as 'beautiful'. You can tell this isn't Designer News :P
Re: A command-line weather app built using Elixir
#56Ya know, I was just thinking about doing something like this just a couple of days ago, but instead I wrote a python script to get the weather from forecast.io api, then brought that into my tmux status bar.
Re: A command-line weather app built using Elixir
#57function weather(){curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=metric" | jq .main.temp | figlet -kcf big} $ weather london __ _ _ ___ _____ /_ || || | |__ \ | ____| | || || |_ ) || |__ | ||__ _| / / |___ \ | | | | _ / /_ ___) | |_| |_|(_)|____||____/
Re: A command-line weather app built using Elixir
#58Earlier quoted context omitted.
I am sorry for that. It was a hobby project of mine when learning Elixir and I got excited about it.
I've got nothing against it. it's a fun little hobby app, but yeah, I've got to agree with the commenter above this is FAR from any standard definition of a "beautiful" app.
Re: A command-line weather app built using Elixir
#59function weather(){curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=metric" | jq .main.temp | figlet -kcf big} $ weather london __ _ _ ___ _____ /_ || || | |__ \ | ____| | || || |_ ) || |__ | ||__ _| / / |___ \ | | | | _ / /_ ___) | |_| |_|(_)|____||____/
May be you should post a gist. The line is getting truncated.
Re: A command-line weather app built using Elixir
#60function weather(){curl -s "http://api.openweathermap.org/data/2.5/weather?q=$1&units=metric" | jq .main.temp | figlet -kcf big} $ weather london __ _ _ ___ _____ /_ || || | |__ \ | ____| | || || |_ ) || |__ | ||__ _| / / |___ \ | | | | _ / /_ ___) | |_| |_|(_)|____||____/
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?