From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/captcha/ShareonlineBiz.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 0c87b636d..7b739c295 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # #Copyright (C) 2009 kingzero, RaNaN # @@ -17,10 +16,19 @@ # along with this program; if not, see . # ### -from captcha import OCR + +from module.plugins.OCR import OCR + class ShareonlineBiz(OCR): __name__ = "ShareonlineBiz" + __version__ = "0.1" + __type__ = "ocr" + + __description__ = """Shareonline.biz ocr plugin""" + __author_name__ = "RaNaN" + __author_mail__ = "RaNaN@pyload.org" + def __init__(self): OCR.__init__(self) @@ -46,8 +54,10 @@ class ShareonlineBiz(OCR): #tesseract at 60% + if __name__ == '__main__': import urllib + ocr = ShareonlineBiz() urllib.urlretrieve("http://www.share-online.biz/captcha.php", "captcha.jpeg") - print ocr.get_captcha('captcha.jpeg') + print ocr.get_captcha('captcha.jpeg') -- cgit v1.2.3 From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/captcha/ShareonlineBiz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 7b739c295..a3fbbed7c 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -20,6 +20,7 @@ from module.plugins.OCR import OCR + class ShareonlineBiz(OCR): __name__ = "ShareonlineBiz" __version__ = "0.1" @@ -33,7 +34,7 @@ class ShareonlineBiz(OCR): def __init__(self): OCR.__init__(self) - def get_captcha(self, image): + def get_captcha(self, image): self.load_image(image) self.to_greyscale() self.image = self.image.resize((160, 50)) -- cgit v1.2.3 From a88d976e387c36eb44461c627dee6b3cae4e5cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:18:44 +0200 Subject: Fix captcha import bug introduced in 48c0c42fd6faffc56432d5f037cd575979f180cc --- module/plugins/captcha/ShareonlineBiz.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index a3fbbed7c..73ec4a7e0 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -17,8 +17,7 @@ # ### -from module.plugins.OCR import OCR - +from captcha import OCR class ShareonlineBiz(OCR): -- cgit v1.2.3 From cedfbde86de423b8f004299af9f8ab60606cb790 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:26:43 +0200 Subject: Remove testcodes in captcha plugins --- module/plugins/captcha/ShareonlineBiz.py | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 73ec4a7e0..44ea6a187 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -1,21 +1,4 @@ # -*- coding: utf-8 -*- -# -#Copyright (C) 2009 kingzero, RaNaN -# -#This program is free software; you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 3 of the License, -#or (at your option) any later version. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -#See the GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -### from captcha import OCR @@ -53,11 +36,3 @@ class ShareonlineBiz(OCR): return final #tesseract at 60% - - -if __name__ == '__main__': - import urllib - - ocr = ShareonlineBiz() - urllib.urlretrieve("http://www.share-online.biz/captcha.php", "captcha.jpeg") - print ocr.get_captcha('captcha.jpeg') -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/captcha/ShareonlineBiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 44ea6a187..aab4e9da0 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from captcha import OCR +from module.plugins.captcha import OCR class ShareonlineBiz(OCR): __name__ = "ShareonlineBiz" - __version__ = "0.1" __type__ = "ocr" + __version__ = "0.1" __description__ = """Shareonline.biz ocr plugin""" __author_name__ = "RaNaN" -- cgit v1.2.3 From a74f7bb16a1419c6b8c37fc0d916c9f63a296235 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 2 Oct 2014 21:25:25 +0200 Subject: Fix captcha import of OCR class --- module/plugins/captcha/ShareonlineBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index aab4e9da0..01d49e380 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from module.plugins.captcha import OCR +from module.plugins.captcha.captcha import OCR class ShareonlineBiz(OCR): -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/captcha/ShareonlineBiz.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 01d49e380..3973e7f7f 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -9,8 +9,7 @@ class ShareonlineBiz(OCR): __version__ = "0.1" __description__ = """Shareonline.biz ocr plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] def __init__(self): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/captcha/ShareonlineBiz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 3973e7f7f..7435710d5 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -9,6 +9,7 @@ class ShareonlineBiz(OCR): __version__ = "0.1" __description__ = """Shareonline.biz ocr plugin""" + __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/captcha/ShareonlineBiz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 7435710d5..41caa3697 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -16,6 +16,7 @@ class ShareonlineBiz(OCR): def __init__(self): OCR.__init__(self) + def get_captcha(self, image): self.load_image(image) self.to_greyscale() -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/captcha/ShareonlineBiz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 41caa3697..6e513941d 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -4,13 +4,13 @@ from module.plugins.captcha.captcha import OCR class ShareonlineBiz(OCR): - __name__ = "ShareonlineBiz" - __type__ = "ocr" + __name__ = "ShareonlineBiz" + __type__ = "ocr" __version__ = "0.1" __description__ = """Shareonline.biz ocr plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] def __init__(self): -- cgit v1.2.3 From 6151e81fa0b325dffda3da4228d5821e73db3ef3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 9 Dec 2014 01:19:46 +0100 Subject: Fix __version__ format in some plugins --- module/plugins/captcha/ShareonlineBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/captcha/ShareonlineBiz.py') diff --git a/module/plugins/captcha/ShareonlineBiz.py b/module/plugins/captcha/ShareonlineBiz.py index 6e513941d..8210e8859 100644 --- a/module/plugins/captcha/ShareonlineBiz.py +++ b/module/plugins/captcha/ShareonlineBiz.py @@ -6,7 +6,7 @@ from module.plugins.captcha.captcha import OCR class ShareonlineBiz(OCR): __name__ = "ShareonlineBiz" __type__ = "ocr" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Shareonline.biz ocr plugin""" __license__ = "GPLv3" -- cgit v1.2.3