reformat
This commit is contained in:
parent
94a4ce0ac7
commit
e278ef8274
1 changed files with 11 additions and 3 deletions
|
@ -16,9 +16,17 @@ def read_chunks(f, chunk_size):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
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('files',
|
||||||
parser.add_argument('--chunk-size', type=int, default=(256 * 1024))
|
nargs='*',
|
||||||
parser.add_argument('--version', action='version', version='%(prog)s {0}'.format(cchardet.__version__))
|
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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
for f in args.files:
|
for f in args.files:
|
||||||
|
|
Loading…
Reference in a new issue