mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
lazy loading for parsers
This commit is contained in:
0
src/paperless_tika/__init__.py
Normal file
0
src/paperless_tika/__init__.py
Normal file
@@ -1,9 +1,13 @@
|
||||
from .parsers import TikaDocumentParser
|
||||
|
||||
def get_parser(*args, **kwargs):
|
||||
from .parsers import TikaDocumentParser
|
||||
|
||||
return TikaDocumentParser(*args, **kwargs)
|
||||
|
||||
|
||||
def tika_consumer_declaration(sender, **kwargs):
|
||||
return {
|
||||
"parser": TikaDocumentParser,
|
||||
"parser": get_parser,
|
||||
"weight": 10,
|
||||
"mime_types": {
|
||||
"application/msword": ".doc",
|
||||
|
Reference in New Issue
Block a user