Semigradsky / ascii-tables

Quickly format table in ASCII. Great for code comments, or Github Markdown!

Home Page:http://ozh.github.io/ascii-tables/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ascii-tables

Quickly format tables in ASCII. Great for code comments, or Github Markdown!

Play with it: http://ozh.github.io/ascii-tables/

Input text like this

Col1	Col2	Col3
Value 1	Value 2	123
Separate	columns	with a tab or 4 spaces
This is a row with only one cell

Press Create Table to get something like:

Ascii table (mysql style)

+----------------------------------+---------+------------------------+
|               Col1               |  Col2   |          Col3          |
+----------------------------------+---------+------------------------+
| Value 1                          | Value 2 | 123                    |
| Separate                         | columns | with a tab or 4 spaces |
| This is a row with only one cell |         |                        |
+----------------------------------+---------+------------------------+

Ascii table 2 (alt style)

+==================================+================================+======+
|               Col1               |              Col2              | Col3 |
+==================================+================================+======+
| Value 1                          | Value 2                        |  123 |
+----------------------------------+--------------------------------+------+
| Separate                         | columns with a tab or 4 spaces |      |
+----------------------------------+--------------------------------+------+
| This is a row with only one cell |                                |      |
+----------------------------------+--------------------------------+------+

Unicode table

╔══════════════════════════════════╦═════════╦════════════════════════╗
║               Col1               ║  Col2   ║          Col3          ║
╠══════════════════════════════════╬═════════╬════════════════════════╣
║ Value 1                          ║ Value 2 ║ 123                    ║
║ Separate                         ║ columns ║ with a tab or 4 spaces ║
║ This is a row with only one cell ║         ║                        ║
╚══════════════════════════════════╩═════════╩════════════════════════╝

Github Markdown table

|               Col1               |  Col2   |          Col3          |
|----------------------------------|---------|------------------------|
| Value 1                          | Value 2 | 123                    |
| Separate                         | columns | with a tab or 4 spaces |
| This is a row with only one cell |         |                        |

Or even a boring html <table>

About

Quickly format table in ASCII. Great for code comments, or Github Markdown!

http://ozh.github.io/ascii-tables/


Languages

Language:JavaScript 88.6%Language:CSS 11.4%