Skip Navigation
Text-Based User Interfaces (TUI; CLI) @lemmy.sdf.org

check the weather from the CLI using curl -- get colored text output

This bash alias will check the weather in Amsterdam over Tor:

 
    
alias weathernl="curl -s --socks4a 127.0.0.1:9050 -A '' 'https://wttr.in/Amsterdam,Netherlands?lang=en&A='"


  

If your city name contains a space, just substitute with a ”+”:

 
    
curl -s --socks4a 127.0.0.1:9050 -A '' 'https://wttr.in/Los+Angeles,California?lang=en&A='


  

This is one of few websites that looks like garbage in a GUI browser but great in text. Remove --socks4a 127.0.0.1:9050 if you don’t have tor proxy installed.

0 comments

No comments