mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Report when no smartenable punctuation is found
This commit is contained in:
parent
09312b65b2
commit
d99ff84f9c
@ -78,6 +78,7 @@ def replace_links(container, link_map, frag_map=lambda name, frag:frag, replace_
|
||||
|
||||
def smarten_punctuation(container, report):
|
||||
from calibre.ebooks.conversion.preprocess import smarten_punctuation
|
||||
smartened = False
|
||||
for path in container.spine_items:
|
||||
name = container.abspath_to_name(path)
|
||||
changed = False
|
||||
@ -98,6 +99,9 @@ def smarten_punctuation(container, report):
|
||||
for m in root.xpath('descendant::*[local-name()="meta" and @http-equiv]'):
|
||||
m.getparent().remove(m)
|
||||
container.dirty(name)
|
||||
smartened = True
|
||||
if not smartened:
|
||||
report(_('No punctuation that could be smartened found'))
|
||||
|
||||
def rename_files(container, file_map):
|
||||
overlap = set(file_map).intersection(set(file_map.itervalues()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user