Add node tag import functionality to collector

- Add tag_import.py module with JSON file parsing and database upsert
- Convert collector CLI to group with subcommands for extensibility
- Add 'import-tags' command to import tags from JSON file
- Update docker-compose.yml.example with separated data directories:
  - data/collector for tags.json
  - data/web for members.json
- Add import-tags Docker service for easy containerized imports
- Add example data files in example/data/collector and example/data/web
- Add comprehensive test coverage (20 tests) for tag import
This commit is contained in:
Claude
2025-12-03 18:16:03 +00:00
parent df6f6b779c
commit fe1fd69904
7 changed files with 730 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
{
"tags": [
{
"public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"key": "location",
"value": "San Francisco, CA",
"value_type": "string"
},
{
"public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"key": "role",
"value": "gateway",
"value_type": "string"
},
{
"public_key": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"key": "location",
"value": "Oakland, CA",
"value_type": "string"
},
{
"public_key": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"key": "altitude",
"value": "150",
"value_type": "number"
}
]
}

View File

@@ -0,0 +1,10 @@
{
"members": [
{
"name": "Example Member",
"callsign": "N0CALL",
"role": "Network Operator",
"description": "Example member entry"
}
]
}