Created
March 2, 2023 22:59
-
-
Save sulrich/3846590228ba461f7217390b36cc8845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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