Add the holdit command.

This commit is contained in:
Ethan Dalool 2019-08-18 19:53:54 -07:00
parent d15977330b
commit a9102cf877

View file

@ -900,6 +900,8 @@ DOCSTRING = '''
{covercomesfirst}
{holdit}
{merge}
{normalize}
@ -930,6 +932,14 @@ covercomesfirst:
first, otherwise some /a/image.jpg will always be before /images/cover.jpg.
'''.strip(),
'holdit':
'''
holdit:
Extract the book and leave it open for manual editing, then save.
> epubfile.py holdit book.epub
''',
'merge':
'''
merge:
@ -1022,6 +1032,12 @@ def covercomesfirst_argparse(args):
book.save(args.epub)
def holdit_argparse(args):
book = Epub.open(args.epub)
print(book.root_directory.absolute_path)
input('Press Enter when ready.')
book.save(args.epub)
def merge(input_filepaths, output_filename, do_headerfile=False):
book = Epub.new()
@ -1106,6 +1122,10 @@ def main(argv):
p_covercomesfirst.add_argument('epub')
p_covercomesfirst.set_defaults(func=covercomesfirst_argparse)
p_holdit = subparsers.add_parser('holdit')
p_holdit.add_argument('epub')
p_holdit.set_defaults(func=holdit_argparse)
p_merge = subparsers.add_parser('merge')
p_merge.add_argument('epubs', nargs='+', default=[])
p_merge.add_argument('--output', dest='output', default=None, required=True)