This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme, add phantom script, original screengrabs
- Loading branch information
Showing
3 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
var intervalLength = 300000; | ||
|
||
function screenCap() { | ||
loadMap(); | ||
loadRadar(); | ||
} | ||
|
||
function loadMap() { | ||
var page = require('webpage').create(); | ||
|
||
page.viewportSize = { | ||
width: 1200, | ||
height: 1200 | ||
}; | ||
|
||
page.open('https://www.google.com/maps/@38.6337794,-76.8123652,6z/data=!5m1!1e1', function() { | ||
map_wait(); | ||
}); | ||
|
||
function map_wait() { | ||
setTimeout(function() { | ||
var timestamp = (new Date()).toLocaleString(); | ||
page.render('screengrabs/map-' + timestamp + '.png'); | ||
}, 5000); | ||
} | ||
} | ||
|
||
function loadRadar() { | ||
var page = require('webpage').create(); | ||
|
||
page.viewportSize = { | ||
width: 1200, | ||
height: 1200 | ||
}; | ||
|
||
page.open('http://project.wnyc.org/storm-radar/', function() { | ||
radar_wait(); | ||
}); | ||
|
||
function radar_wait() { | ||
setTimeout(function() { | ||
var timestamp = (new Date()).toLocaleString(); | ||
page.render('screengrabs/radar-' + timestamp + '.png'); | ||
}, 5000); | ||
} | ||
} | ||
|
||
screenCap(); | ||
var interval = setInterval(screenCap, intervalLength); |
Binary file not shown.