Permalink
Browse files

Initial commit, MVP

  • Loading branch information...
0 parents commit b354d4afa4fccd9e9ac9abf5b8bf25cec3ff7dd3 @bryanwoods committed Sep 18, 2011
Showing 460 changed files with 218,381 additions and 0 deletions.
@@ -0,0 +1,13 @@
+#!/usr/local/bin/node
+(function() {
+ var WUNDERGROUND_URL, jsdom;
+ jsdom = require('jsdom');
+ WUNDERGROUND_URL = 'http://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=11231';
+ jsdom.env(WUNDERGROUND_URL, ['http://code.jquery.com/jquery-1.5.min.js'], function(errors, window) {
+ var $, high, low;
+ $ = window.jQuery;
+ high = $('.fctHiLow .b').html();
+ low = $('.fctHiLow').first().html().split('|')[1].split('°')[0].trim();
+ return console.log("Today's high: " + high + "\nToday's low: " + low);
+ });
+}).call(this);
@@ -0,0 +1,14 @@
+jsdom = require 'jsdom'
+
+BASE_URL = "http://www.wunderground.com/cgi-bin/findweather/hdfForecast?query="
+args = process.argv
+zip = if args[2] then args[2] else "11231"
+
+jsdom.env BASE_URL + zip,
+ ['http://code.jquery.com/jquery-1.5.min.js'],
+ (errors, window) ->
+ $ = window.jQuery
+ high = $('.fctHiLow .b').html()
+ low = $('.fctHiLow').first().html().split('|')[1].split('°')[0].trim()
+
+ console.log "Today's high: #{high}\nToday's low: #{low}"

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit b354d4a

Please sign in to comment.