X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/45ce20d1189ea2042a097bfd9ab7b4b6e96be324..7dc1b2c84ca9b53454d9eb0c296b4f005dcb780c:/librarian/mobi.py?ds=sidebyside diff --git a/librarian/mobi.py b/librarian/mobi.py index b30c1fe..c3c8f28 100644 --- a/librarian/mobi.py +++ b/librarian/mobi.py @@ -10,12 +10,10 @@ import subprocess from tempfile import NamedTemporaryFile from librarian import OutputFile -from librarian.cover import DefaultEbookCover -from librarian import get_resource def transform(wldoc, verbose=False, sample=None, cover=None, - use_kindlegen=False, flags=None): + use_kindlegen=False, flags=None, hyphenate=True, ilustr_path=''): """ produces a MOBI file wldoc: a WLDocument @@ -26,14 +24,10 @@ def transform(wldoc, verbose=False, sample=None, cover=None, document = deepcopy(wldoc) del wldoc - book_info = document.book_info - - if not flags: - flags = [] - flags = list(flags) epub = document.as_epub(verbose=verbose, sample=sample, - html_toc=True, cover=True, flags=flags) + html_toc=True, cover=cover or True, flags=flags, + hyphenate=hyphenate, ilustr_path=ilustr_path, output_type='mobi') if verbose: kwargs = {} else: