Sample Config and Bug Fix

Update sample config to reflect new setting variable.
Change consumer to handle density setting as str instead of int.
This commit is contained in:
Brian Martin
2016-05-13 23:23:58 -04:00
parent 52c5aafb3f
commit b6ae129ad1
2 changed files with 13 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ class Consumer(object):
UNPAPER = settings.UNPAPER_BINARY
CONSUME = settings.CONSUMPTION_DIR
THREADS = int(settings.OCR_THREADS) if settings.OCR_THREADS else None
DENSITY = int(settings.CONVERT_DENSITY) if settings.CONVERT_DENSITY else 300
DENSITY = settings.CONVERT_DENSITY if settings.CONVERT_DENSITY else 300
DEFAULT_OCR_LANGUAGE = settings.OCR_LANGUAGE
@@ -159,7 +159,7 @@ class Consumer(object):
pnm = os.path.join(tempdir, "convert-%04d.pnm")
run_convert(
self.CONVERT,
"-density", self.DENSITY,
"-density", str(self.DENSITY),
"-depth", "8",
"-type", "grayscale",
doc, pnm,