Ejemplo n.º 1
0
#!/usr/bin/env python

import sys

import ocropy

if __name__ == "__main__":
    # TODO: fancy option handling?
    if len(sys.argv) != 2:
        print "usage: hocr.py <img_location>"
        sys.exit(1)

    image_location = sys.argv[1]
    print ocropy.hocr(image_location)
Ejemplo n.º 2
0
 def test_tif(self):
     html = ocropy.hocr("test-data/0001.tif")
     expected = open("test-data/0001.html").read()
     self.assertEqual(html, expected)
Ejemplo n.º 3
-1
Archivo: test.py Proyecto: edsu/ocropy
 def test_tif(self):
     html = ocropy.hocr("test-data/0001.tif")
     expected = open("test-data/0001.html").read()
     self.assertEqual(html, expected)
Ejemplo n.º 4
-1
Archivo: hocr.py Proyecto: edsu/ocropy
#!/usr/bin/env python

import sys

import ocropy


if __name__ == "__main__":
    # TODO: fancy option handling?
    if len(sys.argv) != 2:
        print "usage: hocr.py <img_location>"
        sys.exit(1)

    image_location = sys.argv[1]
    print ocropy.hocr(image_location)