Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

escapes

0.1.0 • Public • Published

escapes

writable stream to render ansi graphics into canvas.

This is escapes.js ported to node.js using node-canvas.

example

given node.ans by fcambus:

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:

screenshot

See also http://sixteencolors.net for many more awesome artpacks.

api

var escapes = require('escapes');

var stream = escapes(cb);

todo

  • streaming png/jpeg support

license

mit

install

npm i escapes

Downloadsweekly downloads

2

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar