mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-11 12:05:45 +01:00
Removing is_py3 method and duplicated by urllib.
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import os, re
|
||||
import os
|
||||
import re
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from ebook_converter.customize.conversion import (OutputFormatPlugin,
|
||||
OptionRecommendation)
|
||||
from ebook_converter import CurrentDir
|
||||
from ebook_converter.polyglot.urllib import unquote
|
||||
from ebook_converter.ebooks.oeb.base import OPF_MIME, NCX_MIME, PAGE_MAP_MIME, OEB_STYLES
|
||||
from ebook_converter.ebooks.oeb.normalize_css import condense_sheet
|
||||
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
@@ -21,14 +26,10 @@ class OEBOutput(OutputFormatPlugin):
|
||||
recommendations = {('pretty_print', True, OptionRecommendation.HIGH)}
|
||||
|
||||
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
||||
from ebook_converter.polyglot.urllib import unquote
|
||||
from lxml import etree
|
||||
|
||||
self.log, self.opts = log, opts
|
||||
if not os.path.exists(output_path):
|
||||
os.makedirs(output_path)
|
||||
from ebook_converter.ebooks.oeb.base import OPF_MIME, NCX_MIME, PAGE_MAP_MIME, OEB_STYLES
|
||||
from ebook_converter.ebooks.oeb.normalize_css import condense_sheet
|
||||
with CurrentDir(output_path):
|
||||
results = oeb_book.to_opf2(page_map=True)
|
||||
for key in (OPF_MIME, NCX_MIME, PAGE_MAP_MIME):
|
||||
|
||||
Reference in New Issue
Block a user