From b1c604626bb310587fdffefa423197e1186a4177 Mon Sep 17 00:00:00 2001 From: Leon Haag-Fank Date: Thu, 4 Apr 2024 17:30:33 +0200 Subject: [PATCH] argparse --help changes --- zeit-dl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zeit-dl b/zeit-dl index 8225f0e..06776b0 100755 --- a/zeit-dl +++ b/zeit-dl @@ -11,15 +11,15 @@ MEINE = 'https://meine.zeit.de' def main(): - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('user', type=str, help='Username') parser.add_argument('pwd', type=str, help='Password') parser.add_argument('-o', '--out', type=str, default=os.getcwd(), help='Output directory') - parser.add_argument('-a', '--abo', type=str, choices=['diezeit', 'zeitcampus', 'zeit-audio'], default='diezeit', help='Abo') - parser.add_argument('-i', '--issue', type=str, help='Ausgabe (meistens DD.MM.YYYY)') - parser.add_argument('-t', '--type', type=str, choices=['pdf', 'epub', 'mp3'], default='pdf', help='Dateiformat') + parser.add_argument('-a', '--abo', type=str, choices=['diezeit', 'zeitcampus', 'zeit-audio'], default='diezeit', help='Subscription (part after abo/)') + parser.add_argument('-i', '--issue', type=str, help='Issue (mostly DD.MM.YYYY)') + parser.add_argument('-t', '--type', type=str, choices=['pdf', 'epub', 'mp3'], default='pdf', help='File type') parser.add_argument('-f', '--force', action='store_true', help='Redownload file even if already present') - parser.add_argument('--format', type=str, default="{abo}_{issue}.{ext}", help='Filename format') + parser.add_argument('--format', type=str, default="{abo}_{issue}.{ext}", help='Filename format. Possible formatting strings are {abo}, {issue}, {ext} and datetime format codes.') args = parser.parse_args() if args.user is None or args.pwd is None: parser.error('You need to supply a username and password')