aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/__main__.py
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-12 01:14:34 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-12 01:14:34 +0100
commit0f9a45f3c4657eb4372b96e2a6c550c4a01226e5 (patch)
treed217b6e82de697b30c8b5b7f0de438e170291f1e /fuzzycat/__main__.py
parent037b077efba7ee351fe2c6b5d0217c6d426261e0 (diff)
downloadfuzzycat-0f9a45f3c4657eb4372b96e2a6c550c4a01226e5.tar.gz
fuzzycat-0f9a45f3c4657eb4372b96e2a6c550c4a01226e5.zip
move fileinput.input out of the cluster
The cluster class should work with iterable, so testing will be easier.
Diffstat (limited to 'fuzzycat/__main__.py')
-rw-r--r--fuzzycat/__main__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/fuzzycat/__main__.py b/fuzzycat/__main__.py
index 900d5c0..3845245 100644
--- a/fuzzycat/__main__.py
+++ b/fuzzycat/__main__.py
@@ -13,8 +13,8 @@ Run, e.g. fuzzycat cluster --help for more options. Example:
import argparse
import cProfile as profile
import fileinput
-import json
import io
+import json
import logging
import pstats
import sys
@@ -33,8 +33,8 @@ def run_cluster(args):
'tnysi': release_key_title_nysiis,
'tss': release_key_title_ngram,
}
- cluster = Cluster(files=args.files,
- keyfunc=types.get(args.type),
+ cluster = Cluster(iterable=fileinput.input(args.files),
+ key=types.get(args.type),
tmpdir=args.tmpdir,
prefix=args.prefix)
stats = cluster.run()