Fix #1902702 [[Enhancement] Add catalog title to XML catalog](https://bugs.launchpad.net/calibre/+bug/1902702)

This commit is contained in:
Kovid Goyal 2020-11-04 07:56:46 +05:30
parent d52a9a074d
commit d2c52b5b8e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -170,7 +170,10 @@ class CSV_XML(CatalogPlugin):
elif self.fmt == 'xml':
from lxml.builder import E
root = E.calibredb()
if getattr(opts, 'catalog_title', None):
root = E.calibredb(title=opts.catalog_title)
else:
root = E.calibredb()
for r in data:
record = E.record()
root.append(record)