lzakharov / csv2md

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

Column alignment #2

Closed messiaen closed 4 years ago

messiaen commented 4 years ago

Added some options to let columns be center or right aligned:

usage: csv2md [-h] [-d DELIMITER] [-q QUOTECHAR]
              [--center-fields center_FIELDS] [--right-fields RIGHT_FIELDS]
              [CSV_FILE [CSV_FILE ...]]

Parse CSV files into Markdown tables.

usage: csv2md [-h] [-d DELIMITER] [-q QUOTECHAR]
              [--center-fields CENTER_FIELDS] [--right-fields RIGHT_FIELDS]
              [CSV_FILE [CSV_FILE ...]]

Parse CSV files into Markdown tables.

positional arguments:
  CSV_FILE              One or more CSV files to parse

optional arguments:
  -h, --help            show this help message and exit
  -d DELIMITER, --delimiter DELIMITER
                        delimiter character. Default is ','
  -q QUOTECHAR, --quotechar QUOTECHAR
                        quotation character. Default is '"'
  --center-fields CENTER_FIELDS
                        fields to center aligned
  --right-fields RIGHT_FIELDS
                        fields to right aligned
codecov-io commented 4 years ago

Codecov Report

Merging #2 into master will increase coverage by 6.98%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #2      +/-   ##
==========================================
+ Coverage   81.25%   88.23%   +6.98%     
==========================================
  Files           2        2              
  Lines          32       51      +19     
==========================================
+ Hits           26       45      +19     
  Misses          6        6
Impacted Files Coverage Δ
csv2md/csv2md.py 88% <100%> (+7.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bf3ca87...c2398d0. Read the comment docs.

lzakharov commented 4 years ago

@messiaen, thanks for your contribution! I've added alignment to the new version.