From 2439bc22671dde697817291b721bfddb792a93b4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 10 Dec 2014 19:07:53 +0100 Subject: Fix plugins key attributes --- pyload/plugins/OCR.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pyload/plugins/OCR.py') 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: -- cgit v1.2.3