[Pycodeocr-main] SF.net SVN: pycodeocr:[53] trunk
Status: Beta
Brought to you by:
drtrigon
|
From: <drt...@us...> - 2011-04-28 07:42:00
|
Revision: 53
http://pycodeocr.svn.sourceforge.net/pycodeocr/?rev=53&view=rev
Author: drtrigon
Date: 2011-04-28 07:41:54 +0000 (Thu, 28 Apr 2011)
Log Message:
-----------
README and CHANGES into doxygen docu, more deps auto install (for tesseract and convert)
Modified Paths:
--------------
trunk/CHANGES
trunk/Doxyfile
trunk/PyCodeOCR.py
trunk/README
trunk/utils/ocr.py
trunk/utils/requirements.py
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/CHANGES 2011-04-28 07:41:54 UTC (rev 53)
@@ -60,4 +60,3 @@
# - Some docu written for orientation and use, look at README.
#
#
-
Modified: trunk/Doxyfile
===================================================================
--- trunk/Doxyfile 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/Doxyfile 2011-04-28 07:41:54 UTC (rev 53)
@@ -656,7 +656,7 @@
# directories that contain example code fragments that are included (see
# the \include command).
-EXAMPLE_PATH =
+EXAMPLE_PATH = .
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Modified: trunk/PyCodeOCR.py
===================================================================
--- trunk/PyCodeOCR.py 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/PyCodeOCR.py 2011-04-28 07:41:54 UTC (rev 53)
@@ -34,6 +34,14 @@
#
# (not implemented yet).
#
+# @section readme Readme
+#
+# @include "./README"
+#
+# @section changes Changes
+#
+# @include "./CHANGES"
+#
# python standard modules
import os, re, sys, time
@@ -451,6 +459,9 @@
# helpers
#
## Main scanning and number recognition procedure.
+ #
+ # @todo Put this function (may be as class with functions for each step) into utils::ocr
+ #
def scancode(self):
# Initialization of scanning process
# (0/7)
Modified: trunk/README
===================================================================
--- trunk/README 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/README 2011-04-28 07:41:54 UTC (rev 53)
@@ -145,5 +145,3 @@
#
# If there is is any question or suggestion please contact me at sf.net, thanks!
#
-
-
Modified: trunk/utils/ocr.py
===================================================================
--- trunk/utils/ocr.py 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/utils/ocr.py 2011-04-28 07:41:54 UTC (rev 53)
@@ -2,7 +2,7 @@
##
# @file utils/ocr.py
# @namespace utils::ocr
-# @authors drtrigon
+# @authors laserb, drtrigon
# @version 1.1
# @brief Character recogition (OCR) functions and classes.
#
Modified: trunk/utils/requirements.py
===================================================================
--- trunk/utils/requirements.py 2011-04-27 21:22:33 UTC (rev 52)
+++ trunk/utils/requirements.py 2011-04-28 07:41:54 UTC (rev 53)
@@ -7,6 +7,8 @@
#
# $Id$
#
+# @todo Check if further dependencies/packages are needed...?
+#
# @section Description
#
# module that allows online inspection of environment to test presence of
@@ -172,8 +174,6 @@
#
# @since (added for PyCodeOCR)
#
-# @todo Check if further dependencies/packages are needed...?
-#
def check_pygtk():
# checks for the presence of pygtk, which is more important than the rest.
try:
@@ -192,8 +192,6 @@
#
# @since (added for PyCodeOCR)
#
-# @todo Check if further dependencies/packages are needed...?
-#
def check_sane():
try:
require_python_module('sane')
@@ -203,6 +201,27 @@
if not r:
raise
+## Checks if external programs (tesseract and convert) are installed.
+#
+# @since (added for PyCodeOCR)
+#
+def check_binaries():
+ try:
+ require_executable('tesseract')
+ except MissingRequirement:
+ r = core.bundles.installbundle.install({'linux-fedora': ['tesseract']})
+ # other deps?
+ if not r:
+ raise
+
+ try:
+ require_executable('convert')
+ except MissingRequirement:
+ r = core.bundles.installbundle.install({'linux-fedora': ['imagemagick']})
+ # other deps?
+ if not r:
+ raise
+
## Checks if optional libraries are installed.
#
# @since (added for PyCodeOCR)
@@ -235,6 +254,8 @@
check_pygtk()
print " * NEEDED 'sane' (scanner)"
check_sane()
+ print " * NEEDED 'tesseract' and 'convert' (binaries)"
+ check_binaries()
# optional
print " * OPTIONAL 'gocr', 'dmtxread'"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|