CSV to markdown converter
Switch branches/tags
Nothing to show
Clone or download
Latest commit c253f4a Nov 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Add ajax interface Oct 3, 2018
.gitignore Initial upload Oct 3, 2018
LICENSE Initial commit Oct 3, 2018
README.md img name Oct 3, 2018
index.php Add github-corner Oct 31, 2018
octocat.tmpl Clone repo icon fixed Nov 18, 2018

README.md

marknotes_csv2md

CSV to markdown converter

Very straight-forward script for converting a CSV content to a Markdown table.

Convert string like

Column 1 Header,Column 2 Header
Row 1-1,Row 1-2
Row 2-1,Row 2-2

into

| Column 1 Header | Column 2 Header |
| --------------- | --------------- |
| Row 1-1         | Row 1-2         |
| Row 2-1         | Row 2-2         |

How to use

Just copy/paste your CSV string into the text box as illustrated here below, choose your delimiter, quotation mark (let empty if none) and your separator (default is |).

When you've only two records in your csv, you can also activate the Transpose feature if you wish a two columns table.

When done, just press on the Convert button.

csv2md

Source

The CSVTable has been written by Matthias Endler and available on GitHub: https://github.com/mre/CSVTable.

The script has been quickly modified for:

  • Modified for PHP 7 compatibility
  • Add a transpose feature
  • Add the column separator as first / last character of the line
  • Add a space before / after the column separator
  • Add an interface for easily use the conversion tool