1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-02-21 17:25:55 +01:00

Added htmlz and pdf formats.

Added HTML reader/writer and PDF reader.
This commit is contained in:
2020-04-19 13:43:16 +02:00
parent ebeca30bda
commit d2159ed60c
17 changed files with 55 additions and 65 deletions

View File

@@ -471,7 +471,7 @@ class HTMLPreProcessor(object):
return re.search('<H2[^><]*id=BookTitle', raw) is not None
def is_pdftohtml(self, src):
return '<!-- created by calibre\'s pdftohtml -->' in src[:1000]
return '<!-- created by ebook-converter\'s pdftohtml -->' in src[:1000]
def __call__(self, html, remove_special_chars=None,
get_preprocess_html=False):
@@ -627,7 +627,7 @@ class HTMLPreProcessor(object):
html = preprocessor(html)
if is_pdftohtml:
html = html.replace('<!-- created by calibre\'s pdftohtml -->', '')
html = html.replace('<!-- created by ebook-converter\'s pdftohtml -->', '')
if getattr(self.extra_opts, 'smarten_punctuation', False):
html = smarten_punctuation(html, self.log)