How znerox/openwrt-configvisualizer works
OpenWrt-ConfigVisualizer is a single-file translator: a user runs the script with OpenWrt network and DHCP configuration, optionally adds static hosts, and receives nwdiag text describing interfaces, subnets, and clients. The script parses Ethernet and WireGuard details, collects client records, sorts and matches them to networks, then prints the diagram input. The README describes sending that text to Kroki for image or PDF rendering; the repository does not show an automatic Kroki call. Host-file parsing is documented but its implementation was not sampled.
Main entry points: NetworkDiagram.py Python script
Components 12
Configuration inputs
- Network config
- DHCP config
- Optional hosts
Diagram translation
- Python script
NetworkDiagram.py - Interface parsing
NetworkDiagram.py - Client parsing
NetworkDiagram.py - Static host import
NetworkDiagram.py - Sort and match
NetworkDiagram.py
Diagram rendering
- nwdiag text
- Kroki renderer
- Image or PDF
Other components
- User
Connections 15
- User → Python script: runs
- Python script → User: prompts
- Python script → Network config: reads
- Python script → DHCP config: reads
- Python script → Optional hosts: optionally reads
- Python script → Interface parsing: parses interfaces
- Python script → Client parsing: parses clients
- Python script → Static host import: optionally imports
- Interface parsing → Sort and match: interface records
- Client parsing → Sort and match: client records
- Static host import → Sort and match: static clients
- Sort and match → nwdiag text: builds text
- Python script → User: prints text
- User → Kroki renderer: submits text
- Kroki renderer → Image or PDF: renders