mount_height_records.py
#!/usr/bin/env python3
"""Keep sensor mounting height and swing clearance as two records.
One room has two numbers that answer different questions: where the
sensor mounts, and how much room the swing needs. Print both rows.
"""
import sys, json
def records(plan):
return {
"sensor_mount_height": plan.get("sensor_mount_height", "MISSING"),
"swing_clearance": plan.get("swing_clearance", "MISSING"),
"sources": plan.get("sources", "MISSING"),
}
if __name__ == "__main__":
print(json.dumps(records(json.load(open(sys.argv[1]))), indent=2))
Plan the room as separate records: sensor mounting height answers the mount, swing clearance answers the swing, and each carries its own source. GolfCompat keeps the EYE XO software and room questions in separate documented records on its Uneekor EYE XO page.
MIT License. This utility is original tooling and endorses no purchase.