1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-03 02:53:32 +02:00

Changing logging module location.

This commit is contained in:
2021-06-28 22:02:41 +02:00
parent b574357c2c
commit 3f57198f91
10 changed files with 41 additions and 30 deletions

View File

@@ -260,8 +260,9 @@ if __name__ == '__main__':
opts.output_profile = HanlinV3Output(None)
html_preprocessor = HTMLPreProcessor(None, None, opts)
from ebook_converter.utils.logging import default_log
oeb = OEBBook(default_log, html_preprocessor)
from ebook_converter import logging
oeb = OEBBook(logging.default_log, html_preprocessor)
reader = OEBReader
reader()(oeb, '/tmp/bbb/processed/')
SNBOutput(None).convert(oeb, '/tmp/test.snb', None, None, default_log)
SNBOutput(None).convert(oeb, '/tmp/test.snb', None, None,
logging.default_log)

View File

@@ -1,14 +1,17 @@
import re
from math import ceil
from ebook_converter.ebooks.conversion.preprocess import DocAnalysis, Dehyphenator
from ebook_converter.utils.logging import default_log
from ebook_converter import logging
from ebook_converter.utils.wordcount import get_wordcount_obj
LOG = logging.default_log
class HeuristicProcessor(object):
def __init__(self, extra_opts=None, log=None):
self.log = default_log if log is None else log
self.log = LOG if log is None else log
self.html_preprocess_sections = 0
self.found_indents = 0
self.extra_opts = extra_opts