mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
dd6bf9a21c
commit
8ca77820b6
@ -16,7 +16,7 @@ from lxml import etree
|
|||||||
from calibre.ebooks import escape_xpath_attr
|
from calibre.ebooks import escape_xpath_attr
|
||||||
from calibre.constants import __appname__, __version__, filesystem_encoding
|
from calibre.constants import __appname__, __version__, filesystem_encoding
|
||||||
from calibre.ebooks.metadata.toc import TOC
|
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 import string_to_authors, MetaInformation, check_isbn
|
||||||
from calibre.ebooks.metadata.book.base import Metadata
|
from calibre.ebooks.metadata.book.base import Metadata
|
||||||
from calibre.utils.date import parse_date, isoformat
|
from calibre.utils.date import parse_date, isoformat
|
||||||
@ -38,11 +38,6 @@ class PrettyPrint(object):
|
|||||||
pretty_print_opf = False
|
pretty_print_opf = False
|
||||||
pretty_print = PrettyPrint()
|
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): # {{{
|
class Resource(object): # {{{
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
@ -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))
|
i.set('media-type', media_type or guess_type(href_template))
|
||||||
manifest.append(i)
|
manifest.append(i)
|
||||||
return 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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user