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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user