mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-15 10:45:43 +01:00
enabled preprocesing for LRF input
This commit is contained in:
parent
dc3641784d
commit
19d7b21165
1 changed files with 6 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
from lxml import etree
|
||||
|
||||
from calibre.customize.conversion import InputFormatPlugin
|
||||
from calibre.ebooks.conversion.utils import PreProcessor
|
||||
from calibre import guess_type
|
||||
|
||||
class Canvas(etree.XSLTExtension):
|
||||
|
|
@ -419,4 +420,9 @@ def convert(self, stream, options, file_ext, log,
|
|||
styles.write()
|
||||
return os.path.abspath('content.opf')
|
||||
|
||||
def preprocess_html(self, html):
|
||||
preprocessor = PreProcessor(log=getattr(self, 'log', None))
|
||||
return preprocessor(html)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue