mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Only build custom masthead for Kindle output
This commit is contained in:
parent
30add33dfe
commit
3f3bd00c3a
@ -797,11 +797,13 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
os.path.join(self.catalogPath, file[0]))
|
os.path.join(self.catalogPath, file[0]))
|
||||||
|
|
||||||
# Create the custom masthead image overwriting default
|
# Create the custom masthead image overwriting default
|
||||||
|
# If failure, default mastheadImage.gif should still be in place
|
||||||
if True: #try:
|
if self.generateForKindle:
|
||||||
self.generate_masthead_image(os.path.join(self.catalogPath, 'images/mastheadImage.gif'))
|
try:
|
||||||
# except:
|
self.generate_masthead_image(os.path.join(self.catalogPath,
|
||||||
# pass
|
'images/mastheadImage.gif'))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def fetchBooksByTitle(self):
|
def fetchBooksByTitle(self):
|
||||||
self.updateProgressFullStep("Fetching database")
|
self.updateProgressFullStep("Fetching database")
|
||||||
@ -2521,7 +2523,8 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
font_path = default_font
|
font_path = default_font
|
||||||
else:
|
else:
|
||||||
if self.opts.verbose:
|
if self.opts.verbose:
|
||||||
self.opts.log(" Rendering catalog masthead with user-specifed font '%s'" % font_path)
|
self.opts.log(" Rendering catalog masthead with user-specifed font:")
|
||||||
|
self.opts.log(" '%s'" % font_path)
|
||||||
|
|
||||||
MI_WIDTH = 600
|
MI_WIDTH = 600
|
||||||
MI_HEIGHT = 60
|
MI_HEIGHT = 60
|
||||||
@ -2686,7 +2689,7 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
opts.descriptionClip = 380 if op.endswith('dx') or 'kindle' not in op else 90
|
opts.descriptionClip = 380 if op.endswith('dx') or 'kindle' not in op else 90
|
||||||
opts.basename = "Catalog"
|
opts.basename = "Catalog"
|
||||||
opts.plugin_path = self.plugin_path
|
opts.plugin_path = self.plugin_path
|
||||||
opts.cli_environment = getattr(opts,'sync',True)
|
opts.cli_environment = not hasattr(opts,'sync')
|
||||||
|
|
||||||
if opts.verbose:
|
if opts.verbose:
|
||||||
opts_dict = vars(opts)
|
opts_dict = vars(opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user