mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-21 05:31:30 +02:00
Another part of logging adaptation
This commit is contained in:
@@ -430,7 +430,7 @@ class Convert(object):
|
||||
self.current_link = self.current_lang = None
|
||||
|
||||
for item in self.oeb.spine:
|
||||
self.log.debug('Processing', item.href)
|
||||
self.log.debug('Processing %s', item.href)
|
||||
self.process_item(item)
|
||||
if self.add_toc:
|
||||
self.links_manager.process_toc_links(self.oeb)
|
||||
|
||||
@@ -49,7 +49,8 @@ class ImagesManager(object):
|
||||
try:
|
||||
fmt, width, height = identify(item.data)
|
||||
except Exception:
|
||||
self.log.warning('Replacing corrupted image with blank: %s' % href)
|
||||
self.log.warning('Replacing corrupted image with blank: %s',
|
||||
href)
|
||||
item.data = I('blank.png', data=True, allow_user_override=False)
|
||||
fmt, width, height = identify(item.data)
|
||||
image_fname = 'media/' + self.create_filename(href, fmt)
|
||||
|
||||
@@ -6,10 +6,6 @@ import uuid
|
||||
from ebook_converter.utils.filenames import ascii_text
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
|
||||
def start_text(tag, prefix_len=0, top_level=True):
|
||||
ans = tag.text or ''
|
||||
limit = 50 - prefix_len
|
||||
@@ -123,7 +119,8 @@ class LinksManager(object):
|
||||
bmark = self.anchor_map[(href, self.top_anchor)]
|
||||
return make_link(parent, anchor=bmark, tooltip=tooltip)
|
||||
else:
|
||||
self.log.warn('Ignoring internal hyperlink with href (%s) pointing to unknown destination' % url)
|
||||
self.log.warning('Ignoring internal hyperlink with href (%s) '
|
||||
'pointing to unknown destination', url)
|
||||
if purl.scheme in {'http', 'https', 'ftp'}:
|
||||
if url not in self.external_links:
|
||||
self.external_links[url] = self.document_relationships.add_relationship(url, self.namespace.names['LINKS'], target_mode='External')
|
||||
|
||||
@@ -10,9 +10,6 @@ from ebook_converter.utils.localization import lang_as_iso639_1
|
||||
from ebook_converter.tinycss.css21 import CSS21Parser
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
css_parser = CSS21Parser()
|
||||
|
||||
border_edges = ('left', 'top', 'right', 'bottom')
|
||||
@@ -738,8 +735,9 @@ class StylesManager(object):
|
||||
text_style.seq = i
|
||||
self.descendant_text_styles = sorted(descendant_style_map, key=attrgetter('seq'))
|
||||
|
||||
self.log.debug('%d Text Styles %d Combined styles' % tuple(map(len, (
|
||||
self.descendant_text_styles, self.combined_styles))))
|
||||
self.log.debug('%d Text Styles %d Combined styles',
|
||||
len(self.descendant_text_styles),
|
||||
len(self.combined_styles))
|
||||
|
||||
self.primary_heading_style = None
|
||||
if heading_styles:
|
||||
|
||||
Reference in New Issue
Block a user