mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 22:36:04 +01:00
...
This commit is contained in:
parent
e036afe6d0
commit
e02c57c71b
1 changed files with 4 additions and 3 deletions
|
|
@ -5,11 +5,10 @@
|
|||
|
||||
import os, glob, functools, re
|
||||
from calibre import guess_type
|
||||
from calibre.customize import FileTypePlugin, MetadataReaderPlugin, \
|
||||
MetadataWriterPlugin, PreferencesPlugin, InterfaceActionBase, StoreBase
|
||||
from calibre.customize import (FileTypePlugin, MetadataReaderPlugin,
|
||||
MetadataWriterPlugin, PreferencesPlugin, InterfaceActionBase, StoreBase)
|
||||
from calibre.constants import numeric_version
|
||||
from calibre.ebooks.metadata.archive import ArchiveExtract, get_cbz_metadata
|
||||
from calibre.ebooks.metadata.opf2 import metadata_to_opf
|
||||
from calibre.ebooks.html.to_zip import HTML2ZIP
|
||||
|
||||
# To archive plugins {{{
|
||||
|
|
@ -86,6 +85,8 @@ def _get_image_references(self, txt, base_dir):
|
|||
return list(set(images))
|
||||
|
||||
def run(self, path_to_ebook):
|
||||
from calibre.ebooks.metadata.opf2 import metadata_to_opf
|
||||
|
||||
with open(path_to_ebook, 'rb') as ebf:
|
||||
txt = ebf.read()
|
||||
base_dir = os.path.dirname(path_to_ebook)
|
||||
|
|
|
|||
Loading…
Reference in a new issue