Support for opening txt files

This commit is contained in:
Dmitrii Petukhov
2019-07-06 00:09:50 +01:00
parent 916bdb5b14
commit 24e45ac2b7
2 changed files with 61 additions and 1 deletions

View File

@@ -105,6 +105,11 @@ else:
print(critical_sting)
logger.critical(critical_sting)
# Text file parser
# TODO Check if textile is installed
from lector.parsers.txt import ParseTXT
sorter['txt'] = ParseTXT
available_parsers = [i for i in sorter]
progressbar = None # This is populated by __main__
_progress_emitter = None # This is to be made into a global variable
@@ -184,7 +189,7 @@ class BookSorter:
return book_data
def read_book(self, filename):
# filename is expected as a string containg the
# filename is expected as a string containing the
# full path of the ebook file
with open(filename, 'rb') as current_book: