Closed kpym closed 2 years ago
Done in v1.0.15 - App tries autodetect format by extension if -f is not definned I've added also new paramater -d to define CSV delimiter
You can now probably remove all unnecessary -f
from the documentation, like in :
bafi.exe -i users.csv -f csv -t myTemplate.tmpl -o output.txt
bafi.exe -i users.bson -f bson -t myTemplate.tmpl -o output.html
.\bafi.exe -i input.csv -f csv -t "?{{toXML .}}"
updatated but note -f param still makes sense because extension may often be unusual especially for XML and CSV and also. This tool was originally meant for STDIN where format must be defined
@mmalcek I agree that -f
is absolutely necessary (even if we can guess the format from the data) when reading from stdin
or when the file extension is not standard. But I suggest to remove it only from the examples where -f
is redundant with the extension in -i
.
Currently if we want to load a
csv
file with-i data.csv
we have also to set the format using-f csv
. May be the format can be set by default to be the file extension if it is on of the known formats.