Add into a "cdxcount": 1, count for metric reporting of processed CDX files

This commit is contained in:
datechnoman 2023-12-27 08:52:23 +00:00
parent 182c58f1ce
commit 2dddda28bf

View File

@ -19,6 +19,9 @@ def run_cdxsummary(file_path, json_filepath):
# Parse the JSON output # Parse the JSON output
json_output = json.loads(result.stdout) json_output = json.loads(result.stdout)
# Add "cdxcount" entry with value 1
json_output["cdxcount"] = 1
# Remove "pathquery" and "samples" keys # Remove "pathquery" and "samples" keys
if "pathquery" in json_output: if "pathquery" in json_output:
del json_output["pathquery"] del json_output["pathquery"]