task-read
v0.1.0
Published
A node-task to read inputs into Records using any RecordIO interface.
Downloads
3
Readme
task-read
A node-task to read inputs into Records using any RecordIO interface.
Super rough cut.
Usage
var Read = require('task-read');
var task = new Read();
var config = {
use: require('recordio-file')
};
var input = [{
src: [
'test/fixtures/foo.txt',
'test/fixtures/bar.txt',
'test/fixtures/baz.txt'
],
dest: 'tmp/combined.txt'
}]
task.run(config, input).then(function(records) {
console.log(records); //[ { src:
// [ <Record "test/fixtures/foo.txt" <Buffer 66 6f 6f>>,
// <Record "test/fixtures/bar.txt" <Buffer 62 61 72>>,
// <Record "test/fixtures/baz.txt" <Buffer 62 61 7a>> ],
// dest: 'tmp/combined.txt' } ]
});