Hopefully this is the right place to ask something like this as it’s somewhat related to working in the CLI…
I’m trying to write a simple batch file to run in the windows command prompt to write published event data to a .csv file. This works using the terminal event log cURL request provided on the particle console but my output to the .csv file is filled with excessive blank lines written in between publishes. Does anybody here have a similar project that could offer some insight how to format the output file to only collect my actual published data ignoring all of the other data particle spits out with the publish and not write hundreds of blank rows? Command prompt scripts are fairly new to me and I’ve searched high and low for an example to learn form with little progress.
I’m using this:
C:\Users\Me\Desktop> MycUrl >> datalog.csv
and it works as expected to append new data to the .csv correctly but the output looks like this:
event: My_Data
data: {“data”:"|15|24|-5.4|58|100|59|0|,ttl":60|published_at:“2020-05-05T03:13:26.450Z”|coreid:“xxxxxxxxxxxxxxxxxxxxxxxxxx”}
event: My_Data
data: {“data”:"|15|24|-5.4|58|100|59|0|,ttl":60|published_at:“2020-05-05T03:13:31.751Z”|coreid:“xxxxxxxxxxxxxxxxxxxxxxxxxx”}
I’d like it to be formatted as only my data like this:
15,24,-5.4,58,100,59,0
15,24,-5.4,58,100,59,0
15,24,-5.4,58,100,59,0
15,24,-5.4,58,100,59,0
This is obviously more of a windows question than particle directly but there’s a lot of smart folks here. Any guidance would be greatly appreciated.