mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-02 10:36:17 +01:00
Fixed regression referencing output_device
This commit is contained in:
parent
9b6c88a2ab
commit
d972dd27b0
2 changed files with 6 additions and 7 deletions
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
import os, shutil
|
||||
from collections import namedtuple
|
||||
from copy import deepcopy
|
||||
|
||||
from calibre import strftime
|
||||
from calibre.customize import CatalogPlugin
|
||||
|
|
@ -329,9 +328,6 @@ def run(self, path_to_output, opts, db, notification=DummyReporter()):
|
|||
# Launch the Catalog builder
|
||||
catalog = CatalogBuilder(db, opts, self, report_progress=notification)
|
||||
|
||||
# Save the output profile for the plumber
|
||||
output_profile = deepcopy(catalog.output_profile)
|
||||
|
||||
if opts.verbose:
|
||||
log.info(" Begin catalog source generation")
|
||||
|
||||
|
|
@ -350,8 +346,6 @@ def run(self, path_to_output, opts, db, notification=DummyReporter()):
|
|||
recommendations.append(('remove_fake_margins', False,
|
||||
OptionRecommendation.HIGH))
|
||||
recommendations.append(('comments', '', OptionRecommendation.HIGH))
|
||||
recommendations.append(('output_profile', output_profile,
|
||||
OptionRecommendation.HIGH))
|
||||
|
||||
"""
|
||||
>>> Use to debug generated catalog code before pipeline conversion <<<
|
||||
|
|
@ -366,7 +360,9 @@ def run(self, path_to_output, opts, db, notification=DummyReporter()):
|
|||
recommendations.append(('debug_pipeline', dp,
|
||||
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,
|
||||
OptionRecommendation.HIGH))
|
||||
recommendations.append(('book_producer',opts.output_profile,
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ def __init__(self, db, _opts, plugin,
|
|||
self.cache_dir = os.path.join(config_dir, 'caches', 'catalog')
|
||||
self.catalog_path = PersistentTemporaryDirectory("_epub_mobi_catalog", prefix='')
|
||||
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
|
||||
_opts.output_profile and
|
||||
_opts.output_profile.startswith("kindle")) else False
|
||||
|
|
|
|||
Loading…
Reference in a new issue