mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fixed regression referencing output_device
This commit is contained in:
parent
9b6c88a2ab
commit
d972dd27b0
@ -9,7 +9,6 @@ __docformat__ = 'restructuredtext en'
|
|||||||
|
|
||||||
import os, shutil
|
import os, shutil
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from copy import deepcopy
|
|
||||||
|
|
||||||
from calibre import strftime
|
from calibre import strftime
|
||||||
from calibre.customize import CatalogPlugin
|
from calibre.customize import CatalogPlugin
|
||||||
@ -329,9 +328,6 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
# Launch the Catalog builder
|
# Launch the Catalog builder
|
||||||
catalog = CatalogBuilder(db, opts, self, report_progress=notification)
|
catalog = CatalogBuilder(db, opts, self, report_progress=notification)
|
||||||
|
|
||||||
# Save the output profile for the plumber
|
|
||||||
output_profile = deepcopy(catalog.output_profile)
|
|
||||||
|
|
||||||
if opts.verbose:
|
if opts.verbose:
|
||||||
log.info(" Begin catalog source generation")
|
log.info(" Begin catalog source generation")
|
||||||
|
|
||||||
@ -350,8 +346,6 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
recommendations.append(('remove_fake_margins', False,
|
recommendations.append(('remove_fake_margins', False,
|
||||||
OptionRecommendation.HIGH))
|
OptionRecommendation.HIGH))
|
||||||
recommendations.append(('comments', '', OptionRecommendation.HIGH))
|
recommendations.append(('comments', '', OptionRecommendation.HIGH))
|
||||||
recommendations.append(('output_profile', output_profile,
|
|
||||||
OptionRecommendation.HIGH))
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
>>> Use to debug generated catalog code before pipeline conversion <<<
|
>>> Use to debug generated catalog code before pipeline conversion <<<
|
||||||
@ -366,7 +360,9 @@ class EPUB_MOBI(CatalogPlugin):
|
|||||||
recommendations.append(('debug_pipeline', dp,
|
recommendations.append(('debug_pipeline', dp,
|
||||||
OptionRecommendation.HIGH))
|
OptionRecommendation.HIGH))
|
||||||
|
|
||||||
if opts.output_profile and opts.output_profile.startswith("kindle"):
|
if opts.fmt == 'mobi' and opts.output_profile and opts.output_profile.startswith("kindle"):
|
||||||
|
recommendations.append(('output_profile', opts.output_profile,
|
||||||
|
OptionRecommendation.HIGH))
|
||||||
recommendations.append(('no_inline_toc', True,
|
recommendations.append(('no_inline_toc', True,
|
||||||
OptionRecommendation.HIGH))
|
OptionRecommendation.HIGH))
|
||||||
recommendations.append(('book_producer',opts.output_profile,
|
recommendations.append(('book_producer',opts.output_profile,
|
||||||
|
@ -103,6 +103,9 @@ class CatalogBuilder(object):
|
|||||||
self.cache_dir = os.path.join(config_dir, 'caches', 'catalog')
|
self.cache_dir = os.path.join(config_dir, 'caches', 'catalog')
|
||||||
self.catalog_path = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='')
|
self.catalog_path = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='')
|
||||||
self.excluded_tags = self.get_excluded_tags()
|
self.excluded_tags = self.get_excluded_tags()
|
||||||
|
self.generate_for_kindle_azw3 = True if (_opts.fmt == 'azw3' and
|
||||||
|
_opts.output_profile and
|
||||||
|
_opts.output_profile.startswith("kindle")) else False
|
||||||
self.generate_for_kindle_mobi = True if (_opts.fmt == 'mobi' and
|
self.generate_for_kindle_mobi = True if (_opts.fmt == 'mobi' and
|
||||||
_opts.output_profile and
|
_opts.output_profile and
|
||||||
_opts.output_profile.startswith("kindle")) else False
|
_opts.output_profile.startswith("kindle")) else False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user