Hello Joshua,
thank you for this awesome tool. I would be interested to have a more flexible way of changeing the content of the CSV ouput (for e.g. adding the remittance info). Would you be interested in a PR using go template to format the output?
I could imaging two possbile solutions to this:
- CSV foramting completely determinde by template. For transactions the template could look something like:
REMITTER,DEPTOR,BOOKING DATE,STATUS,TYPE,VALUE,UNIT
{{range .Values}}{{.Creditor.HolderName}},{{.BookingDate}},{{t.BookingStatus}},{{t.TransactionType.Text}},{{.Amount | formatAmountValue}},{{t.Amount.Unit}}
{{end}}
In this case I would embed a template file which keeps the current setup and I would add an additional flag for specifying a custom template file path.
- Separate the header and the row into two templates:
header_tpl := "REMITTER,DEPTOR,BOOKING DATE,STATUS,TYPE,VALUE,UNIT"
row_tpl := "{{.Creditor.HolderName}},{{.BookingDate}},{{t.BookingStatus}},{{t.TransactionType.Text}},{{.Amount | formatAmountValue}},{{t.Amount.Unit}}"
In this case I would add two flags (one for the header and one for the row template) which would override the default formating.
Which of the solutions would you prefer? I don't really care.
Best regards
Eike
Hello Joshua,
thank you for this awesome tool. I would be interested to have a more flexible way of changeing the content of the CSV ouput (for e.g. adding the remittance info). Would you be interested in a PR using go template to format the output?
I could imaging two possbile solutions to this:
In this case I would embed a template file which keeps the current setup and I would add an additional flag for specifying a custom template file path.
In this case I would add two flags (one for the header and one for the row template) which would override the default formating.
Which of the solutions would you prefer? I don't really care.
Best regards
Eike