1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-21 05:31:30 +02:00

Added first portion of logging adaptation.

Things may be broken at this point - there are still several modules to
be adapted.
This commit is contained in:
2021-06-22 22:04:43 +02:00
parent 6f898ab23e
commit 546cc26652
36 changed files with 326 additions and 316 deletions
+3 -3
View File
@@ -116,9 +116,9 @@ class Reader(FormatReader):
def extract_content(self, output_dir):
txt = ''
self.log.info(u'Decompressing text...')
self.log.info('Decompressing text...')
for i in range(1, self.header_record.num_records + 1):
self.log.debug(u'\tDecompressing text section %i' % i)
self.log.debug('\tDecompressing text section %s', i)
title = self.header_record.chapter_titles[i-1]
lines = []
title_added = False
@@ -135,7 +135,7 @@ class Reader(FormatReader):
lines.insert(0, '<h1 class="chapter">' + title + '</h1>\n')
txt += '\n'.join(lines)
self.log.info(u'Converting text to OEB...')
self.log.info('Converting text to OEB...')
html = HTML_TEMPLATE % (self.header_record.title, txt)
with open(os.path.join(output_dir, 'index.html'), 'wb') as index:
index.write(html.encode('utf-8'))