jtbl icon indicating copy to clipboard operation
jtbl copied to clipboard

Feature request: Output as CSV

Open emilebosch opened this issue 1 year ago • 2 comments

Hi Kelly hope you're good 👋 I thought maybe it was cool if we had a csv output. Let me know what you think <3

emilebosch avatar Sep 14 '22 11:09 emilebosch

Hey Emile!

I have resisted it because there are other options (like jq), but seeing that CSV is fairly human readable it does seem to make sense. I might also add HTML table output support while adding CSV output. It will be a bit back-burner for now since I'm currently working on a bunch of /proc parsers for jc.

kellyjonbrazil avatar Sep 14 '22 15:09 kellyjonbrazil

Perfect thanks Kelly! Yeah i know about jq csv options, but frankly its quite cumbersome to use so I rather would have it in a tool like this. Thanks so far!

emilebosch avatar Sep 14 '22 15:09 emilebosch

Hi @emilebosch,

I added CSV and HTML output options in the dev branch. Can you pull it down and test?

Thanks!

kellyjonbrazil avatar Oct 05 '22 00:10 kellyjonbrazil

Fantastic! Will do!

emilebosch avatar Oct 05 '22 08:10 emilebosch

I'm currently sorting columns alphabetically, but I have a way to preserve the column order a bit better that I may implement soon.

kellyjonbrazil avatar Oct 05 '22 17:10 kellyjonbrazil

I think I have the column order figured out for the CSV output. I'll see if I can generalize that for all output now.

kellyjonbrazil avatar Oct 05 '22 20:10 kellyjonbrazil

Added in v1.4.0 uploaded to PyPi. Binaries coming soon.

kellyjonbrazil avatar Oct 06 '22 20:10 kellyjonbrazil

Wow good work, this really makes things easier! Thank you!

emilebosch avatar Oct 07 '22 07:10 emilebosch