From 6e69e2c6d9b57916af900a87230699e54b558b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 21 Feb 2018 14:38:29 +0100 Subject: [PATCH] Improved the output of --help for bam.pack --- bam/blend/blendfile_pack.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/bam/blend/blendfile_pack.py b/bam/blend/blendfile_pack.py index 0c44d6d..63eb071 100755 --- a/bam/blend/blendfile_pack.py +++ b/bam/blend/blendfile_pack.py @@ -588,7 +588,8 @@ def create_argparse(): parser = argparse.ArgumentParser( description="Run this script to extract blend-files(s) and their dependencies " - "to a destination path.") + "to a destination path.", + formatter_class=argparse.RawTextHelpFormatter) # for main_render() only, but validate args. parser.add_argument( @@ -598,15 +599,21 @@ def create_argparse(): parser.add_argument( "-e", "--exclude", dest="exclude", metavar='PATTERN', required=False, help='Exclusion pattern, such as "*.abc;*.mov;*.mkv"') - parser.add_argument( - "-o", "--output", dest="path_dst", metavar='DIR', required=True, - help="Output file (must be a .blend for --mode=FILE or a .zip when --mode=ZIP), " - "or a directory when multiple inputs are passed", - ) parser.add_argument( "-m", "--mode", dest="mode", metavar='MODE', required=False, choices=('FILE', 'ZIP'), default='ZIP', - help="FILE copies the blend file(s) + dependencies to a directory, ZIP to an archive.", + help='''Output mode (default:ZIP) +ZIP: copies to an archive +FILE: copies single input to a blend file and multiple input files to a directory''', + ) + parser.add_argument( + "-o", "--output", dest="path_dst", metavar='DIR', required=True, + help='''The output file must match to the --mode parameter: +for mode FILE: + - a .blend for single input file + - a directory when multiple inputs are passed +for mode ZIP: + - a zip file''', ) parser.add_argument( "-q", "--quiet", dest="use_quiet", action='store_true', required=False,