diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-11 01:04:09 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-11 01:04:09 +0200 |
commit | c3b3f3ea5c813edbe3e6941c535c78ad494244ee (patch) | |
tree | 6a76a01cdf3d5fe678e02618bdbe7d0c5ce8ca8c /module/plugins/internal/OCR.py | |
parent | Fix https://github.com/pyload/pyload/issues/2002 (diff) | |
download | pyload-c3b3f3ea5c813edbe3e6941c535c78ad494244ee.tar.xz |
Fix https://github.com/pyload/pyload/issues/1998
Fix https://github.com/pyload/pyload/issues/1999
Fix https://github.com/pyload/pyload/issues/2001
Diffstat (limited to 'module/plugins/internal/OCR.py')
-rw-r--r-- | module/plugins/internal/OCR.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py index ca87f91a6..ccadbbcbc 100644 --- a/module/plugins/internal/OCR.py +++ b/module/plugins/internal/OCR.py @@ -18,7 +18,7 @@ from module.utils import save_join as fs_join class OCR(Plugin): - __name = "OCR" + __name__ = "OCR" __type__ = "ocr" __version__ = "0.20" __status__ = "testing" @@ -44,8 +44,8 @@ class OCR(Plugin): def _log(self, level, plugintype, pluginname, messages): return self.plugin._log(level, plugintype, - self.plugin.__name, - (self.__name,) + messages) + self.plugin.__name__, + (self.__name__,) + messages) def load_image(self, image): @@ -80,11 +80,11 @@ class OCR(Plugin): def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True, pagesegmode=None): # tmpTif = tempfile.NamedTemporaryFile(suffix=".tif") try: - tmpTif = open(fs_join("tmp", "tmpTif_%s.tif" % self.__name__), "wb") + tmpTif = open(fs_join("tmp", "tmpTif_%s.tif" % self.classname), "wb") tmpTif.close() # tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") - tmpTxt = open(fs_join("tmp", "tmpTxt_%s.txt" % self.__name__), "wb") + tmpTxt = open(fs_join("tmp", "tmpTxt_%s.txt" % self.classname), "wb") tmpTxt.close() except IOError, e: @@ -106,7 +106,7 @@ class OCR(Plugin): if subset and (digits or lowercase or uppercase): # tmpSub = tempfile.NamedTemporaryFile(suffix=".subset") - with open(fs_join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub: + with open(fs_join("tmp", "tmpSub_%s.subset" % self.classname), "wb") as tmpSub: tmpSub.write("tessedit_char_whitelist ") if digits: |