Skip to content

Instantly share code, notes, and snippets.

@sulrich
Created March 2, 2023 22:59
Show Gist options
  • Save sulrich/3846590228ba461f7217390b36cc8845 to your computer and use it in GitHub Desktop.
Save sulrich/3846590228ba461f7217390b36cc8845 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import json
import pprint
import sys
def main():
"""main :returns: the needful"""
with open(sys.argv[1], "r") as json_data:
data = json.load(json_data)
for i in data["internalDrop"]:
chipName = "".join([chr(x) for x in data["internalDrop"][i]["chipName"]])
counterName = "".join([chr(x) for x in data["internalDrop"][i]["counterName"]])
print("chip:", chipName.rstrip("\0"), "- counter:", counterName.rstrip("\0"))
pprint.pprint(data["internalDrop"][i], compact=True, indent=2)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment