• Stars
    star
    584
  • Rank 76,009 (Top 2 %)
  • Language
    JavaScript
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

ascii-tables

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

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

Input text like this

Col1	Col2	Col3	Numeric Column
Value 1	Value 2	123	10.0
Separate	cols    with a tab or 4 spaces	-2,027.1
This is a row with only one cell

Press Create Table to get something like:

ASCII table (mysql style)

+----------------------------------+---------+------------------------+----------------+
|               Col1               |  Col2   |          Col3          | Numeric Column |
+----------------------------------+---------+------------------------+----------------+
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |
+----------------------------------+---------+------------------------+----------------+

ASCII table (separated style)

+==================================+=========+========================+================+
|               Col1               |  Col2   |          Col3          | Numeric Column |
+==================================+=========+========================+================+
| Value 1                          | Value 2 | 123                    |           10.0 |
+----------------------------------+---------+------------------------+----------------+
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
+----------------------------------+---------+------------------------+----------------+
| This is a row with only one cell |         |                        |                |
+----------------------------------+---------+------------------------+----------------+

ASCII table (compact style)

                Col1                  Col2              Col3            Numeric Column  
 ---------------------------------- --------- ------------------------ ---------------- 
  Value 1                            Value 2   123                                10.0  
  Separate                           cols      with a tab or 4 spaces         -2,027.1  
  This is a row with only one cell                                                      

ASCII table (Github Markdown style)

|               Col1               |  Col2   |          Col3          | Numeric Column |
|----------------------------------|---------|------------------------|----------------|
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |

ASCII table (Reddit Markdown style)

               Col1               |  Col2   |          Col3          | Numeric Column 
----------------------------------|---------|------------------------|----------------
 Value 1                          | Value 2 | 123                    |           10.0 
 Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 
 This is a row with only one cell |         |                        |                

ASCII table (reStructuredText Grid style)

+----------------------------------+---------+------------------------+----------------+
|               Col1               |  Col2   |          Col3          | Numeric Column |
+==================================+=========+========================+================+
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |
+----------------------------------+---------+------------------------+----------------+

ASCII table (reStructuredText Simple style)

 ================================== ========= ======================== ================ 
                Col1                  Col2              Col3            Numeric Column  
 ================================== ========= ======================== ================ 
  Value 1                            Value 2   123                                10.0  
  Separate                           cols      with a tab or 4 spaces         -2,027.1  
  This is a row with only one cell                                                      
 ================================== ========= ======================== ================ 

ASCII table (Jira style)

|| Col1                             || Col2    || Col3                   || Numeric Column ||
|  Value 1                          |  Value 2 |  123                    |  10.0           | 
|  Separate                         |  cols    |  with a tab or 4 spaces |  -2,027.1       | 
|  This is a row with only one cell |          |                         |                 | 

ASCII table (rounded style)

.----------------------------------.---------.------------------------.----------------.
|               Col1               |  Col2   |          Col3          | Numeric Column |
:----------------------------------+---------+------------------------+----------------:
| Value 1                          | Value 2 | 123                    |           10.0 |
:----------------------------------+---------+------------------------+----------------:
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
:----------------------------------+---------+------------------------+----------------:
| This is a row with only one cell |         |                        |                |
'----------------------------------'---------'------------------------'----------------'

ASCII table (bubbles style)

 o88888888888888888888888888888888888(_)888888888(_)888888888888888888888888(_)88888888888888888o 
(_)               Col1               (_)  Col2   (_)          Col3          (_) Numeric Column (_)
(888888888888888888888888888888888888(_)888888888(_)888888888888888888888888(_)888888888888888888)
(_) Value 1                          (_) Value 2 (_) 123                    (_)           10.0 (_)
(_) Separate                         (_) cols    (_) with a tab or 4 spaces (_)       -2,027.1 (_)
(_) This is a row with only one cell (_)         (_)                        (_)                (_)
 O8oooooooooooooooooooooooooooooooooo(_)ooooooooo(_)oooooooooooooooooooooooo(_)oooooooooooooooo8O 

ASCII table (girder style)

//==================================[]=========[]========================[]================\\
||               Col1               ||  Col2   ||          Col3          || Numeric Column ||
|]==================================[]=========[]========================[]================[|
|| Value 1                          || Value 2 || 123                    ||           10.0 ||
|| Separate                         || cols    || with a tab or 4 spaces ||       -2,027.1 ||
|| This is a row with only one cell ||         ||                        ||                ||
\\==================================[]=========[]========================[]================//

ASCII table (dots style)

........................................................................................
:               Col1               :  Col2   :          Col3          : Numeric Column :
:..................................:.........:........................:................:
: Value 1                          : Value 2 : 123                    :           10.0 :
: Separate                         : cols    : with a tab or 4 spaces :       -2,027.1 :
: This is a row with only one cell :         :                        :                :
:..................................:.........:........................:................:

Unicode table

╔══════════════════════════════════╦═════════╦════════════════════════╦════════════════╗
║               Col1               ║  Col2   ║          Col3          ║ Numeric Column ║
╠══════════════════════════════════╬═════════╬════════════════════════╬════════════════╣
║ Value 1                          ║ Value 2 ║ 123                    ║           10.0 ║
║ Separate                         ║ cols    ║ with a tab or 4 spaces ║       -2,027.1 ║
║ This is a row with only one cell ║         ║                        ║                ║
╚══════════════════════════════════╩═════════╩════════════════════════╩════════════════╝

Unicode (single line) table

┌──────────────────────────────────┬─────────┬────────────────────────┬────────────────┐
│               Col1               │  Col2   │          Col3          │ Numeric Column │
├──────────────────────────────────┼─────────┼────────────────────────┼────────────────┤
│ Value 1                          │ Value 2 │ 123                    │           10.0 │
│ Separate                         │ cols    │ with a tab or 4 spaces │       -2,027.1 │
│ This is a row with only one cell │         │                        │                │
└──────────────────────────────────┴─────────┴────────────────────────┴────────────────┘

Github Markdown table

|               Col1               |  Col2   |          Col3          | Numeric Column |
|----------------------------------|---------|------------------------|----------------|
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |

Jira table

||             Col1               ||  Col2  ||          Col3         || Numeric Column ||
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |

MediaWiki markup

{| class="wikitable"

! Col1
! Col2
! Col3
! Numeric Column
|-

| Value 1
| Value 2
| 123
| 10.0
|-

| Separate
| cols
| with a tab or 4 spaces
| -2,027.1
|-

| This is a row with only one cell
|
|
|
|}

Or even a boring html <table>

Leading characters can be added by selecting a comment style:

Style Characters Usage
none "" no comment style applied
doubleslant "// " C++/C#/F#/Java/JavaScript/Rust/Swift
hash "# " Perl/PowerShell/Python/R/Ruby
doubledash "-- " ada/AppleScript/Haskell/Lua/SQL
percent "% " MATLAB
singlespace " " (1 space) MediaWiki
quadspace "    " (4 spaces) reddit
singlequote "' " (single quote) VBA
rem "REM " BASIC/DOS batch file
c "C " Fortran IV
exclamation "! " Fortran 90
slantsplat "/* ... */ " CSS
xml "<!-- ... -->" XML

License

WTFPL. Do whatever the hell you want with it.

More Repositories

1

github-colors

🌈 Github colors for all the languages
Python
698
star
2

cookieclicker

Cookie Clicker copy for, errrr, educational purpose.
JavaScript
180
star
3

rainbow

Because everybody loves rainbows.
Arduino
114
star
4

ozh-tweet-archiver

Ozh' Tweet Archiver - Import and archive your tweets in WordPress
PHP
33
star
5

top_100_PHP_projects

💯 The 𝗧𝗼𝗽 𝟭𝟬𝟬 𝗣𝗛𝗣 Projects on Github. (𝐿𝑖𝑠𝑡 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑏𝑦 𝑎 𝑅𝑢𝑏𝑦 𝑠𝑐𝑟𝑖𝑝𝑡 𝑡ℎ𝑎𝑡 𝑤𝑎𝑠 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑏𝑦 𝐴𝐼 !)
Ruby
20
star
6

ozh-tweet-archive-theme

WordPress Theme for a Twitter archive (to be used with plugin Ozh' Tweet Archiver)
PHP
19
star
7

slush-poppies

Notepad++ theme: Slush & Poppies
19
star
8

plugin-unit-test-demo

Sample WordPress plugin to illustrate unit tests
PHP
18
star
9

yourls-change-password

YOURLS plugin to easily update your password from the web
PHP
16
star
10

bookmarkletgen

PHP class to generate bookmarklets from Javascript code
PHP
13
star
11

yourls-bash

Simple bash script to shorten URLs with YOURLS
Shell
12
star
12

yourls-fallback-url

YOURLS Plugin: Fallback URL
PHP
12
star
13

git-score

Get some statistics about committers
PHP
11
star
14

phpunit-overassertive

Reports tests that contain a high number of assertions
PHP
11
star
15

yourls-sqlite

SQLite driver for YOURLS
PHP
10
star
16

YOURLS-fr_FR

Traduction française de YOURLS
5
star
17

fix-youtube-titles

🎞️ Get correct Youtube video titles with YOURLS
PHP
5
star
18

yourls-geoip-update

🌍 YOURLS plugin to update the GeoIP database
PHP
5
star
19

yourls-enhanced-cookies

YOURLS plugin to harden auth cookies 🍪👮
PHP
4
star
20

ozh.org

ozh.org (the "portfolio")
PHP
4
star
21

yourls-word-based-short-urls

YOURLS plugin: word based short URLs, eg http://sho.rt/FluffyArrogantUnicorn
PHP
4
star
22

awesome

List made daily from repo I've starred
4
star
23

git-pr

git pr : easily work with PR from Github
PHP
4
star
24

shreddit

The Shreddit Player
PHP
3
star
25

your-own-domain-here.com

your own domain here, just as the name says.
JavaScript
3
star
26

phpass

Openwall phpass, namespaced with composer
PHP
3
star
27

google-issues-to-github

PHP CLI script to migrate issues from a Google Code project to Github
PHP
3
star
28

ozh-css-smilies

Ozh' CSS Smilies for WordPress
PHP
3
star
29

lightbox-clones

Data for the Lightbox Clones Matrix
PHP
2
star
30

rss2html

Script from 2008 to generate HTML output from an RSS feed
PHP
2
star
31

ozh.github.com

Files for ozh.github.com
JavaScript
2
star
32

ozh

This is ozh
1
star
33

blackboard

Blackboard theme for Notepad++, fine tuned for my needs
1
star
34

example-plugin

YOURLS example plugin for Composer
PHP
1
star
35

empty-empty

1
star
36

fartscroll

“You want fart noises as you scroll? We’ve got you covered.”
PHP
1
star
37

ozh-who-sees-ads

Ozh' Who Sees Ads: Manage your ads. Define under what condition they will show (visitor from search engine, old post..)
PHP
1
star
38

ozh-admin-drop-down-menu

Ozh' Admin Drop Down Menu : a WordPress plugin to have all admin links available in a neat horizontal drop down menu
PHP
1
star