Browse Source

Fix file resolving from examples

pull/22/head
Hector Leon Zarco Garcia 8 years ago
parent
commit
800c83440d
  1. 4
      examples/node/basic.js
  2. 4
      examples/node/detect.js

4
examples/node/basic.js

@ -1,6 +1,8 @@
var path = require('path');
var Tesseract = require('../../') // replace this with require('tesseract.js') var Tesseract = require('../../') // replace this with require('tesseract.js')
var image = path.resolve(__dirname, 'cosmic.png');
Tesseract.recognize('cosmic.png') Tesseract.recognize(image)
.then(function(data){ .then(function(data){
console.log(data.text) console.log(data.text)
}) })

4
examples/node/detect.js

@ -1,6 +1,8 @@
var path = require('path');
var Tesseract = require('../../') // replace this with require('tesseract.js') var Tesseract = require('../../') // replace this with require('tesseract.js')
var image = path.resolve(__dirname, 'cosmic.png');
Tesseract.detect('cosmic.png') Tesseract.detect(image)
.progress(function(info){ .progress(function(info){
console.log(info) console.log(info)
}) })

Loading…
Cancel
Save