columnize icon indicating copy to clipboard operation
columnize copied to clipboard

(feature): Horizontal delimiter

Open trakhimenok opened this issue 8 years ago • 1 comments

It would be nice if it were possible to have setting for horizontal delimiter(s) so we can split different sets of data.

Something like:

=====================
ID | Name  | Value  |
---|-------|--------|
 1 | Jack  | blue   |
 2 | Jack  | brown  |
---|-------|--------|
 3 | Alice | red    |
 4 | Alice | yellow |
=====================

For example do draw delimiter line if we pass a row with single value? Would be nice if different characters can be used: -, =, pseudo-graphic ASCII.

So probably a settings should be a slice of strings to be treated as delimiters.

trakhimenok avatar Nov 10 '17 16:11 trakhimenok

Hey @astec, interesting idea. I could see potentially adding settings for a horizontal split line. I could also see drawing outlines for a nice table-looking output, but IMO that should be a separate wrapper over Columnize, or perhaps a separate wrapper within this package. I probably won't be tackling this myself any time soon, but I would love a PR!

ryanuber avatar Dec 12 '17 00:12 ryanuber