-
Notifications
You must be signed in to change notification settings - Fork 17
/
styles.py
165 lines (141 loc) · 4.23 KB
/
styles.py
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
162
163
164
165
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
class NoStyle(object):
left_border_char = ""
right_border_char = ""
top_border_char = ""
bottom_border_char = ""
header_separator_char = ""
column_separator_char = ""
row_separator_char = ""
intersect_top_left = ""
intersect_top_mid = ""
intersect_top_right = ""
intersect_header_left = ""
intersect_header_mid = ""
intersect_header_right = ""
intersect_row_left = ""
intersect_row_mid = ""
intersect_row_right = ""
intersect_bottom_left = ""
intersect_bottom_mid = ""
intersect_bottom_right = ""
class DefaultStyle(NoStyle):
left_border_char = "|"
right_border_char = "|"
top_border_char = "-"
bottom_border_char = "-"
header_separator_char = "-"
column_separator_char = "|"
row_separator_char = "-"
intersect_top_left = "+"
intersect_top_mid = "+"
intersect_top_right = "+"
intersect_header_left = "+"
intersect_header_mid = "+"
intersect_header_right = "+"
intersect_row_left = "+"
intersect_row_mid = "+"
intersect_row_right = "+"
intersect_bottom_left = "+"
intersect_bottom_mid = "+"
intersect_bottom_right = "+"
class MySQLStyle(DefaultStyle):
pass
class SeparatedStyle(DefaultStyle):
top_border_char = "="
header_separator_char = "="
class CompactStyle(NoStyle):
header_separator_char = "-"
column_separator_char = " "
intersect_top_left = " "
intersect_top_mid = " "
intersect_top_right = " "
intersect_header_left = " "
intersect_header_mid = " "
intersect_header_right = " "
intersect_row_left = " "
intersect_row_mid = " "
intersect_row_right = " "
intersect_bottom_left = " "
intersect_bottom_mid = " "
intersect_bottom_right = " "
class DottedStyle(NoStyle):
left_border_char = ":"
right_border_char = ":"
top_border_char = "."
bottom_border_char = "."
header_separator_char = "."
column_separator_char = ":"
class MarkdownStyle(NoStyle):
left_border_char = "|"
right_border_char = "|"
header_separator_char = "-"
column_separator_char = "|"
intersect_header_left = "|"
intersect_header_mid = "|"
intersect_header_right = "|"
class RestructuredTextStyle(CompactStyle):
top_border_char = "="
bottom_border_char = "="
header_separator_char = "="
class BoxStyle(NoStyle):
left_border_char = "│"
right_border_char = "│"
top_border_char = "─"
bottom_border_char = "─"
header_separator_char = "─"
column_separator_char = "│"
row_separator_char = "─"
intersect_top_left = "┌"
intersect_top_mid = "┬"
intersect_top_right = "┐"
intersect_header_left = "├"
intersect_header_mid = "┼"
intersect_header_right = "┤"
intersect_row_left = "├"
intersect_row_mid = "┼"
intersect_row_right = "┤"
intersect_bottom_left = "└"
intersect_bottom_mid = "┴"
intersect_bottom_right = "┘"
class DoubledBoxStyle(NoStyle):
left_border_char = "║"
right_border_char = "║"
top_border_char = "═"
bottom_border_char = "═"
header_separator_char = "═"
column_separator_char = "║"
row_separator_char = "═"
intersect_top_left = "╔"
intersect_top_mid = "╦"
intersect_top_right = "╗"
intersect_header_left = "╠"
intersect_header_mid = "╬"
intersect_header_right = "╣"
intersect_row_left = "╠"
intersect_row_mid = "╬"
intersect_row_right = "╣"
intersect_bottom_left = "╚"
intersect_bottom_mid = "╩"
intersect_bottom_right = "╝"
class RoundedStyle(BoxStyle):
intersect_top_left = "╭"
intersect_top_right = "╮"
intersect_bottom_left = "╰"
intersect_bottom_right = "╯"
class GridStyle(BoxStyle):
left_border_char = "║"
right_border_char = "║"
top_border_char = "═"
bottom_border_char = "═"
intersect_top_left = "╔"
intersect_top_mid = "╤"
intersect_top_right = "╗"
intersect_header_left = "╟"
intersect_header_right = "╢"
intersect_row_left = "╟"
intersect_row_right = "╢"
intersect_bottom_left = "╚"
intersect_bottom_mid = "╧"
intersect_bottom_right = "╝"