Open iainelder opened 2 years ago
tabulate
as a command line tool is somewhat behind tabulate
the library. In particular at the moment it handles only white-space-separated values as input, and only a subset of output formats and options. It can definitely be improved.
May want to use the jq
utility with its @csv
filter. I was looking to do the same but with lists of lists.
When I run a command like this:
I expect output like this:
Unfortunately I get output like this:
In the README for the command-line utility I don't see any input format options or an expected input format.
As a library the README says tabulate supports "list or another iterable of dicts (keys as columns)". This matches my use case as it's what you would get after converting the input to via
json.load
Am I missing something?
If not, would you consider supporting this use case?
Currently I use jtbl for this (https://github.com/kellyjonbrazil/jtbl/issues/9) but I'd like tabulate to support it too as it has even more useful formatting options.
If it's not possible to guess the input format I'd accept something like an
--input-format json
similar to in2csv's--format json
option.