Skip to content

Commit 5144677

Browse files
committed
remove comments from start of csv output
1 parent 04cc67f commit 5144677

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Download [config.example.yaml](config.example.yaml) and fill in your own values.
3636
`electric-usage-downloader --config config.yaml --start 2024-01-16 --end 2024-01-17`
3737
- The `--debug` flag can be used to log responses from the API for assistance debugging issues.
3838
- The `--csv-file` flag will write the data to a CSV file instead of Influx/VictoriaMetrics.
39+
- Format: "StartUnixMillis", "EndUnixMillis", "WattHours", "CostInCents", "MeterName"
40+
- MeterName will only be populated if there are multiple meters returned in the data.
41+
- StartUnixMillis and EndUnixMillis will only be in the correct timezone if you specify the correct timezone in the config.
3942

4043
## Details
4144

internal/app/csv.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ func WriteCsv(records []ElectricUsage, csvFile string) error {
1818
writer := csv.NewWriter(file)
1919
defer writer.Flush()
2020

21-
// Write comments
22-
_, err = file.WriteString(`# Notes:
23-
# MeterName will only be populated if there are multiple meters returned in the data.
24-
# StartUnixMillis and EndUnixMillis will only be in the correct timezone if you specify the correct timezone in the config.
25-
`)
26-
if err != nil {
27-
return err
28-
}
29-
3021
// Write the header row
3122
header := []string{"StartUnixMillis", "EndUnixMillis", "WattHours", "CostInCents", "MeterName"}
3223
if err := writer.Write(header); err != nil {

0 commit comments

Comments
 (0)