[ocrfeeder] Make Tesseract and Cuneiform engines remove temporary images



commit c835e526856818211100fcd9c8e0838c97aa3fea
Author: Joaquim Rocha <jrocha igalia com>
Date:   Thu Sep 23 19:26:24 2010 +0200

    Make Tesseract and Cuneiform engines remove temporary images

 studio/configuration.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/studio/configuration.py b/studio/configuration.py
index b317143..45beb42 100644
--- a/studio/configuration.py
+++ b/studio/configuration.py
@@ -31,7 +31,8 @@ import zipfile
 PREDEFINED_ENGINES = {'tesseract': {'name': 'Tesseract',
                                     'image_format': 'TIF',
                                     'engine_path': 'tesseract',
-                                    'arguments': '$IMAGE $FILE; cat $FILE.txt'},
+                                    'arguments': '$IMAGE $FILE; cat '
+                                    '$FILE.txt; rm $FILE'},
                       'ocrad': {'name': 'Ocrad',
                                 'image_format': 'PPM',
                                 'engine_path': 'ocrad',
@@ -44,7 +45,8 @@ PREDEFINED_ENGINES = {'tesseract': {'name': 'Tesseract',
                                'image_format': 'BMP',
                                'engine_path': 'cuneiform',
                                'arguments': '-f text -o $FILE $IMAGE >'
-                               ' /dev/null 2> /dev/null; cat $FILE'},
+                               ' /dev/null 2> /dev/null && cat $FILE'
+                               ' && rm $FILE'},
                      }
 
 class ProjectSaver:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]