diff --git a/epubfile.py b/epubfile.py index a86c5c1..cc72a49 100644 --- a/epubfile.py +++ b/epubfile.py @@ -1506,6 +1506,12 @@ def holdit_argparse(args): pipeable.stdout(epub.absolute_path) 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( input_filepaths, 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( 'merge', description='''