diff --git a/src/calibre/ebooks/conversion/plugins/mobi_output.py b/src/calibre/ebooks/conversion/plugins/mobi_output.py index e210801316..bbecc5c938 100644 --- a/src/calibre/ebooks/conversion/plugins/mobi_output.py +++ b/src/calibre/ebooks/conversion/plugins/mobi_output.py @@ -42,6 +42,7 @@ class MOBIOutput(OutputFormatPlugin): author = 'Kovid Goyal' file_type = 'mobi' commit_name = 'mobi_output' + ui_data = {'file_types': ['old', 'both', 'new']} options = set([ OptionRecommendation(name='prefer_author_sort', @@ -96,8 +97,7 @@ class MOBIOutput(OutputFormatPlugin): 'formats. This option tells calibre not to do this. ' 'Useful if your document contains lots of GIF/PNG images that ' 'become very large when converted to JPEG.')), - OptionRecommendation(name='mobi_file_type', choices=['old', 'both', - 'new'], recommended_value='old', + OptionRecommendation(name='mobi_file_type', choices=ui_data['file_types'], recommended_value='old', help=_('By default calibre generates MOBI files that contain the ' 'old MOBI 6 format. This format is compatible with all ' 'devices. However, by changing this setting, you can tell ' diff --git a/src/pyj/book_list/conversion_widgets.pyj b/src/pyj/book_list/conversion_widgets.pyj index 1bdd3fc50a..ffa4601956 100644 --- a/src/pyj/book_list/conversion_widgets.pyj +++ b/src/pyj/book_list/conversion_widgets.pyj @@ -587,6 +587,23 @@ def lrf_output(container): g.appendChild(lineedit('mono_family', _('&Monospace font family:'))) # }}} +# MOBI Output {{{ +@ep +def mobi_output(container): + g = E.div(class_='simple-group') + container.appendChild(g) + g.appendChild(checkbox('no_inline_toc', _('Do not add &Table of Contents to book'))) + g.appendChild(lineedit('toc_title', indent + _('&Title for Table of Contents:'))) + g.appendChild(checkbox('mobi_toc_at_start', _('Put generated Table of Contents at &start of book instead of end'))) + g.appendChild(checkbox('mobi_ignore_margins', _('Ignore &margins'))) + g.appendChild(checkbox('prefer_author_sort', _('Use author &sort for author'))) + g.appendChild(checkbox('mobi_keep_original_images', _('Do not convert all images to &JPEG (may result in images not working in older viewers)'))) + g.appendChild(checkbox('dont_compress', _('Disable &compression of the file contents'))) + g.appendChild(choices('mobi_file_type', _('MOBI fi&le type:'), ui_data.file_types)) + g.appendChild(lineedit('personal_doc', _('Personal Doc tag:'))) + g.appendChild(checkbox('share_not_sync', _('Enable &sharing of book content via Facebook, etc. WARNING: Disables last read syncing'))) +# }}} + def restore_defaults(): for setting in registry: set(setting, get_option_default_value(setting))