From cfe0b17f66aae660b9d67867e1a2a74c95f4c547 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 6 Mar 2025 12:34:17 +0000 Subject: [PATCH] Update terminology to match the protocol specs --- README.md | 24 ++++++++++++------------ gtscraper.py | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c037c66..b41e2fc 100644 --- a/README.md +++ b/README.md @@ -18,45 +18,45 @@ This is an example of the JSON file produced, filtered down to one Zone. ], "nodes": [ { - "name": "nas-afp", + "object": "nas-afp", "type": "TimeLord", "address": "5311.212", - "port": "129", + "socket": "129", "zone": "Doofnet" }, { - "name": "nas-afp", + "object": "nas-afp", "type": "AFPServer", "address": "5311.212", - "port": "128", + "socket": "128", "zone": "Doofnet" }, { - "name": "HP LJ Pro 200 Color", + "object": "HP LJ Pro 200 Color", "type": "LaserWriter", "address": "5311.212", - "port": "130", + "socket": "130", "zone": "Doofnet" }, { - "name": "nas-afp", + "object": "nas-afp", "type": "netatalk", "address": "5311.212", - "port": "4", + "socket": "4", "zone": "Doofnet" }, { - "name": "nas-afp", + "object": "nas-afp", "type": "Workstation", "address": "5311.212", - "port": "4", + "socket": "4", "zone": "Doofnet" }, { - "name": "jrouter v0.0.12", + "object": "jrouter v0.0.12", "type": "AppleRouter", "address": "5311.1", - "port": "253", + "socket": "253", "zone": "Doofnet" } ] diff --git a/gtscraper.py b/gtscraper.py index 1cd8702..e6ae60f 100755 --- a/gtscraper.py +++ b/gtscraper.py @@ -52,14 +52,14 @@ def nbplkup(zone: str) -> list[(str, str)]: for x in cmd.stdout.split("\n") if x.strip() != "" ]: - name, endpoint_type, address = node - address, port = address.split(":") + object, endpoint_type, address = node + address, socket = address.split(":") zone_results.append( { - "name": name.strip(), + "object": object.strip(), "type": endpoint_type.strip(), "address": address, - "port": port, + "socket": socket, "zone": zone, } )