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
var fs = require('fs'); | |
var fork = require('child_process').fork; | |
var async = require('async'); | |
async.series([ | |
function(callback){ | |
var command = fork("./command.js", [], {silent: true }); | |
command.stdout.pipe(process.stdout); | |
command.stderr.pipe(process.stderr); | |
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
/* | |
* get screenshot PNG from web page | |
* | |
* build: | |
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0` | |
* gcc -Wall $FLAGS getscreenshot.c -o getscreenshot | |
* | |
* usage: | |
* /usr/bin/xvfb-run -s "-screen 0 1024x768x24" ./getscreenshot test.html | |
* |