docparse-scraped-add

Add scraped data to the docparse database

npm install docparse-scraped-add
56 downloads in the last month

Add scraped data to the docparse database

Installation

npm install docparse-scraped-add

Usage

var fs = require('fs')
var add = require('docparse-scraped-add')
var filePath = '/path/to/file'
var readStream = fs.createReadStream(filePath)
var data = {
  readStream: readStream,
  supplierCode: 'FGS',
  payload: {
    billNumber: 'fooBillNumber',
    loginID: 'fooLoginID',
    billDate: '2012-01-23 00:00:00 +00:00',
    accountNumber: 'barAccountNumber'
  }
}
add(data, function (err, reply) {
  if (err) {
    console.dir(err)
    return
  }
  console.dir(reply)
})

Tests

Execute in the project root

# install the development dependencies
npm install
# run the tests
npm test
npm loves you