summaryrefslogtreecommitdiffstats
path: root/ocrloader.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-10-28 07:42:39 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-10-28 07:42:39 (GMT)
commit96c2c629372dc37575a5581711f194c1542d79a1 (patch)
treee31b7b9a06632eee5988f6a7e9472d6a6a7bf1d4 /ocrloader.py
parent3ef0ef1b2dcb04fe1476d0491005f728e1d81f74 (diff)
downloadpfwbged.ocrloader-96c2c629372dc37575a5581711f194c1542d79a1.zip
pfwbged.ocrloader-96c2c629372dc37575a5581711f194c1542d79a1.tar.gz
pfwbged.ocrloader-96c2c629372dc37575a5581711f194c1542d79a1.tar.bz2
enable ocr by default for PDF files
Diffstat (limited to 'ocrloader.py')
-rwxr-xr-xocrloader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ocrloader.py b/ocrloader.py
index 551fcd7..b65281c 100755
--- a/ocrloader.py
+++ b/ocrloader.py
@@ -127,7 +127,7 @@ while True:
continue
payload = file(filepath).read()
logging.debug(' uploading file %s', filepath)
- enable_ocr = (filename.startswith('ocr-') and filename.endswith('.pdf'))
+ enable_ocr = (not filename.startswith('no-ocr-') and filename.endswith('.pdf'))
if not process(dict(cfg.items(section)), filename, payload, enable_ocr):
logging.error(' error processing %s', filepath)
else: