This commit is contained in:
Kovid Goyal 2016-06-16 12:32:02 +05:30
parent dd6bf9a21c
commit 8ca77820b6
2 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ from lxml import etree
from calibre.ebooks import escape_xpath_attr
from calibre.constants import __appname__, __version__, filesystem_encoding
from calibre.ebooks.metadata.toc import TOC
from calibre.ebooks.metadata.utils import parse_opf
from calibre.ebooks.metadata.utils import parse_opf, pretty_print_opf as _pretty_print
from calibre.ebooks.metadata import string_to_authors, MetaInformation, check_isbn
from calibre.ebooks.metadata.book.base import Metadata
from calibre.utils.date import parse_date, isoformat
@ -38,11 +38,6 @@ class PrettyPrint(object):
pretty_print_opf = False
pretty_print = PrettyPrint()
def _pretty_print(root):
from calibre.ebooks.oeb.polish.pretty import pretty_opf, pretty_xml_tree
pretty_opf(root)
pretty_xml_tree(root)
class Resource(object): # {{{
'''

View File

@ -73,3 +73,8 @@ def create_manifest_item(root, href_template, id_template, media_type=None):
i.set('media-type', media_type or guess_type(href_template))
manifest.append(i)
return i
def pretty_print_opf(root):
from calibre.ebooks.oeb.polish.pretty import pretty_opf, pretty_xml_tree
pretty_opf(root)
pretty_xml_tree(root)