Echoprint Codegen wrapper for node. It requires the echoprint-codegen binary installed in order to work.
var codegen = require('echoprint-codegen');
codegen('/path/to/file', function (err, data) {
if (err) return console.error(err);
console.log(data); // {"metadata":{...}, "code_count": 4098, "code": "eJzFn..."}
});
You can specify several options:
var opts = {
file: '/path/to/file',
index: 10,
offset: 30
}
codegen(opts, function (err, data) {
if (err) return console.error(err);
console.log(data);
});