mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1733 (mobi output metadata for transfer to Kindle)
This commit is contained in:
parent
00820d24f4
commit
18b9c916bb
@ -898,7 +898,7 @@ def config(defaults=None, config_name='html',
|
|||||||
metadata('title', ['-t', '--title'], default=None,
|
metadata('title', ['-t', '--title'], default=None,
|
||||||
help=_('Set the title. Default is to autodetect.'))
|
help=_('Set the title. Default is to autodetect.'))
|
||||||
metadata('authors', ['-a', '--authors'], default=None,
|
metadata('authors', ['-a', '--authors'], default=None,
|
||||||
help=_('The author(s) of the ebook, as a comma separated list.'))
|
help=_('The author(s) of the ebook, as a & separated list.'))
|
||||||
metadata('tags', ['--subjects'], default=None,
|
metadata('tags', ['--subjects'], default=None,
|
||||||
help=_('The subject(s) of this book, as a comma separated list.'))
|
help=_('The subject(s) of this book, as a comma separated list.'))
|
||||||
metadata('publisher', ['--publisher'], default=None,
|
metadata('publisher', ['--publisher'], default=None,
|
||||||
@ -994,7 +994,9 @@ def merge_metadata(htmlfile, opf, opts):
|
|||||||
val = getattr(opts, attr, None)
|
val = getattr(opts, attr, None)
|
||||||
if val is None or val == _('Unknown') or val == [_('Unknown')]:
|
if val is None or val == _('Unknown') or val == [_('Unknown')]:
|
||||||
continue
|
continue
|
||||||
if attr in ('authors', 'tags'):
|
if attr =='authors':
|
||||||
|
val = [i.strip() for i in val.split('&') if i.strip()]
|
||||||
|
elif attr == 'tags':
|
||||||
val = [i.strip() for i in val.split(',') if i.strip()]
|
val = [i.strip() for i in val.split(',') if i.strip()]
|
||||||
setattr(mi, attr, val)
|
setattr(mi, attr, val)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user