X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/05b19dad8ca44136e064abcc6beff5dac4489c60..82f5d8f05bad9e5223426c210770602ca2a97c9b:/librarian/mobi.py?ds=sidebyside diff --git a/librarian/mobi.py b/librarian/mobi.py index 1e7569b..6de72b3 100755 --- a/librarian/mobi.py +++ b/librarian/mobi.py @@ -9,7 +9,7 @@ import subprocess from tempfile import NamedTemporaryFile from librarian import OutputFile -from librarian.cover import WLCover +from librarian.cover import ImageCover as WLCover from librarian import get_resource @@ -30,8 +30,11 @@ def transform(wldoc, verbose=False, # provide a cover by default if not cover: cover = WLCover - cover_file = NamedTemporaryFile(suffix='.png', delete=False) c = cover(book_info) + import Image + c.im = Image.open('cover.jpg') + c.ext = lambda: 'jpg' + cover_file = NamedTemporaryFile(suffix='.' + c.ext(), delete=False) c.save(cover_file) if cover.uses_dc_cover: