enable ocr by default for PDF files

This commit is contained in:
Frédéric Péters 2014-10-28 08:42:39 +01:00
parent 3ef0ef1b2d
commit 96c2c62937
1 changed files with 1 additions and 1 deletions

View File

@ -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: