mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
IGN:...
This commit is contained in:
commit
296853cd43
@ -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'])
|
||||
|
@ -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'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user