diff --git a/src/calibre/ebooks/pdf/input.py b/src/calibre/ebooks/pdf/input.py index edbc2d6b30..6733d3aadc 100644 --- a/src/calibre/ebooks/pdf/input.py +++ b/src/calibre/ebooks/pdf/input.py @@ -10,7 +10,6 @@ import os from calibre.customize.conversion import InputFormatPlugin from calibre.ebooks.pdf.pdftohtml import pdftohtml from calibre.ebooks.metadata.opf import OPFCreator -from calibre.customize.builtins import PDFMetadataReader class PDFInput(InputFormatPlugin): @@ -26,7 +25,8 @@ class PDFInput(InputFormatPlugin): with open('index.html', 'wb') as index: index.write(html) - mi = PDFMetadataReader(None).get_metadata(stream, 'pdf') + from calibre.ebooks.metadata.meta import get_metadata + mi = get_metadata(stream, 'pdf') opf = OPFCreator(os.getcwd(), mi) opf.create_manifest([('index.html', None)]) opf.create_spine(['index.html']) diff --git a/src/calibre/ebooks/txt/input.py b/src/calibre/ebooks/txt/input.py index e161f6b9bd..aafc36989e 100644 --- a/src/calibre/ebooks/txt/input.py +++ b/src/calibre/ebooks/txt/input.py @@ -10,7 +10,6 @@ import os from calibre.customize.conversion import InputFormatPlugin from calibre.ebooks.markdown import markdown from calibre.ebooks.metadata.opf import OPFCreator -from calibre.customize.builtins import TXTMetadataReader class TXTInput(InputFormatPlugin): @@ -33,7 +32,8 @@ class TXTInput(InputFormatPlugin): with open('index.html', 'wb') as index: index.write(html.encode('utf-8')) - mi = TXTMetadataReader(None).get_metadata(stream, 'txt') + from calibre.ebooks.metadata.meta import get_metadata + mi = get_metadata(stream, 'txt') opf = OPFCreator(os.getcwd(), mi) opf.create_manifest([('index.html', None)]) opf.create_spine(['index.html'])