paperless-ngx/src/paperless_tesseract/signals.py

20 lines
504 B
Python
Raw Normal View History

2021-02-04 13:17:24 +01:00
def get_parser(*args, **kwargs):
from .parsers import RasterisedDocumentParser
return RasterisedDocumentParser(*args, **kwargs)
def tesseract_consumer_declaration(sender, **kwargs):
return {
2021-02-04 13:17:24 +01:00
"parser": get_parser,
"weight": 0,
"mime_types": {
"application/pdf": ".pdf",
"image/jpeg": ".jpg",
"image/png": ".png",
"image/tiff": ".tif",
"image/gif": ".gif",
"image/bmp": ".bmp",
2022-02-27 15:26:41 +01:00
},
}