start at enabling some heuristics options by default

This commit is contained in:
ldolse 2011-01-19 22:21:11 +08:00
parent 9fcf7f84c3
commit 06cbaca2e6
2 changed files with 6 additions and 5 deletions

View File

@ -69,6 +69,7 @@ def option_recommendation_to_cli_option(add_option, rec):
opt = rec.option
switches = ['-'+opt.short_switch] if opt.short_switch else []
switches.append('--'+opt.long_switch)
flip_switches = ['italicize_common_cases', 'markup_chapter_headings', 'unwrap_lines', 'dehyphenate', 'fix_indents']
attrs = dict(dest=opt.name, help=opt.help,
choices=opt.choices, default=rec.recommended_value)
if isinstance(rec.recommended_value, type(True)):

View File

@ -490,19 +490,19 @@ OptionRecommendation(name='enable_heuristics',
'heuristic processing to take place.')),
OptionRecommendation(name='markup_chapter_headings',
recommended_value=False, level=OptionRecommendation.LOW,
recommended_value=True, level=OptionRecommendation.LOW,
help=_('Detect unformatted chapter headings and sub headings. Change '
'them to h2 and h3 tags. This setting will not create a TOC, '
'but can be used in conjunction with structure detection to create '
'one.')),
OptionRecommendation(name='italicize_common_cases',
recommended_value=False, level=OptionRecommendation.LOW,
recommended_value=True, level=OptionRecommendation.LOW,
help=_('Look for common words and patterns that denote '
'italics and italicize them.')),
OptionRecommendation(name='fix_indents',
recommended_value=False, level=OptionRecommendation.LOW,
recommended_value=True, level=OptionRecommendation.LOW,
help=_('Turn indentation created from multiple non-breaking space entities '
'into CSS indents.')),
@ -515,7 +515,7 @@ OptionRecommendation(name='html_unwrap_factor',
'be reduced')),
OptionRecommendation(name='unwrap_lines',
recommended_value=False, level=OptionRecommendation.LOW,
recommended_value=True, level=OptionRecommendation.LOW,
help=_('Unwrap lines using punctuation and other formatting clues.')),
OptionRecommendation(name='delete_blank_paragraphs',
@ -530,7 +530,7 @@ OptionRecommendation(name='format_scene_breaks',
'horizontal rules.')),
OptionRecommendation(name='dehyphenate',
recommended_value=False, level=OptionRecommendation.LOW,
recommended_value=True, level=OptionRecommendation.LOW,
help=_('Analyze hyphenated words throughout the document. The '
'document itself is used as a dictionary to determine whether hyphens '
'should be retained or removed.')),