From 94a4ce0ac73c8eb6d6d9fa280091c725d3805db5 Mon Sep 17 00:00:00 2001 From: PyYoshi Date: Mon, 15 May 2017 09:51:49 +0900 Subject: [PATCH] add --version --- bin/cchardetect | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cchardetect b/bin/cchardetect index e51a024..3baaad0 100755 --- a/bin/cchardetect +++ b/bin/cchardetect @@ -18,6 +18,7 @@ def main(): parser = argparse.ArgumentParser() parser.add_argument('files', nargs='*', help="Files to detect encoding of", type=argparse.FileType('rb'), default=[sys.stdin if PY2 else sys.stdin.buffer]) parser.add_argument('--chunk-size', type=int, default=(256 * 1024)) + parser.add_argument('--version', action='version', version='%(prog)s {0}'.format(cchardet.__version__)) args = parser.parse_args() for f in args.files: