mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Catalog housecleaning, progress reporting fixed, CSV cleanup
This commit is contained in:
parent
1ce23c2314
commit
28d5317c8f
@ -288,7 +288,7 @@ class CatalogPlugin(Plugin):
|
|||||||
fields = list(all_fields)
|
fields = list(all_fields)
|
||||||
|
|
||||||
fields.sort()
|
fields.sort()
|
||||||
if opts.sort_by:
|
if opts.sort_by and opts.sort_by in fields:
|
||||||
fields.insert(0,fields.pop(int(fields.index(opts.sort_by))))
|
fields.insert(0,fields.pop(int(fields.index(opts.sort_by))))
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
|
@ -51,18 +51,23 @@ class CSV_XML(CatalogPlugin):
|
|||||||
self.fmt = path_to_output.rpartition('.')[2]
|
self.fmt = path_to_output.rpartition('.')[2]
|
||||||
self.notification = notification
|
self.notification = notification
|
||||||
|
|
||||||
if False and opts.verbose:
|
if opts.verbose:
|
||||||
log("%s:run" % self.name)
|
|
||||||
log(" path_to_output: %s" % path_to_output)
|
|
||||||
log(" Output format: %s" % self.fmt)
|
|
||||||
|
|
||||||
# Display opts
|
|
||||||
opts_dict = vars(opts)
|
opts_dict = vars(opts)
|
||||||
keys = opts_dict.keys()
|
log("%s(): Generating %s" % (self.name,self.fmt))
|
||||||
keys.sort()
|
if opts_dict['search_text']:
|
||||||
log(" opts:")
|
log(" --search='%s'" % opts_dict['search_text'])
|
||||||
for key in keys:
|
|
||||||
log(" %s: %s" % (key, opts_dict[key]))
|
if opts_dict['ids']:
|
||||||
|
log(" Book count: %d" % len(opts_dict['ids']))
|
||||||
|
if opts_dict['search_text']:
|
||||||
|
log(" (--search ignored when a subset of the database is specified)")
|
||||||
|
|
||||||
|
if opts_dict['fields']:
|
||||||
|
if opts_dict['fields'] == 'all':
|
||||||
|
log(" Fields: %s" % ', '.join(FIELDS[1:]))
|
||||||
|
else:
|
||||||
|
log(" Fields: %s" % opts_dict['fields'])
|
||||||
|
|
||||||
|
|
||||||
# If a list of ids are provided, don't use search_text
|
# If a list of ids are provided, don't use search_text
|
||||||
if opts.ids:
|
if opts.ids:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user