lzakharov / csv2md

Command line tool for converting CSV files into Markdown tables.
MIT License
102 stars 8 forks source link

Ability to filter columns #15

Closed xavivars closed 8 months ago

xavivars commented 8 months ago

It would be great if there was an easy way to provide a list of columns to be used when converting to markdown

So, for example, with a table with 10 columns, doing something like

--use-only=1-3,4,5,7

would not include columns 6, 8 9 and 10 into the generated table

lzakharov commented 8 months ago

Hi, @xavivars! Good point, would be nice to have it. As a quick solution, I can suggest you to use csvgrep with option --columns to filter columns and provide result to the csv2md. Anyway, I'll try to add this feature to csv2md soon. Also if you want to contribute and add this option yourself, that would be great.