-
Notifications
You must be signed in to change notification settings - Fork 134
/
index.html
161 lines (155 loc) · 7.37 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ASCII Table Generator – Quickly format ASCII table. Great for source code comments and markdown!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/script.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<style>
</style>
</head>
<body class="dashboard" onload="createTable()">
<div class="container-fluid" id="main">
<div class="row">
<header class="jumbotron">
<div class="row">
<div class="col-xs-1 col-xs-offset-1 text-right">
<h1><a href=""><i id="icon" class="fa fa-table"></i><span id="title">ASCII Table Generator</span></a></h1>
</div>
<div class="col-xs-10">
<h1><a href=""><pre> _ _ _ _____ _ _
/ \ ___ ___(_|_) |_ _|_ _| |__ | | ___
/ _ \ / __|/ __| | | | |/ _` | '_ \| |/ _ \
/ ___ \\__ \ (__| | | | | (_| | |_) | | __/
/_/ \_\___/\___|_|_| |_|\__,_|_.__/|_|\___|</pre></a></h1>
</div>
</div>
<div class="row">
<div class="col-xs-11 col-xs-offset-1">
<p>Quickly format ASCII table. Great for <span>source code comments</span> and <span>Github Markdown</span>!</p>
</div>
</div>
</header>
</div>
<div class="row">
<div class="col-xs-3 col-sm-2 text-center">
<h2>Input</h2>
<div class="row">
<button class="btn btn-lg btn-primary" onclick="createTable()">Create <i class="fa fa-table"></i></button>
</div>
</div>
<div class="col-xs-9">
<div class="row">
<textarea class="form-control fixed-width " rows="5" wrap="off" id="input" onchange="createTable()" onkeyup="createTable()">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</textarea>
</div>
</div>
</div>
<div class="row text-center">
<div class="well well-sm col-xs-10 col-xs-offset-1 col-sm-9 col-md-8 col-lg-offset-2 col-lg-6 col-lg-offset-3">
<div class="col-xs-1"><h2 title="Settings" id="settings"><i class="fa fa-gear"></i></h2>
</div>
<div class="col-xs-6">
<div class="row">
<label for="hdr-style" class="control-label" title="Select what should be used as a header">Header Location:
<select id="hdr-style" onchange="createTable()" onselect="createTable()">
<option value="none">None</option>
<option value="top" selected="true">First Row</option>
<option value="ssheet">Spreadsheet</option>
</select>
</label>
</div>
<div class="row">
<label for="style" class="control-label" title="Select the output format of the table">Output Style:
<select id="style" onchange="createTable()">
<option value="mysql">ASCII (mysql style)</option>
<option value="separated">ASCII (separated)</option>
<option value="compact">ASCII (compact)</option>
<option value="gfm">Github Markdown</option>
<option value="reddit">Reddit Markdown</option>
<option value="rstGrid">reStructuredText Grid</option>
<option value="rstSimple">reStructuredText Simple</option>
<option value="jira">Jira</option>
<option value="rounded">ASCII (rounded)</option>
<option value="bubbles">ASCII (bubbles)</option>
<option value="girder">ASCII (girder)</option>
<option value="dots">ASCII (dots)</option>
<option value="unicode">Unicode</option>
<option value="unicode_single_line">Unicode (single line)</option>
<option value="mediawiki">MediaWiki</option>
<option value="html">HTML</option>
</select>
</label>
</div>
<div class="row" style="width:200%;">
<label for="commenting" class="control-label" title="Select a comment style to place to the left of the table">Comment Style:
<select id="commenting" onchange="createTable()">
<option value="none">"" (no comment style applied)</option>
<option value="doubleslant">"// " C++/C#/F#/Java/JavaScript/Rust/Swift</option>
<option value="hash">"# " Perl/PowerShell/Python/R/Ruby</option>
<option value="doubledash">"-- " ada/AppleScript/Haskell/Lua/SQL</option>
<option value="percent">"% " MATLAB </option>
<option value="docblock">" * " Docblock (PHP/Java/JS) </option>
<option value="singlespace">" " (1 space) MediaWiki</option>
<option value="quadspace">" " (4 spaces) reddit</option>
<option value="singlequote">"' " (single quote) VBA</option>
<option value="rem">"REM " BASIC/DOS batch file</option>
<option value="c">"C " Fortran IV </option>
<option value="exclamation">"! " Fortran 90</option>
<option value="slantsplat">"/* ... */ " CSS </option>
<option value="xml">"<!-- ... -->" XML</option>
<option value="pipe">"|" Reddit pipe</option>
</select>
</label>
</div>
</div>
<div class="col-xs-5">
<div class="row">
<label for="auto-format" class="control-label" title="Center the headers and right-align numbers in the output table">Auto-Format:
<input id="auto-format" checked="true" type="checkbox" title="Center the headers and right-align numbers in the output table" onchange="createTable()"></label>
<label for="trim-input" class="control-label" title="Trim the input lines before parsing">Trim Input Lines:
<input id="trim-input" checked="true" type="checkbox" title="Trim the input lines before parsing" onchange="createTable()"></label>
</div>
<div class="row">
<label for="separator" class="control-label" title="Identify character for custom separator, default is the tab character">Custom Separator:
<input id="separator" type="text" name="separator" maxlength="1" size="1" onfocus="this.value = '';createTable()" onkeyup="createTable()"
/></label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-3 col-sm-2 text-center">
<div class="row">
<h2>Output</h2>
</div>
<div class="row">
<button class="btn btn-lg btn-primary" onclick="parseTableClick()">Parse <i class="fa fa-table"></i></button>
</div>
<div class="row">
<button class="btn btn-md btn-secondary" onclick="copyOutputToClipboard()" style="margin: 0.5em">Copy <i class="fa fa-copy"></i></button>
</div>
</div>
<div class="col-xs-9">
<div id="outputText" class="row">
<textarea id="output" class="form-control fixed-width" rows="8" wrap="off"></textarea>
</div>
</div>
</div>
<div id="outputTbl" class="row"></div>
<div class="row">
<footer>
Idea and code base by <a href="http://www.sensefulsolutions.com/2010/10/format-text-as-table.html">Senseful Solutions</a>. Forked by <a href="https://github.com/ozh">Ozh</a> to tweak a few stuff and to add <abbr title="Github Flavored Markdown">GFM</abbr>.
See on <a href="https://github.com/ozh/ascii-tables">Github</a>.
</footer>
</div>
</div>
</body>
</html>