From 43d51953678f5033190cae3ebffb32e2c3a85484 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 4 Jul 2026 22:51:36 -0700 Subject: [PATCH] Add command 'manifest'. --- epubfile.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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='''