Created
November 7, 2010 21:04
-
-
Save jevinskie/666790 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/env node | |
require.paths.unshift(__dirname + '/modules'); | |
var fs = require('fs'); | |
var framer = require('framer'); | |
var stream = fs.createReadStream(process.argv[2], {encoding: 'utf8'}); | |
framer(stream, 14); // 14 lines per frame | |
stream.on('frame', function (frame, repeat){ | |
console.log('got a frame (repeats ' + repeat + '):'); | |
console.log(frame); | |
stream.pause(); | |
setTimeout(function (){ | |
stream.resume(); | |
}, 1000.0/15.0 * repeat); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment