writable stream to render ansi graphics into canvas.
This is escapes.js ported to node.js using node-canvas.
var fs = require('fs');
var escapes = require('escapes');
fs.createReadStream(__dirname + '/node.ans')
.pipe(escapes(function (canvas) {
var s = '<img src="' + canvas.toDataURL() + '">';
fs.writeFile('out.html', s);
}));
now open out.html
because it's awesome:
See also http://sixteencolors.net for many more awesome artpacks.
# api
var escapes = require('escapes');
# todo
- streaming png/jpeg support
mit