xsv
xsv copied to clipboard
Feature request: `xsv table` without fully buffered data.
I expect it to analyse e.g. 1000 first rows, calculate row widths, then just use those widths for the rest of the data without, even if some of fields exceed the width.
I was thinking about a similar thing and I think it should be doable, I was thinking about a new flag --streaming
. If this flag is passed, the wtr.flush()
in src/cmd/table.rs:69 is executed inside the loop instead of after it, thus outputting a table row every input row.
This however I haven't tested yet, will try to do that the next days.
On the other hand, this repository seems to be on ice at the moment, see #267 There is a fork however that seems to be more actively maintained: qsv so maybe I will try to submit these changes over there :)
Hi @AntonHermann, I'm the maintainer of the qsv fork and I too would like to see this feature and look forward to your PR!