better formatting of help
This commit is contained in:
24
README.md
24
README.md
@@ -63,21 +63,21 @@ Extracts one time password (OTP) secret keys from QR codes, e.g. from Google Aut
|
|||||||
If no infiles are provided, the QR codes are interactively captured from the camera.
|
If no infiles are provided, the QR codes are interactively captured from the camera.
|
||||||
|
|
||||||
positional arguments:
|
positional arguments:
|
||||||
infile a) file or - for stdin with 'otpauth-migration://...' URLs separated by newlines, lines starting with # are ignored;
|
infile a) file or - for stdin with 'otpauth-migration://...' URLs separated by newlines, lines starting with # are ignored;
|
||||||
b) image file containing a QR code or = for stdin for an image containing a QR code
|
b) image file containing a QR code or = for stdin for an image containing a QR code
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
--camera NUMBER, -C NUMBER camera number of system (default camera: 0)
|
--camera NUMBER, -C NUMBER camera number of system (default camera: 0)
|
||||||
--qr {QREADER,DEEP_QREADER,ZBAR,CV2,WECHAT}, -Q {QREADER,DEEP_QREADER,ZBAR,CV2,WECHAT}
|
--qr {QREADER,DEEP_QREADER,ZBAR,CV2,WECHAT}, -Q {QREADER,DEEP_QREADER,ZBAR,CV2,WECHAT}
|
||||||
QR reader (default: ZBAR)
|
QR reader (default: ZBAR)
|
||||||
--json FILE, -j FILE export json file or - for stdout
|
--json FILE, -j FILE export json file or - for stdout
|
||||||
--csv FILE, -c FILE export csv file or - for stdout
|
--csv FILE, -c FILE export csv file or - for stdout
|
||||||
--keepass FILE, -k FILE export totp/hotp csv file(s) for KeePass, - for stdout
|
--keepass FILE, -k FILE export totp/hotp csv file(s) for KeePass, - for stdout
|
||||||
--printqr, -p print QR code(s) as text to the terminal (requires qrcode module)
|
--printqr, -p print QR code(s) as text to the terminal (requires qrcode module)
|
||||||
--saveqr DIR, -s DIR save QR code(s) as images to the given folder (requires qrcode module)
|
--saveqr DIR, -s DIR save QR code(s) as images to the given folder (requires qrcode module)
|
||||||
--verbose, -v verbose output
|
--verbose, -v verbose output
|
||||||
--quiet, -q no stdout output, except output set by -
|
--quiet, -q no stdout output, except output set by -
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
python extract_otp_secrets.py
|
python extract_otp_secrets.py
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ python extract_otp_secrets.py - < example_export.txt
|
|||||||
python extract_otp_secrets.py --csv - example_*.png | tail -n+2
|
python extract_otp_secrets.py --csv - example_*.png | tail -n+2
|
||||||
python extract_otp_secrets.py = < example_export.png"""
|
python extract_otp_secrets.py = < example_export.png"""
|
||||||
|
|
||||||
arg_parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=52),
|
arg_parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=32),
|
||||||
description=description_text,
|
description=description_text,
|
||||||
epilog=example_text)
|
epilog=example_text)
|
||||||
arg_parser.add_argument('infile', help="""a) file or - for stdin with 'otpauth-migration://...' URLs separated by newlines, lines starting with # are ignored;
|
arg_parser.add_argument('infile', help="""a) file or - for stdin with 'otpauth-migration://...' URLs separated by newlines, lines starting with # are ignored;
|
||||||
|
|||||||
Reference in New Issue
Block a user