diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 19:07:53 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 19:07:53 +0100 |
commit | 2439bc22671dde697817291b721bfddb792a93b4 (patch) | |
tree | dad4615b7f1d664263af6a85392282329aa0b8e0 /pyload/plugins/OCR.py | |
parent | Revert plugin directory structure (diff) | |
download | pyload-2439bc22671dde697817291b721bfddb792a93b4.tar.xz |
Fix plugins key attributes
Diffstat (limited to 'pyload/plugins/OCR.py')
-rw-r--r-- | pyload/plugins/OCR.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pyload/plugins/OCR.py b/pyload/plugins/OCR.py index 8e60737b6..9e8d49d70 100644 --- a/pyload/plugins/OCR.py +++ b/pyload/plugins/OCR.py @@ -14,13 +14,13 @@ from os.path import abspath, join class OCR(object): - __name__ = "OCR" - __type__ = "ocr" - __version__ = "0.10" + __name = "OCR" + __type = "ocr" + __version = "0.10" - __description__ = """Base OCR plugin""" - __license__ = "GPLv3" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __description = """Base OCR plugin""" + __license = "GPLv3" + __authors = [("pyLoad Team", "admin@pyload.org")] def __init__(self): @@ -56,11 +56,11 @@ class OCR(object): def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True): #tmpTif = tempfile.NamedTemporaryFile(suffix=".tif") try: - tmpTif = open(join("tmp", "tmpTif_%s.tif" % self.__name__), "wb") + tmpTif = open(join("tmp", "tmpTif_%s.tif" % self.__name), "wb") tmpTif.close() #tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") - tmpTxt = open(join("tmp", "tmpTxt_%s.txt" % self.__name__), "wb") + tmpTxt = open(join("tmp", "tmpTxt_%s.txt" % self.__name), "wb") tmpTxt.close() except IOError, e: @@ -79,7 +79,7 @@ class OCR(object): if subset and (digits or lowercase or uppercase): #tmpSub = tempfile.NamedTemporaryFile(suffix=".subset") - with open(join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub: + with open(join("tmp", "tmpSub_%s.subset" % self.__name), "wb") as tmpSub: tmpSub.write("tessedit_char_whitelist ") if digits: |