weather-emoji

Display current, today, and tomorrow's weather forecast in minimalistic manner, using emojis


License
Beerware
Install
gem install weather-emoji -v 0.1.1

Documentation

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

  • Open