mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Create table of all EMS-ESP entities, by device, shortname/fullname and characteristics #828
This commit is contained in:
14
scripts/dump_entities.py
Normal file
14
scripts/dump_entities.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# use like
|
||||
# make clean; make ARGS=-DEMSESP_STANDALONE_DUMP; echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py
|
||||
|
||||
import fileinput
|
||||
with fileinput.input() as f_input:
|
||||
inRecordingMode = False
|
||||
for line in f_input:
|
||||
if not inRecordingMode:
|
||||
if line.startswith('---- CSV START ----'):
|
||||
inRecordingMode = True
|
||||
elif line.startswith('---- CSV END ----'):
|
||||
inRecordingMode = False
|
||||
else:
|
||||
print(line, end="")
|
||||
5
scripts/dump_entities.sh
Normal file
5
scripts/dump_entities.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# creates an CSV file called "dump_entities.cvs" with all devices and their entities
|
||||
# run from top folder like `sh ./scripts/dump_entities.sh`
|
||||
make clean; make ARGS=-DEMSESP_STANDALONE_DUMP; echo "test dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv
|
||||
Reference in New Issue
Block a user