From 1e03f7f9b0dc4fe2bf856c542d011de72962ce10 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 15 Jul 2021 03:30:56 +0200 Subject: cdx reshape: write json --- extra/cdx/cdx_reshape.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extra') diff --git a/extra/cdx/cdx_reshape.py b/extra/cdx/cdx_reshape.py index 4e96134..6b3d6e5 100644 --- a/extra/cdx/cdx_reshape.py +++ b/extra/cdx/cdx_reshape.py @@ -15,5 +15,5 @@ for line in fileinput.input(): by_url[doc["line"]] = doc -for k, v in sorted(by_url): - print("{}\t{}".format(k, v)) +for k, v in sorted(by_url.items()): + print("{}\t{}".format(k, json.dumps(v))) -- cgit v1.2.3