Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Mar 27, 2021

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 |

@sonarcloud
Copy link

sonarcloud bot commented Oct 24, 2020

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