Page 1 of 1

Editing CMX logs using Windows Cumulus 1

Posted: Tue 24 Oct 2017 2:32 pm
by jpsc
My logs and history are a mess due to a malfunctioning Fine Offset station.

I would like to get rid of all the zeros and spikes to make a clean history.

Just supposing I stop CMX and duplicate the data directory into my old Cumulus setup on Windows. Using select-a-graph I can look at each month and easily see what is wrong. I will be able to use a text editor to cut out great swathes of corrupt history from the logs. I then use the Cumulus editor to fix up the monthly, yearly and alltime summaries. I estimate that 6 months of the past two years need drastic surgery, but I could run over all of them to make sure the monthly files are consistent.

The fly in the ointment is the date format difference in the ini files; the monthly logs are compatible between CMX and C1 - possibly needing a line ending change.

Changing the date format in the ini files is simple, a sed script will do it. Changing back is also not a problem.

After all the files are edited, it is just a matter of copying them back over the original CMX files (NB taking backups first) and restarting CMX.

Can anyone see a flaw in this approach? Are there any other files that need to be changed? (all the ini files in the data directory, and cumulus.ini itself)

ToWindowsDates.sed

Code: Select all

s,([0-9]{4})-([0-9]{2})-([0-9]{2})T,\3/\2/\1 ,g
ToUnixDates.sed

Code: Select all

s,([0-9]{2})/([0-9]{2})/([0-9]{4}) ,\3-\2-\1T,g
Batch file to run on Windows:

Code: Select all

for %%i in ("*.ini") do (
  sed -r -i -f ToWindowsDates.sed %%i
)
Has anyone tried anything like this?

Re: Editing CMX logs using Windows Cumulus 1

Posted: Tue 24 Oct 2017 6:29 pm
by mcrossley
I have edited MX files in Cumulus 1 before without any issue, but my date formats are the same so it was easy.

Re: Editing CMX logs using Windows Cumulus 1

Posted: Tue 24 Oct 2017 10:06 pm
by jpsc
Thanks, I'll give it a go