Skip to content

Comments

Added csv, tsv or markdown table to "pretty markdown table" Script#203

Merged
IvanMathy merged 3 commits intoIvanMathy:mainfrom
xshoji:main
Mar 27, 2021
Merged

Added csv, tsv or markdown table to "pretty markdown table" Script#203
IvanMathy merged 3 commits intoIvanMathy:mainfrom
xshoji:main

Conversation

@xshoji
Copy link
Contributor

@xshoji xshoji commented Oct 24, 2020

I am apologize sudden pull request.
( If issue is required, I will create it. )

Can I add this feature?
This script execution image as follows.

# csv to markdown table
$ echo -e "a,bbb,c\nddd,e,fff"
a,bbb,c
ddd,e,fff
$ echo -e "a,bbb,c\nddd,e,fff" |node convertToMarkdownTable.js
| a   | bbb | c   |
| :-- | :-- | :-- |
| ddd | e   | fff |

# tsv to markdown table
$ echo -e "a\tbbb\tc\nddd\te\tfff"
a	bbb	c
ddd	e	fff
$ echo -e "a\tbbb\tc\nddd\te\tfff" |node convertToMarkdownTable.js
| a   | bbb | c   |
| :-- | :-- | :-- |
| ddd | e   | fff |

# markdown table to pretty markdown table
$ echo -e "|a|bbb|c|\n|:-|:-|:-|\n|ddd|e|fff|"
|a|bbb|c|
|:-|:-|:-|
|ddd|e|fff|
$ echo -e "|a|bbb|c|\n|:-|:-|:-|\n|ddd|e|fff|" |node convertToMarkdownTable.js
| a   | bbb | c   |
| :-- | :-- | :-- |
| ddd | e   | fff |

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@IvanMathy
Copy link
Owner

This is great, thanks for the contribution!

@IvanMathy IvanMathy merged commit cae4ad1 into IvanMathy:main Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants