enable ocr by default for PDF files
This commit is contained in:
parent
3ef0ef1b2d
commit
96c2c62937
|
@ -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:
|
||||
|
|
Reference in New Issue