python icon indicating copy to clipboard operation
python copied to clipboard

Feature Request: Have Additional --nodes output in Json format

Open Paul-Pressure opened this issue 1 year ago • 1 comments

Would be very useful to have additional --nodes output in JSON format so can be used in code.

Paul-Pressure avatar Oct 12 '24 11:10 Paul-Pressure

Agreed, the nicely formatted table looks appealing, but it's not useful for anyone who wants to perform additional data processing. Perhaps we could add a --nodes --json flag to specify that the output should be in JSON format? We might also consider adding more flags for --csv, --xml, etc.

Edit

Super quick and dirty, It works on my system, I have not done extensive testing but I tossed together meshtastic_table_to_json.py, a quick script that will take the output of meshtastic --nodes as stdin and convert it to json.

note: I'm using uv to manage my projects so I tested this with meshtastic --nodes | uv run meshtastic_table_to_json.py

brandonleon avatar Oct 23 '25 15:10 brandonleon