aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2019-04-24 16:32:07 -0700
committerBryan Newbold <bnewbold@archive.org>2019-04-24 16:32:07 -0700
commitca180d9fc369d2646583f52c63a3471cab28c0fc (patch)
tree01c286a626f3038bfdeaa117a4e54c50930e1a84
parent5ce031b32eebba9863f0b093e8e3d390f4b16675 (diff)
downloadarabesque-ca180d9fc369d2646583f52c63a3471cab28c0fc.tar.gz
arabesque-ca180d9fc369d2646583f52c63a3471cab28c0fc.zip
identifier is column 2; don't stdout SKIPPING notice
-rwxr-xr-xarabesque.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/arabesque.py b/arabesque.py
index dd91ce6..68ba785 100755
--- a/arabesque.py
+++ b/arabesque.py
@@ -645,14 +645,14 @@ def dump_json(read_db, only_identifier_hits=False, max_per_identifier=None):
last_ident = None
ident_count = 0
for row in cur:
- if last_ident and row[0] == last_ident:
+ if last_ident and row[1] == last_ident:
ident_count += 1
if max_per_identifier and ident_count > max_per_identifier:
- print("SKIPPING identifier maxed out: {}".format(last_ident))
+ sys.stderr.write("SKIPPING identifier maxed out: {}".format(last_ident))
continue
else:
ident_count = 0
- last_ident = row[0]
+ last_ident = row[1]
print(json.dumps(dict(row)))
def main():