mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
ebook-convert: Add option to read metadata from OPF
This commit is contained in:
parent
952b95d3ad
commit
986ab2a078
@ -94,6 +94,8 @@ def option_recommendation_to_cli_option(add_option, rec):
|
|||||||
if opt.long_switch == 'verbose':
|
if opt.long_switch == 'verbose':
|
||||||
attrs['action'] = 'count'
|
attrs['action'] = 'count'
|
||||||
attrs.pop('type', '')
|
attrs.pop('type', '')
|
||||||
|
if opt.name == 'read_metadata_from_opf':
|
||||||
|
switches.append('--from-opf')
|
||||||
if opt.name in DEFAULT_TRUE_OPTIONS and rec.recommended_value is True:
|
if opt.name in DEFAULT_TRUE_OPTIONS and rec.recommended_value is True:
|
||||||
switches = ['--disable-'+opt.long_switch]
|
switches = ['--disable-'+opt.long_switch]
|
||||||
add_option(Option(*switches, **attrs))
|
add_option(Option(*switches, **attrs))
|
||||||
@ -190,7 +192,7 @@ def add_pipeline_options(parser, plumber):
|
|||||||
),
|
),
|
||||||
|
|
||||||
'METADATA' : (_('Options to set metadata in the output'),
|
'METADATA' : (_('Options to set metadata in the output'),
|
||||||
plumber.metadata_option_names,
|
plumber.metadata_option_names + ['read_metadata_from_opf'],
|
||||||
),
|
),
|
||||||
'DEBUG': (_('Options to help with debugging the conversion'),
|
'DEBUG': (_('Options to help with debugging the conversion'),
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user