Add command 'manifest'.
This commit is contained in:
parent
8608ffaf75
commit
43d5195367
1 changed files with 19 additions and 0 deletions
19
epubfile.py
19
epubfile.py
|
|
@ -1506,6 +1506,12 @@ def holdit_argparse(args):
|
||||||
pipeable.stdout(epub.absolute_path)
|
pipeable.stdout(epub.absolute_path)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
def manifest_argparse(args):
|
||||||
|
book = Epub(args.epub)
|
||||||
|
for item in book.get_manifest_items(soup=True):
|
||||||
|
pipeable.stdout(str(item))
|
||||||
|
return 0
|
||||||
|
|
||||||
def merge(
|
def merge(
|
||||||
input_filepaths,
|
input_filepaths,
|
||||||
demote_headers=False,
|
demote_headers=False,
|
||||||
|
|
@ -1814,6 +1820,19 @@ def main(argv):
|
||||||
|
|
||||||
################################################################################################
|
################################################################################################
|
||||||
|
|
||||||
|
p_manifest = subparsers.add_parser(
|
||||||
|
'manifest',
|
||||||
|
description='''
|
||||||
|
Print all of the manifest entries in the book.
|
||||||
|
''',
|
||||||
|
)
|
||||||
|
p_manifest.add_argument(
|
||||||
|
'epub',
|
||||||
|
)
|
||||||
|
p_manifest.set_defaults(func=manifest_argparse)
|
||||||
|
|
||||||
|
################################################################################################
|
||||||
|
|
||||||
p_merge = subparsers.add_parser(
|
p_merge = subparsers.add_parser(
|
||||||
'merge',
|
'merge',
|
||||||
description='''
|
description='''
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue