Created
July 28, 2014 18:40
-
-
Save ttscoff/d139fa34967c36545d16 to your computer and use it in GitHub Desktop.
Quick Dark Sky forecast script for my GeekTool setup. Needs forecast_io gem and an API key, edit the coordinates as needed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'forecast_io' | |
ForecastIO.api_key = 'xxxxxxxxxxxx' | |
forecast = ForecastIO.forecast(44.047889,-91.640439) | |
if ARGV[0] == "current" | |
print "#{forecast.currently.temperature.round}, #{forecast.currently.summary}" | |
else | |
print forecast.minutely.summary | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment