mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-03-24 18:37:56 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
bb605226e7
@ -55,7 +55,7 @@ def implementation(
|
||||
for sf in sort_fields:
|
||||
if sf not in afields:
|
||||
return f'Unknown sort field: {sf}'
|
||||
sort_spec = [(sf, ascending) for sf in sort_fields]
|
||||
sort_spec = [((sf if not sf.startswith('*') else '#'+sf[1:]), ascending) for sf in sort_fields]
|
||||
if not set(fields).issubset(afields):
|
||||
return 'Unknown fields: {}'.format(', '.join(set(fields) - afields))
|
||||
if search_text:
|
||||
@ -284,7 +284,11 @@ List the books available in the calibre database.
|
||||
'--sort-by',
|
||||
default=None,
|
||||
help=_(
|
||||
'The field by which to sort the results. You can specify multiple fields by separating them with commas.\nAvailable fields: {0}\nDefault: {1}'
|
||||
'The field by which to sort the results. You can specify multiple fields by'
|
||||
' separating them with commas.\nAvailable fields: {0}\nDefault: {1}.'
|
||||
' In addition to the builtin fields above, custom fields are'
|
||||
' also available as *field_name, for example, for a custom field'
|
||||
' #rating, use the name: *rating'
|
||||
).format(', '.join(sorted(FIELDS)), 'id')
|
||||
)
|
||||
parser.add_option(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user