Weather from the Commandline by Igor Chubin

Discussion in 'Coding, Scripting & Programming' started by drmike, Feb 20, 2016.

  1. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    I find myself looking at weather sites too often.  Part of work and need to.


    Websites for weather are various states of bloat, plugins and  heavy to deal with.  I always have a slew of terminal windows open... so...


    This is a good new / recent project by @igor_chubin (on Twitter) https://twitter.com/igor_chubin:


    curl http://wttr.in/90210

    curl http://wttr.in/seattle



    For now it only outputs non US values (Celcius and km/h).   US-ificiation is coming soon.


    Long live terminal friendly things like this!


    PS: It works in browser also:


    http://wttr.in/manisa


    Code for the project: https://github.com/chubin/wttr.in
     
    souen and Licensecart like this.
  2. MannDude

    MannDude Just a dude vpsBoard Founder Moderator

    5,007
    2,620
    Mar 8, 2013
    MannDude
    Oh, that's awesome.


    m6WXVQf.png
     
    drmike likes this.
  3. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    @MannDude It will help you for now to become a good world citizen and adapt to Celcius :)
     
    Last edited by a moderator: Apr 30, 2017
  4. MannDude

    MannDude Just a dude vpsBoard Founder Moderator

    5,007
    2,620
    Mar 8, 2013
    MannDude
    Nah, I like my weather and measurements made in freedom units.
     
    Licensecart, Nikki and drmike like this.
  5. GM2015

    GM2015 New Member

    26
    11
    Jan 8, 2016
    It needs curl user-agent to work though.


    My curlrc file is set to  Windows firefox to avoid website 403s most of the time. If you curl it with non-curl useragent, you get html source.


    [email protected]:/dev/null$ pc curl -L -A "curl 666 satanic edition" wttr.in/washington
    ProxyChains-3.1 (http://proxychains.sf.net)
    |DNS-request| wttr.in
    |R-chain|-<>--<><>-OK
    |DNS-response| wttr.in is ..
    |R-chain|-<>--<--timeout
    |R-chain|-<>--<><>-OK
    Weather for City: Washington, United States of America

        \  /       Partly Cloudy
      _ /"".-.     17 °C         
        \_(   ).   ↑ 24 km/h     
        /(___(__)  16 km         
                   0.0 mm        
                                                           long result

    Follow @igor_chubin for wttr.in updates


    Well done to the man, programmers always amaze with their achievements.
     
    Last edited by a moderator: Feb 20, 2016
  6. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    Pretty nifty.... of you to have curl setting browser.. Indeed common problem getting blocked due to such for me on downloads.


    @igor_chubin is active with this project, so I am expecting more goodies :)
     
  7. Licensecart

    Licensecart Active Member

    367
    118
    May 22, 2013
    That's awesome :D