Check for textile installation
This commit is contained in:
@@ -33,6 +33,7 @@ Bitcoin: 17jaxj26vFJNqQ2hEVerbBV5fpTusfqFro
|
|||||||
| python-pymupdf | 1.14.5 | PDF support |
|
| python-pymupdf | 1.14.5 | PDF support |
|
||||||
| python-djvulibre | 0.8.4 | DjVu support |
|
| python-djvulibre | 0.8.4 | DjVu support |
|
||||||
| python-markdown | 3.0.1 | Markdown support |
|
| python-markdown | 3.0.1 | Markdown support |
|
||||||
|
| textile | 3.0.4 | TXT support |
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
When reporting issues:
|
When reporting issues:
|
||||||
|
@@ -105,10 +105,15 @@ else:
|
|||||||
print(critical_sting)
|
print(critical_sting)
|
||||||
logger.critical(critical_sting)
|
logger.critical(critical_sting)
|
||||||
|
|
||||||
# Text file parser
|
# txt - Optional
|
||||||
# TODO Check if textile is installed
|
textile_check = importlib.util.find_spec('textile')
|
||||||
from lector.parsers.txt import ParseTXT
|
if textile_check:
|
||||||
sorter['txt'] = ParseTXT
|
from lector.parsers.txt import ParseTXT
|
||||||
|
sorter['txt'] = ParseTXT
|
||||||
|
else:
|
||||||
|
error_string = 'textile is not installed. Will be unable to load TXT files.'
|
||||||
|
print(error_string)
|
||||||
|
logger.error(error_string)
|
||||||
|
|
||||||
available_parsers = [i for i in sorter]
|
available_parsers = [i for i in sorter]
|
||||||
progressbar = None # This is populated by __main__
|
progressbar = None # This is populated by __main__
|
||||||
|
Reference in New Issue
Block a user