-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this dead? #1
Comments
This is so super ezpz with http://phantomjs.org/ var page = require('webpage').create();
var pagemobile = require('webpage').create();
var date = new Date();
var timestamp = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate();
page.viewportSize = {
width: 1300,
height: 1080
};
pagemobile.viewportSize = {
width: 320,
height: 568
};
var pages = [
'http://mississippihills.dev',
'http://mississippihills.dev/events/',
'http://mississippihills.dev/events/month/',
'http://mississippihills.dev/event/bigtime-event/',
'http://mississippihills.dev/blog/'
];
var timeout = 2000;
function rShots(index) {
page.open(pages[index], function() {
window.setTimeout(function () {
var filename = 'dist/'+timestamp+'/large/mshills'+index+'.png';
page.render(filename);
if(index < pages.length-1) {
rShots(index+1);
} else {
callback();
}
}, timeout);
});
}
function rShotsmobile(index, cb) {
pagemobile.open(pages[index], function() {
window.setTimeout(function () {
var filenameMobile = 'dist/'+timestamp+'/mobile/mshills'+index+'.png';
pagemobile.render(filenameMobile);
if(index < pages.length-1) {
rShotsmobile(index+1);
} else {
callback2();
}
}, timeout);
});
}
var callback = function () {
rShotsmobile(0);
};
var callback2 = function () {
phantom.exit();
};
rShots(0); |
@ridhoq tell @DarrenCattle to do work pls |
@DarrenCattle ezpz hacktx idea check it: http://phantomjs.org/screen-capture.html. @austinpray will host the script rite? |
I mean I already wrote the script in a previous comment |
Ye I host |
There's a bunch of ways to do this. CLI like this https://github.com/superbrothers/capturejs exist too if you wanna get your shell scripting on. |
Ridwan just a banter lad. The screen capture is not a problem, the interesting thing is making a website that features the screenshots in an interesting way. |
Does this actually work on mshills? I'll implement on progrid at hacktx if you really want. We have lots of possibilities coming up for this event. |
Yes — On Thu, Oct 16, 2014 at 12:34 PM, Darren Cattle notifications@github.com
|
@DarrenCattle ping |
still has the problem of rendering taking too long. I can check and see if there's an updated phantomjs workaround. Maybe we create a hidden page such as progrid.io/shot that saves a current state of the grid given a hook then I can phantomjs it. I can give a talk about this at another time, I think this is easily possible. |
Or it just saves the state every minute, then we screenshot it. Definitely possible. |
I could add an endpoint that gives you a json dump of the grid object. Then you can render it out however you want. |
@DarrenCattle
The text was updated successfully, but these errors were encountered: