Skip to content
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 1.35 KB

README.md

File metadata and controls

27 lines (19 loc) · 1.35 KB

Weather Underground CLI Interface

Description

This program was a homework assignment for one night at the Iron Yard. See this source

We practiced Test Driven Development while estimating the time it would take to develop. My original estimate was 8 hours to develop this program, and it took about 12 hours instead (too many rabbit holes, emojis!)

Usage

At the BASH terminal, run ruby cli.rb to start the interactive prompt. At this moment, you'll only be able to put in zip codes, or STATE/CITY (ie NC/Raleigh) formatted locations.

You will need to supply your own Weather Underground API key. You can register for one here: http://www.wunderground.com/weather/api/

Once you have your key, put it into your Bash profile by doing this: echo "EXPORT WUNDERGROUND_API=myapikey" >> ~/.bash_profile and then restart your terminal for it to take effect.

Screenshot

screenshot

TODO

  • Enhance with the super powers of emojis
  • Be awesome.
  • Make input more flexible with some regular expressions
  • Save the API Key some grief by caching requests into a local sqlite3 database
  • Some of the API responses are pretty dumb; add some common-sense checks so things like " /mph" show up without any context.