Пример #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)
Пример #2
0
 def test_tif(self):
     html = ocropy.hocr("test-data/0001.tif")
     expected = open("test-data/0001.html").read()
     self.assertEqual(html, expected)
Пример #3
-1
 def test_tif(self):
     html = ocropy.hocr("test-data/0001.tif")
     expected = open("test-data/0001.html").read()
     self.assertEqual(html, expected)
Пример #4
-1
#!/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)