GithubHelp home page GithubHelp logo

weather-emoji's Introduction

Weather-emoji

💎​ Display current, today, and tomorrow's forecast in command line.

Displays a brief summary of:

  • Current weather, temperature, and humidity
  • Today's forecast (could rain later today no?)
  • Tomorrow's forecast (so you don't forget your umbrella)

The forecasts also contain min-max temperatures as well.

Example

$ weather
Now:      ☁ (49ºF/61%)
Today:    ☔ (42-49ºF)
Tomorrow: ⛅ (35-51ºF)

You can also specify which unit to use (-f for Fahrenheit, -c for Celsius):

$ weather -c
Now:      ☁ (9ºC/61%)
Today:    ☔ (5-9ºC)
Tomorrow: ⛅ (1-11ºC)

If the unit is not specified, the localized unit will be used (i.e. if the location is in US, use imperial, else metric).

You can also hit up an IP address or a hostname:

$ weather github.com
Now:      🌊 (80ºF/49%)
Today:    🌞 (62-82ºF)
Tomorrow: 🌞 (56-74ºF)

$ weather 8.8.8.8
Now:      ⛅ (77ºF/22%)
Today:    🌞 (57-82ºF)
Tomorrow: 🌞 (46-70ºF)

Implementation Progress

The following briefly explains the logic of how the weather is fetched and displayed; also, this serves as a to-do list.

  • Geolocate given IP (or current host's IP, if not given)
  • Get weather information for that coordinate
  • Consume weather information
  • Prettify weather information
  • Add emoji for each weather code
  • Add fahrenheit support
  • Add moon phase => version 1.0!

Notes

Weather Condition Codes

Check OpenWeatherMap's doc

References

  • OpenWeatherMap API

weather-emoji's People

Contributors

hunj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

weather-emoji's Issues

Add moon phase

If current time is before sunrise or past sunset (from OpenWeatherMap API call), calculate moon phase for current time, and display that emoji instead of current weather; else display the emoji.

Add localization (Fahrenheit) support

  1. Check if user is in US (using response from OpenWeatherAPI)
  2. Unless a flag (listed below) is given to force, present the temperatures in Imperial units.
  • -f flag to force Fahrenheit
  • -c flag to force Celsius

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.