From e6ea2d1e596cb70d21e7131d6db21eb0090a8db6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 23 Jun 2009 08:33:36 -0700 Subject: [PATCH] Justify MOBI output by default. Fix bug that was causing automatic generation of TOC from links to fail --- src/calibre/ebooks/mobi/output.py | 4 ---- src/calibre/ebooks/oeb/transforms/structure.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/calibre/ebooks/mobi/output.py b/src/calibre/ebooks/mobi/output.py index 625bd7ff0a..301e0a5a67 100644 --- a/src/calibre/ebooks/mobi/output.py +++ b/src/calibre/ebooks/mobi/output.py @@ -39,10 +39,6 @@ class MOBIOutput(OutputFormatPlugin): ]) - recommendations = set([ - ('dont_justify', True, OptionRecommendation.HIGH), - ]) - def convert(self, oeb, output_path, input_plugin, opts, log): self.log, self.opts, self.oeb = log, opts, oeb from calibre.ebooks.mobi.writer import PALM_MAX_IMAGE_SIZE, \ diff --git a/src/calibre/ebooks/oeb/transforms/structure.py b/src/calibre/ebooks/oeb/transforms/structure.py index 4e653c212f..468ba61ff0 100644 --- a/src/calibre/ebooks/oeb/transforms/structure.py +++ b/src/calibre/ebooks/oeb/transforms/structure.py @@ -36,8 +36,8 @@ class DetectStructure(object): if self.oeb.toc.count() < 1: if not opts.no_chapters_in_toc and self.detected_chapters: self.create_toc_from_chapters() - if self.oeb.toc.count() < opts.toc_threshold: - self.create_toc_from_links() + if self.oeb.toc.count() < opts.toc_threshold: + self.create_toc_from_links() if self.oeb.toc.count() < 2 and orig_toc.count() > 2: self.oeb.toc = orig_toc else: