mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-29 10:14:06 +02:00
Enable mobi write support.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from calibre.ebooks.oeb.base import XPath
|
||||
from ebook_converter.ebooks.oeb.base import XPath
|
||||
|
||||
|
||||
class CSSCleanup(object):
|
||||
|
||||
@@ -10,11 +10,11 @@ import re
|
||||
from struct import pack
|
||||
from io import BytesIO
|
||||
|
||||
from calibre.constants import iswindows, isosx
|
||||
from calibre.ebooks.mobi.utils import (utf8_text, to_base)
|
||||
from calibre.utils.localization import lang_as_iso639_1
|
||||
from calibre.ebooks.metadata import authors_to_sort_string
|
||||
from polyglot.builtins import iteritems, unicode_type
|
||||
from ebook_converter.constants import iswindows, isosx
|
||||
from ebook_converter.ebooks.mobi.utils import (utf8_text, to_base)
|
||||
from ebook_converter.utils.localization import lang_as_iso639_1
|
||||
from ebook_converter.ebooks.metadata import authors_to_sort_string
|
||||
from ebook_converter.polyglot.builtins import iteritems, unicode_type
|
||||
|
||||
EXTH_CODES = {
|
||||
'creator': 100,
|
||||
@@ -99,7 +99,7 @@ def build_exth(metadata, prefer_author_sort=False, is_periodical=False,
|
||||
|
||||
# Write UUID as ASIN
|
||||
uuid = None
|
||||
from calibre.ebooks.oeb.base import OPF
|
||||
from ebook_converter.ebooks.oeb.base import OPF
|
||||
for x in metadata['identifier']:
|
||||
if (x.get(OPF('scheme'), None).lower() == 'uuid' or
|
||||
unicode_type(x).startswith('urn:uuid:')):
|
||||
|
||||
Reference in New Issue
Block a user