mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Comic Input: Add option to not add links to individual pages to the Table fo Contents when converting CBC files
This commit is contained in:
parent
4cefe30cd6
commit
14c64a2e1c
@ -304,6 +304,10 @@ class ComicInput(InputFormatPlugin):
|
|||||||
help=_('Specify the image size as widthxheight pixels. Normally,'
|
help=_('Specify the image size as widthxheight pixels. Normally,'
|
||||||
' an image size is automatically calculated from the output '
|
' an image size is automatically calculated from the output '
|
||||||
'profile, this option overrides it.')),
|
'profile, this option overrides it.')),
|
||||||
|
OptionRecommendation(name='dont_add_comic_pages_to_toc', recommended_value=False,
|
||||||
|
help=_('When converting a CBC do not add links to each page to'
|
||||||
|
' the TOC. Note this only applies if the TOC has more than one'
|
||||||
|
' section')),
|
||||||
])
|
])
|
||||||
|
|
||||||
recommendations = set([
|
recommendations = set([
|
||||||
@ -449,6 +453,7 @@ class ComicInput(InputFormatPlugin):
|
|||||||
wrappers = comic[2]
|
wrappers = comic[2]
|
||||||
stoc = toc.add_item(href(wrappers[0]),
|
stoc = toc.add_item(href(wrappers[0]),
|
||||||
None, comic[0], play_order=po)
|
None, comic[0], play_order=po)
|
||||||
|
if not opts.dont_add_comic_pages_to_toc:
|
||||||
for i, x in enumerate(wrappers):
|
for i, x in enumerate(wrappers):
|
||||||
stoc.add_item(href(x), None,
|
stoc.add_item(href(x), None,
|
||||||
_('Page')+' %d'%(i+1), play_order=po)
|
_('Page')+' %d'%(i+1), play_order=po)
|
||||||
|
@ -22,7 +22,8 @@ class PluginWidget(Widget, Ui_Form):
|
|||||||
['colors', 'dont_normalize', 'keep_aspect_ratio', 'right2left',
|
['colors', 'dont_normalize', 'keep_aspect_ratio', 'right2left',
|
||||||
'despeckle', 'no_sort', 'no_process', 'landscape',
|
'despeckle', 'no_sort', 'no_process', 'landscape',
|
||||||
'dont_sharpen', 'disable_trim', 'wide', 'output_format',
|
'dont_sharpen', 'disable_trim', 'wide', 'output_format',
|
||||||
'dont_grayscale', 'comic_image_size']
|
'dont_grayscale', 'comic_image_size',
|
||||||
|
'dont_add_comic_pages_to_toc']
|
||||||
)
|
)
|
||||||
self.db, self.book_id = db, book_id
|
self.db, self.book_id = db, book_id
|
||||||
for x in get_option('output_format').option.choices:
|
for x in get_option('output_format').option.choices:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Number of Colors:</string>
|
<string>&Number of Colors:</string>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QSpinBox" name="opt_colors">
|
<widget class="QSpinBox" name="opt_colors">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
@ -37,70 +37,70 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QCheckBox" name="opt_dont_normalize">
|
<widget class="QCheckBox" name="opt_dont_normalize">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable &normalize</string>
|
<string>Disable &normalize</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QCheckBox" name="opt_keep_aspect_ratio">
|
<widget class="QCheckBox" name="opt_keep_aspect_ratio">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Keep &aspect ratio</string>
|
<string>Keep &aspect ratio</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QCheckBox" name="opt_dont_sharpen">
|
<widget class="QCheckBox" name="opt_dont_sharpen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable &Sharpening</string>
|
<string>Disable &Sharpening</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QCheckBox" name="opt_disable_trim">
|
<widget class="QCheckBox" name="opt_disable_trim">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable &Trimming</string>
|
<string>Disable &Trimming</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QCheckBox" name="opt_wide">
|
<widget class="QCheckBox" name="opt_wide">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Wide</string>
|
<string>&Wide</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QCheckBox" name="opt_landscape">
|
<widget class="QCheckBox" name="opt_landscape">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Landscape</string>
|
<string>&Landscape</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="11" column="0">
|
||||||
<widget class="QCheckBox" name="opt_right2left">
|
<widget class="QCheckBox" name="opt_right2left">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Right to left</string>
|
<string>&Right to left</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0">
|
<item row="12" column="0">
|
||||||
<widget class="QCheckBox" name="opt_no_sort">
|
<widget class="QCheckBox" name="opt_no_sort">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Don't so&rt</string>
|
<string>Don't so&rt</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="13" column="0">
|
||||||
<widget class="QCheckBox" name="opt_despeckle">
|
<widget class="QCheckBox" name="opt_despeckle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>De&speckle</string>
|
<string>De&speckle</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="0">
|
<item row="15" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -120,7 +120,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0">
|
<item row="14" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Output format:</string>
|
<string>&Output format:</string>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QComboBox" name="opt_output_format"/>
|
<widget class="QComboBox" name="opt_output_format"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
@ -140,7 +140,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Override image &size:</string>
|
<string>Override image &size:</string>
|
||||||
@ -150,9 +150,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="opt_comic_image_size"/>
|
<widget class="QLineEdit" name="opt_comic_image_size"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="opt_dont_add_comic_pages_to_toc">
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't add links to &pages to the Table of Contents for CBC files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user