proddy
2024-04-29 20:31:16 +02:00
parent c12c7845bf
commit 543cfc921e
11 changed files with 331 additions and 14 deletions

View File

@@ -5,5 +5,5 @@
rm -f dump_entities.csv
make clean
make ARGS=-DEMSESP_STANDALONE
echo "test entity_dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv
echo "test entity_dump" | ./emsesp | python3 ./scripts/strip_csv.py > dump_entities.csv
cat dump_entities.csv

10
scripts/dump_telegrams.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
# creates an CSV file called "dump_telegrams.cvs" with all devices and their telegrams
# run from top folder like `sh ./scripts/dump_telegrams.sh`
rm -f dump_telegrams.csv
# make clean
# make
make ARGS=-DEMSESP_STANDALONE
echo "test telegram_dump" | ./emsesp | python3 ./scripts/strip_csv.py > dump_telegrams.csv
cat dump_telegrams.csv

View File

@@ -1,8 +1,5 @@
# strips out lines between two markers
# pipe a file into, for example:
# make clean; make; echo "test entity_dump" | ./emsesp | python3 ./scripts/dump_entities.py > dump_entities.csv
# see dump_entities.sh
# pipe a file into, for example: 'cat x | python3 strip_csv.py'
import fileinput
with fileinput.input() as f_input:
inRecordingMode = False