Project

weatherbot

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby CLI wrapper using the OpenWeatherMap.org API with interactive features that allow you to search any location's current weather and 3 day forecast.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 0.1
~> 10.0
~> 3.0
 Project Readme

Weatherbot

A Ruby CLI wrapper using the OpenWeatherMap.org API with interactive features that allow you to search any location's current weather, quick link to the map in Google Maps, and also display the 3 day forecast.

Installation

Add this line to your application's Gemfile:

gem 'weatherbot'

And then execute:

$ bundle

Or install it yourself as:

$ gem install weatherbot

Usage

Weatherbot is a Ruby gem that utilizes OpenWeatherMap’s API to retrieve current and forecast weather conditions based on a user’s input.

Type weatherbot to start the program.

You will be prompted to enter a location. Anywhere works, the API responds to almost any entry, even if it is misspelled.

Many popular locations will work. In order to get the most accurate results, typing in <location>, <country> will work in almost every query.

The data is outputted to the terminal and shows:

  • The Report Time and the timezone your computer is in
  • The API response best guess of the location you typed with the country code
  • The coordinates of the weather station that returned the data
  • A Google Maps link to the coordinates
  • Current temperature & conditions
  • Cloudiness
  • Humidity
  • Wind Speed & Direction
  • Sunrise and Sunset

You can type forecast to display the city's 3 day weather forecast in 24 hour intervals.

After typing in a location, you can type map to open your OS browser to the Google Maps coordinates of the result.

To quit the program type exit.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/TheInvalidNonce/weatherbot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Weatherbot project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.