-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen.rb
executable file
·98 lines (97 loc) · 3.8 KB
/
gen.rb
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
#!/bin/env ruby
{
'normal': 'normal',
'bright': 'bright',
'both': 'normal bright',
default: 'normal both',
}.each do |modes_name, modes|
{
default: '0 1 2 3 4 5 6 7',
'spectrum': '0 7 1 3 2 6 4 5',
'simple-spectrum': '1 3 2 6 4 5',
'reverse': '7 6 5 4 3 2 1 0',
'reverse-spectrum': '5 4 6 2 3 1 7 0',
'reverse-simple-spectrum': '5 4 6 2 3 1',
}.each do |colors_name, colors|
{
'block1': [false, '█'],
'block2': [false, '██'],
'block3': [false, '███'],
'block4': [false, '████'],
'block5': [false, '█████'],
'block6': [false, '██████'],
'block7': [false, '███████'],
'block8': [false, '████████'],
'space1': [false, "\033[7m "],
'space2': [false, "\033[7m "],
'space3': [false, "\033[7m "],
'space4': [false, "\033[7m "],
'space5': [false, "\033[7m "],
'space6': [false, "\033[7m "],
'space7': [false, "\033[7m "],
'space8': [false, "\033[7m "],
'light1': [false, '░'],
'light2': [false, '░░'],
'light3': [false, '░░░'],
'light4': [false, '░░░░'],
'light5': [false, '░░░░░'],
'light6': [false, '░░░░░░'],
'light7': [false, '░░░░░░░'],
'light8': [false, '░░░░░░░░'],
'medium1': [false, '▒'],
'medium2': [false, '▒▒'],
'medium3': [false, '▒▒▒'],
'medium4': [false, '▒▒▒▒'],
'medium5': [false, '▒▒▒▒▒'],
'medium6': [false, '▒▒▒▒▒▒'],
'medium7': [false, '▒▒▒▒▒▒▒'],
'medium8': [false, '▒▒▒▒▒▒▒▒'],
'dark1': [false, '▓'],
'dark2': [false, '▓▓'],
'dark3': [false, '▓▓▓'],
'dark4': [false, '▓▓▓▓'],
'dark5': [false, '▓▓▓▓▓'],
'dark6': [false, '▓▓▓▓▓▓'],
'dark7': [false, '▓▓▓▓▓▓▓'],
'dark8': [false, '▓▓▓▓▓▓▓▓'],
'line1': [false, '─'],
'line2': [false, '──'],
'line3': [false, '───'],
'line4': [false, '────'],
'line5': [false, '─────'],
'line6': [false, '──────'],
'line7': [false, '───────'],
'line8': [false, '────────'],
'thick-line1': [false, '━'],
'thick-line2': [false, '━━'],
'thick-line3': [false, '━━━'],
'thick-line4': [false, '━━━━'],
'thick-line5': [false, '━━━━━'],
'thick-line6': [false, '━━━━━━'],
'thick-line7': [false, '━━━━━━━'],
'thick-line8': [false, '━━━━━━━━'],
'arrow1': [true, ''],
'arrow2': [true, '█'],
'arrow3': [true, '██'],
'arrow4': [true, '███'],
'arrow5': [true, '████'],
'arrow6': [true, '█████'],
'arrow7': [true, '██████'],
'arrow8': [true, '███████'],
'heart': [false, '♥ '],
'circle': [false, '● '],
'square': [false, '■ '],
'ghost': [false, ' '],
'big-circle': [false, ' '],
'dot-circle': [false, ' '],
'big-square': [false, ' '],
'transition': [true, ' ░▒▓'],
'ascii-transition': [true, ' -=#'],
'stair-transition': [true, '▂▄▆█'],
'small-stair-transition': [true, '▂▄▆'],
}.each do |string_name, string|
filename = [string_name, modes_name, colors_name].select { _1 != :default }.join('_')
puts `#{__dir__}/bin/colorstrip --string '#{string[1]}' --modes '#{modes}' --colors '#{colors}' --#{string[0] ? '' : 'no-'}transition | tee #{__dir__}/docs/#{filename}`
end
end
end