mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
def get_parser(*args, **kwargs):
|
|
from paperless_tika.parsers import TikaDocumentParser
|
|
|
|
return TikaDocumentParser(*args, **kwargs)
|
|
|
|
|
|
def tika_consumer_declaration(sender, **kwargs):
|
|
return {
|
|
"parser": get_parser,
|
|
"weight": 10,
|
|
"mime_types": {
|
|
"application/msword": ".doc",
|
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx",
|
|
"application/vnd.ms-excel": ".xls",
|
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx",
|
|
"application/vnd.ms-powerpoint": ".ppt",
|
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx",
|
|
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": ".ppsx",
|
|
"application/vnd.oasis.opendocument.presentation": ".odp",
|
|
"application/vnd.oasis.opendocument.spreadsheet": ".ods",
|
|
"application/vnd.oasis.opendocument.text": ".odt",
|
|
"application/vnd.oasis.opendocument.graphics": ".odg",
|
|
"text/rtf": ".rtf",
|
|
},
|
|
}
|