Stabilize generated help text despite random hash seeds by sorting

This commit is contained in:
Kovid Goyal 2014-10-01 21:22:20 +05:30
parent 1c12e83944
commit 0102ecd892
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class PDBOutput(OutputFormatPlugin):
level=OptionRecommendation.LOW,
short_switch='f', choices=list(ALL_FORMAT_WRITERS),
help=(_('Format to use inside the pdb container. Choices are:')+\
' %s' % list(ALL_FORMAT_WRITERS))),
' %s' % sorted(ALL_FORMAT_WRITERS))),
OptionRecommendation(name='pdb_output_encoding', recommended_value='cp1252',
level=OptionRecommendation.LOW,
help=_('Specify the character encoding of the output document. ' \

View File

@ -181,7 +181,7 @@ List the books available in the calibre database.
' special field "all" can be used to select all fields.'
)%', '.join(sorted(fields)))
parser.add_option('--sort-by', default=None,
help=_('The field by which to sort the results.\nAvailable fields: %s\nDefault: %%default')%','.join(FIELDS))
help=_('The field by which to sort the results.\nAvailable fields: %s\nDefault: %%default')%','.join(sorted(FIELDS)))
parser.add_option('--ascending', default=False, action='store_true',
help=_('Sort results in ascending order'))
parser.add_option('-s', '--search', default=None,
@ -804,7 +804,7 @@ def add_custom_column_option_parser():
Create a custom column. label is the machine friendly name of the column. Should
not contain spaces or colons. name is the human friendly name of the column.
datatype is one of: {0}
''').format(', '.join(CustomColumns.CUSTOM_DATA_TYPES)))
''').format(', '.join(sorted(CustomColumns.CUSTOM_DATA_TYPES))))
parser.add_option('--is-multiple', default=False, action='store_true',
help=_('This column stores tag like data (i.e. '

View File

@ -98,7 +98,7 @@ def config(defaults=None):
'Default is "%(templ)s" which will save books into a per-author '
'subdirectory with filenames containing title and author. '
'Available controls are: {%(controls)s}')%dict(
templ=DEFAULT_TEMPLATE, controls=', '.join(FORMAT_ARGS)))
templ=DEFAULT_TEMPLATE, controls=', '.join(sorted(FORMAT_ARGS))))
x('send_template', default=DEFAULT_SEND_TEMPLATE,
help=_('The template to control the filename and directory structure of files '
'sent to the device. '