From 649fabf23d4aae990ca5f2e5b919a47b9f70c476 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Aug 2009 16:38:36 -0600 Subject: [PATCH] EPUB Output: Add option to turn off the generation of the default cover --- src/calibre/ebooks/epub/output.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/ebooks/epub/output.py b/src/calibre/ebooks/epub/output.py index 24b14ea1b9..ef1b9db088 100644 --- a/src/calibre/ebooks/epub/output.py +++ b/src/calibre/ebooks/epub/output.py @@ -77,6 +77,10 @@ class EPUBOutput(OutputFormatPlugin): 'for Adobe Digital Editions.') ), + OptionRecommendation(name='no_default_epub_cover', recommended_value=False, + help=_('Normally, if the input file ahs no cover and you don\'t' + ' specify one, a default cover is generated with the title, ' + 'authors, etc. This option disables the generation of this cover.')), ]) @@ -188,6 +192,8 @@ class EPUBOutput(OutputFormatPlugin): ''' Create a generic cover for books that dont have a cover ''' + if self.opts.no_default_epub_cover: + return None try: from calibre.gui2 import images_rc, is_ok_to_use_qt # Needed for access to logo from PyQt4.Qt import QFile, QIODevice