shellfie 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +56 -2
- data/README.md +258 -97
- data/lib/shellfie/animation_frame_builder.rb +31 -7
- data/lib/shellfie/animation_timeline.rb +2 -1
- data/lib/shellfie/ansi_line_buffer.rb +20 -4
- data/lib/shellfie/ansi_normalizer.rb +18 -8
- data/lib/shellfie/ansi_parser.rb +120 -7
- data/lib/shellfie/cassette.rb +76 -0
- data/lib/shellfie/cli.rb +65 -2
- data/lib/shellfie/cli_authoring.rb +233 -0
- data/lib/shellfie/cli_generate.rb +244 -40
- data/lib/shellfie/cli_info.rb +106 -6
- data/lib/shellfie/cli_run.rb +167 -0
- data/lib/shellfie/config.rb +5 -1
- data/lib/shellfie/config_defaults.rb +21 -2
- data/lib/shellfie/config_validation.rb +93 -4
- data/lib/shellfie/dependency_checker.rb +74 -3
- data/lib/shellfie/errors.rb +1 -0
- data/lib/shellfie/ffmpeg_encoder.rb +46 -0
- data/lib/shellfie/font_resolver.rb +11 -1
- data/lib/shellfie/gif_generator.rb +157 -11
- data/lib/shellfie/gif_palette.rb +8 -4
- data/lib/shellfie/html_renderer.rb +54 -0
- data/lib/shellfie/line_layout.rb +19 -10
- data/lib/shellfie/output_writer.rb +7 -2
- data/lib/shellfie/parser.rb +82 -19
- data/lib/shellfie/parser_validation.rb +48 -15
- data/lib/shellfie/render_geometry.rb +2 -1
- data/lib/shellfie/render_segment.rb +17 -5
- data/lib/shellfie/renderer.rb +28 -11
- data/lib/shellfie/rendering/text_painter.rb +23 -15
- data/lib/shellfie/rendering/window_chrome.rb +2 -2
- data/lib/shellfie/reproducibility_manifest.rb +41 -0
- data/lib/shellfie/session.rb +111 -0
- data/lib/shellfie/session_config.rb +562 -0
- data/lib/shellfie/session_runner.rb +689 -0
- data/lib/shellfie/svg_renderer.rb +222 -0
- data/lib/shellfie/terminal_screen.rb +389 -0
- data/lib/shellfie/text_metrics.rb +74 -15
- data/lib/shellfie/transcript_renderer.rb +92 -0
- data/lib/shellfie/version.rb +1 -1
- data/lib/shellfie/yaml_safety.rb +147 -0
- data/lib/shellfie.rb +8 -1
- data/schema/shellfie-v1.schema.json +153 -0
- data/schema/shellfie-v2.schema.json +262 -0
- metadata +27 -24
- data/.rspec +0 -3
- data/Rakefile +0 -8
- data/docs/.nojekyll +0 -0
- data/docs/index.html +0 -205
- data/docs/scripts.js +0 -85
- data/docs/styles.css +0 -507
- data/examples/animation.yml +0 -33
- data/examples/colored.yml +0 -20
- data/examples/demo.gif +0 -0
- data/examples/demo.png +0 -0
- data/examples/demo_animation.yml +0 -31
- data/examples/headless.png +0 -0
- data/examples/headless.yml +0 -16
- data/examples/scrolling.yml +0 -48
- data/examples/simple.yml +0 -21
- data/examples/theme_macos.png +0 -0
- data/examples/theme_ubuntu.png +0 -0
- data/examples/theme_windows.png +0 -0
- data/shellfie.gemspec +0 -32
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ydah/shellfie/main/schema/shellfie-v2.schema.json",
|
|
4
|
+
"title": "Shellfie executable session",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["version"],
|
|
8
|
+
"anyOf": [{ "required": ["steps"] }, { "required": ["include"] }],
|
|
9
|
+
"dependentRequired": { "include_policy": ["include"] },
|
|
10
|
+
"properties": {
|
|
11
|
+
"version": { "const": 2 },
|
|
12
|
+
"include": { "oneOf": [{ "type": "string" }, { "type": "array", "minItems": 1, "items": { "type": "string" } }] },
|
|
13
|
+
"include_policy": { "enum": ["allow", "root"] },
|
|
14
|
+
"mode": { "enum": ["run", "replay"] },
|
|
15
|
+
"title": { "type": "string" },
|
|
16
|
+
"theme": { "enum": ["macos", "ubuntu", "windows", "custom"] },
|
|
17
|
+
"vars": {
|
|
18
|
+
"type": "object", "maxProperties": 100,
|
|
19
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
20
|
+
"additionalProperties": { "type": ["string", "number", "boolean", "null"] }
|
|
21
|
+
},
|
|
22
|
+
"step_sets": {
|
|
23
|
+
"type": "object", "maxProperties": 100,
|
|
24
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"type": "array", "items": { "oneOf": [{ "$ref": "#/$defs/step" }, { "$ref": "#/$defs/step_use" }] }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"terminal": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"shell": { "type": "string" }, "columns": { "type": "integer", "minimum": 1, "maximum": 500 },
|
|
34
|
+
"rows": { "type": "integer", "minimum": 1, "maximum": 200 }, "cwd": { "type": "string" },
|
|
35
|
+
"cwd_policy": { "enum": ["allow", "root"] },
|
|
36
|
+
"env": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"propertyNames": { "allOf": [{ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }, { "not": { "const": "PS1" } }] },
|
|
39
|
+
"additionalProperties": { "type": ["string", "null"] }
|
|
40
|
+
},
|
|
41
|
+
"env_allowlist": {
|
|
42
|
+
"type": ["array", "null"], "uniqueItems": true,
|
|
43
|
+
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" }
|
|
44
|
+
},
|
|
45
|
+
"timeout": { "$ref": "#/$defs/duration" },
|
|
46
|
+
"total_timeout": { "oneOf": [{ "$ref": "#/$defs/duration" }, { "type": "null" }] },
|
|
47
|
+
"prompt": { "type": "string", "pattern": "\\S" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"requires": { "type": "array", "items": { "type": "string", "pattern": "^[A-Za-z0-9_.+-]+$" } },
|
|
51
|
+
"steps": {
|
|
52
|
+
"type": "array", "maxItems": 10000,
|
|
53
|
+
"items": { "oneOf": [{ "$ref": "#/$defs/step" }, { "$ref": "#/$defs/step_use" }] },
|
|
54
|
+
"contains": { "type": "object", "required": ["capture"] }, "minContains": 0, "maxContains": 100
|
|
55
|
+
},
|
|
56
|
+
"outputs": { "type": "array", "items": { "$ref": "#/$defs/output" } },
|
|
57
|
+
"render": {
|
|
58
|
+
"type": "object", "additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"window": {
|
|
61
|
+
"$ref": "#/$defs/window"
|
|
62
|
+
},
|
|
63
|
+
"font": {
|
|
64
|
+
"$ref": "#/$defs/font"
|
|
65
|
+
},
|
|
66
|
+
"animation": {
|
|
67
|
+
"$ref": "#/$defs/animation"
|
|
68
|
+
},
|
|
69
|
+
"headless": { "type": "boolean" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"redact": { "type": "array", "maxItems": 100, "items": { "type": "string", "maxLength": 512 } }
|
|
73
|
+
},
|
|
74
|
+
"$defs": {
|
|
75
|
+
"duration": {
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{ "type": "number", "exclusiveMinimum": 0, "maximum": 86400 },
|
|
78
|
+
{
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^(?=.{1,32}s?$)0*(?:0\\.[0-9]*[1-9][0-9]*|(?:[1-9][0-9]{0,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9]{2})(?:\\.[0-9]+)?|86400(?:\\.0+)?)s?$"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "string",
|
|
84
|
+
"pattern": "^(?=.{1,32}ms$)0*(?:0\\.[0-9]*[1-9][0-9]*|(?:[1-9][0-9]{0,6}|[1-7][0-9]{7}|8[0-5][0-9]{6}|86[0-3][0-9]{5})(?:\\.[0-9]+)?|86400000(?:\\.0+)?)ms$"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"window": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"width": { "type": "integer", "minimum": 120 },
|
|
93
|
+
"height": { "type": ["integer", "null"], "minimum": 1 },
|
|
94
|
+
"padding": { "type": "integer", "minimum": 0, "maximum": 40 },
|
|
95
|
+
"opacity": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
96
|
+
"visible_lines": { "type": ["integer", "null"], "minimum": 1 },
|
|
97
|
+
"max_lines": { "type": ["integer", "null"], "minimum": 1 },
|
|
98
|
+
"max_height": { "type": ["integer", "null"], "minimum": 1 },
|
|
99
|
+
"wrap": { "type": "boolean" },
|
|
100
|
+
"overflow": { "enum": ["clip", "wrap", "scroll"] },
|
|
101
|
+
"margin": { "type": ["integer", "null"], "minimum": 0 },
|
|
102
|
+
"exact_size": { "type": "boolean" },
|
|
103
|
+
"trim": { "type": "boolean" },
|
|
104
|
+
"tab_width": { "type": "integer", "minimum": 1 },
|
|
105
|
+
"ambiguous_width": { "enum": [1, 2] },
|
|
106
|
+
"osc_policy": { "enum": ["ignore", "preserve", "apply"] },
|
|
107
|
+
"graphics_policy": { "enum": ["ignore", "error"] },
|
|
108
|
+
"ansi_state": { "enum": ["persistent", "line"] },
|
|
109
|
+
"background_gradient": { "type": ["array", "null"], "minItems": 2, "maxItems": 2, "items": { "type": "string" } },
|
|
110
|
+
"scroll_offset": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"font": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"properties": {
|
|
117
|
+
"family": { "type": ["string", "null"] },
|
|
118
|
+
"size": { "type": "number", "exclusiveMinimum": 0 },
|
|
119
|
+
"line_height": { "type": "number", "exclusiveMinimum": 0 },
|
|
120
|
+
"fallback_family": { "type": ["string", "null"] },
|
|
121
|
+
"italic_family": { "type": ["string", "null"] },
|
|
122
|
+
"emoji_family": { "type": ["string", "null"] }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"animation": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"properties": {
|
|
129
|
+
"typing_speed": { "type": "integer", "minimum": 0, "maximum": 86400000 },
|
|
130
|
+
"command_delay": { "type": "integer", "minimum": 0, "maximum": 86400000 },
|
|
131
|
+
"cursor_blink": { "type": "boolean" },
|
|
132
|
+
"loop": { "type": "boolean" },
|
|
133
|
+
"typing_jitter": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
134
|
+
"seed": { "type": "integer", "minimum": 0, "maximum": 2147483647 },
|
|
135
|
+
"typing_chunk_size": { "type": "integer", "minimum": 1 },
|
|
136
|
+
"output_delay": { "type": "integer", "minimum": 0, "maximum": 86400000 },
|
|
137
|
+
"final_delay": { "type": "integer", "minimum": 0, "maximum": 86400000 },
|
|
138
|
+
"max_frames": { "type": ["integer", "null"], "minimum": 1 },
|
|
139
|
+
"dither": { "type": "boolean" },
|
|
140
|
+
"palette": { "enum": ["global", "adaptive", "theme"] },
|
|
141
|
+
"gif_colors": { "type": "integer", "minimum": 2, "maximum": 256 },
|
|
142
|
+
"gif_optimize": { "type": "boolean" },
|
|
143
|
+
"webp_lossless": { "type": "boolean" },
|
|
144
|
+
"webp_quality": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
145
|
+
"webp_method": { "type": "integer", "minimum": 0, "maximum": 6 },
|
|
146
|
+
"webp_near_lossless": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
147
|
+
"apng_prediction": { "enum": ["none", "sub", "up", "avg", "paeth", "mixed"] },
|
|
148
|
+
"loop_count": { "type": ["integer", "null"], "minimum": 0, "maximum": 65535 },
|
|
149
|
+
"direction": { "enum": ["forward", "reverse", "ping_pong"] },
|
|
150
|
+
"loop_offset": { "type": "integer", "minimum": 0 },
|
|
151
|
+
"scroll_easing": { "enum": ["linear", "ease_in", "ease_out", "ease_in_out"] },
|
|
152
|
+
"framerate": { "type": "integer", "minimum": 1, "maximum": 120 },
|
|
153
|
+
"playback_speed": { "type": "number", "exclusiveMinimum": 0, "maximum": 100 }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"step": {
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{ "type": "string", "enum": ["hide", "show"] },
|
|
159
|
+
{
|
|
160
|
+
"type": "object",
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"properties": {
|
|
163
|
+
"run": { "type": "string" }, "type": { "type": "string" }, "key": { "type": "string" },
|
|
164
|
+
"sleep": { "$ref": "#/$defs/duration" }, "wait": { "$ref": "#/$defs/wait" },
|
|
165
|
+
"expect": { "$ref": "#/$defs/expect" }, "capture": { "type": "string" },
|
|
166
|
+
"hide": { "const": true }, "show": { "const": true }, "visibility": { "enum": ["visible", "hidden"] },
|
|
167
|
+
"timeout": { "$ref": "#/$defs/duration" },
|
|
168
|
+
"speed": { "type": "string", "maxLength": 32, "pattern": "^0*(?:[1-9][0-9]{0,2}(?:\\.[0-9]+)?|1000(?:\\.0+)?)cps$" },
|
|
169
|
+
"count": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
170
|
+
"async": { "type": "boolean" }, "cwd": { "type": "string" },
|
|
171
|
+
"delay": { "$ref": "#/$defs/duration" },
|
|
172
|
+
"repeat": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
173
|
+
"if": { "$ref": "#/$defs/condition" }
|
|
174
|
+
},
|
|
175
|
+
"oneOf": [
|
|
176
|
+
{ "required": ["run"] }, { "required": ["type"] }, { "required": ["key"] },
|
|
177
|
+
{ "required": ["sleep"] }, { "required": ["wait"] }, { "required": ["expect"] },
|
|
178
|
+
{ "required": ["capture"] }, { "required": ["hide"] }, { "required": ["show"] }
|
|
179
|
+
],
|
|
180
|
+
"dependentRequired": { "visibility": ["run"], "speed": ["type"], "count": ["key"], "cwd": ["run"], "delay": ["key"] },
|
|
181
|
+
"allOf": [
|
|
182
|
+
{ "if": { "required": ["async"] }, "then": { "anyOf": [{ "required": ["run"] }, { "required": ["key"] }] } },
|
|
183
|
+
{ "if": { "required": ["timeout"] }, "then": { "anyOf": [{ "required": ["run"] }, { "required": ["key"] }, { "required": ["wait"] }] } },
|
|
184
|
+
{ "not": { "required": ["run", "async", "visibility"], "properties": { "async": { "const": true }, "visibility": { "const": "hidden" } } } }
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"step_use": {
|
|
190
|
+
"type": "object", "required": ["use"], "additionalProperties": false,
|
|
191
|
+
"properties": {
|
|
192
|
+
"use": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
193
|
+
"repeat": { "type": "integer", "minimum": 1, "maximum": 10000 },
|
|
194
|
+
"if": { "$ref": "#/$defs/condition" }
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"condition": {
|
|
198
|
+
"type": "object", "minProperties": 1, "additionalProperties": false,
|
|
199
|
+
"properties": {
|
|
200
|
+
"os": {
|
|
201
|
+
"oneOf": [
|
|
202
|
+
{ "enum": ["macos", "linux", "windows"] },
|
|
203
|
+
{ "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["macos", "linux", "windows"] } }
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"shell": { "type": "string" },
|
|
207
|
+
"ruby": { "type": "string" },
|
|
208
|
+
"env": { "type": "object", "additionalProperties": { "type": ["string", "null"] } }
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"wait": {
|
|
212
|
+
"oneOf": [
|
|
213
|
+
{ "type": "string", "maxLength": 512 },
|
|
214
|
+
{
|
|
215
|
+
"type": "object",
|
|
216
|
+
"additionalProperties": false,
|
|
217
|
+
"properties": {
|
|
218
|
+
"screen": { "type": "string", "maxLength": 512 }, "line": { "type": "string", "maxLength": 512 },
|
|
219
|
+
"prompt": { "const": true },
|
|
220
|
+
"stable": { "$ref": "#/$defs/duration" }, "exit": { "const": true },
|
|
221
|
+
"timeout": { "$ref": "#/$defs/duration" }
|
|
222
|
+
},
|
|
223
|
+
"oneOf": [
|
|
224
|
+
{ "required": ["screen"] }, { "required": ["line"] }, { "required": ["prompt"] },
|
|
225
|
+
{ "required": ["stable"] }, { "required": ["exit"] }
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"expect": {
|
|
231
|
+
"oneOf": [
|
|
232
|
+
{ "type": "string" },
|
|
233
|
+
{
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"properties": {
|
|
237
|
+
"screen_contains": { "type": "string" }, "screen": { "type": "string", "maxLength": 512 },
|
|
238
|
+
"line": { "type": "string", "maxLength": 512 },
|
|
239
|
+
"exit_status": { "type": "integer", "minimum": 0, "maximum": 255 },
|
|
240
|
+
"cursor_row": { "type": "integer", "minimum": 0 },
|
|
241
|
+
"cursor_column": { "type": "integer", "minimum": 0 },
|
|
242
|
+
"golden": { "type": "string" },
|
|
243
|
+
"elapsed_under": { "$ref": "#/$defs/duration" }, "elapsed_over": { "$ref": "#/$defs/duration" }
|
|
244
|
+
},
|
|
245
|
+
"minProperties": 1
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"output": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"required": ["path"],
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"properties": {
|
|
254
|
+
"path": { "type": "string" },
|
|
255
|
+
"format": { "enum": ["png", "gif", "svg", "svg-raster", "webp", "apng", "mp4", "webm", "png-sequence", "html", "txt", "ansi", "json", "asciicast", "cast"] },
|
|
256
|
+
"animate": { "type": "boolean" }, "scale": { "type": "integer", "minimum": 1, "maximum": 3 },
|
|
257
|
+
"shadow": { "type": "boolean" }, "transparent": { "type": "boolean" },
|
|
258
|
+
"capture": { "type": "string" }
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shellfie
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yudai Takada
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '4.12'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '6'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,8 +26,11 @@ dependencies:
|
|
|
23
26
|
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '4.12'
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '6'
|
|
32
|
+
description: Compile YAML terminal scenes or recorded sessions into accessible HTML,
|
|
33
|
+
semantic transcripts, SVG, raster images, and animations.
|
|
28
34
|
email:
|
|
29
35
|
- t.yudai92@gmail.com
|
|
30
36
|
executables:
|
|
@@ -33,28 +39,10 @@ executables:
|
|
|
33
39
|
extensions: []
|
|
34
40
|
extra_rdoc_files: []
|
|
35
41
|
files:
|
|
36
|
-
- ".rspec"
|
|
37
42
|
- CHANGELOG.md
|
|
38
43
|
- LICENSE
|
|
39
44
|
- README.md
|
|
40
|
-
- Rakefile
|
|
41
45
|
- assets/logo-header.svg
|
|
42
|
-
- docs/.nojekyll
|
|
43
|
-
- docs/index.html
|
|
44
|
-
- docs/scripts.js
|
|
45
|
-
- docs/styles.css
|
|
46
|
-
- examples/animation.yml
|
|
47
|
-
- examples/colored.yml
|
|
48
|
-
- examples/demo.gif
|
|
49
|
-
- examples/demo.png
|
|
50
|
-
- examples/demo_animation.yml
|
|
51
|
-
- examples/headless.png
|
|
52
|
-
- examples/headless.yml
|
|
53
|
-
- examples/scrolling.yml
|
|
54
|
-
- examples/simple.yml
|
|
55
|
-
- examples/theme_macos.png
|
|
56
|
-
- examples/theme_ubuntu.png
|
|
57
|
-
- examples/theme_windows.png
|
|
58
46
|
- exe/shellfie
|
|
59
47
|
- exe/shf
|
|
60
48
|
- lib/shellfie.rb
|
|
@@ -65,19 +53,24 @@ files:
|
|
|
65
53
|
- lib/shellfie/ansi_line_buffer.rb
|
|
66
54
|
- lib/shellfie/ansi_normalizer.rb
|
|
67
55
|
- lib/shellfie/ansi_parser.rb
|
|
56
|
+
- lib/shellfie/cassette.rb
|
|
68
57
|
- lib/shellfie/cli.rb
|
|
58
|
+
- lib/shellfie/cli_authoring.rb
|
|
69
59
|
- lib/shellfie/cli_generate.rb
|
|
70
60
|
- lib/shellfie/cli_info.rb
|
|
61
|
+
- lib/shellfie/cli_run.rb
|
|
71
62
|
- lib/shellfie/config.rb
|
|
72
63
|
- lib/shellfie/config_defaults.rb
|
|
73
64
|
- lib/shellfie/config_validation.rb
|
|
74
65
|
- lib/shellfie/dependency_checker.rb
|
|
75
66
|
- lib/shellfie/errors.rb
|
|
67
|
+
- lib/shellfie/ffmpeg_encoder.rb
|
|
76
68
|
- lib/shellfie/font_resolver.rb
|
|
77
69
|
- lib/shellfie/format_resolver.rb
|
|
78
70
|
- lib/shellfie/gif_generator.rb
|
|
79
71
|
- lib/shellfie/gif_palette.rb
|
|
80
72
|
- lib/shellfie/headless_theme_registry.rb
|
|
73
|
+
- lib/shellfie/html_renderer.rb
|
|
81
74
|
- lib/shellfie/image_magick_command_builder.rb
|
|
82
75
|
- lib/shellfie/line_layout.rb
|
|
83
76
|
- lib/shellfie/output_writer.rb
|
|
@@ -91,7 +84,13 @@ files:
|
|
|
91
84
|
- lib/shellfie/rendering/shape_helpers.rb
|
|
92
85
|
- lib/shellfie/rendering/text_painter.rb
|
|
93
86
|
- lib/shellfie/rendering/window_chrome.rb
|
|
87
|
+
- lib/shellfie/reproducibility_manifest.rb
|
|
88
|
+
- lib/shellfie/session.rb
|
|
89
|
+
- lib/shellfie/session_config.rb
|
|
90
|
+
- lib/shellfie/session_runner.rb
|
|
94
91
|
- lib/shellfie/svg_raster_wrapper.rb
|
|
92
|
+
- lib/shellfie/svg_renderer.rb
|
|
93
|
+
- lib/shellfie/terminal_screen.rb
|
|
95
94
|
- lib/shellfie/text_metrics.rb
|
|
96
95
|
- lib/shellfie/theme_data.rb
|
|
97
96
|
- lib/shellfie/theme_registry.rb
|
|
@@ -100,15 +99,19 @@ files:
|
|
|
100
99
|
- lib/shellfie/themes/macos.rb
|
|
101
100
|
- lib/shellfie/themes/ubuntu.rb
|
|
102
101
|
- lib/shellfie/themes/windows_terminal.rb
|
|
102
|
+
- lib/shellfie/transcript_renderer.rb
|
|
103
103
|
- lib/shellfie/version.rb
|
|
104
|
-
- shellfie.
|
|
104
|
+
- lib/shellfie/yaml_safety.rb
|
|
105
|
+
- schema/shellfie-v1.schema.json
|
|
106
|
+
- schema/shellfie-v2.schema.json
|
|
105
107
|
homepage: https://github.com/ydah/shellfie
|
|
106
108
|
licenses:
|
|
107
109
|
- MIT
|
|
108
110
|
metadata:
|
|
109
111
|
homepage_uri: https://github.com/ydah/shellfie
|
|
110
|
-
source_code_uri: https://github.com/ydah/shellfie
|
|
112
|
+
source_code_uri: https://github.com/ydah/shellfie/tree/main
|
|
111
113
|
changelog_uri: https://github.com/ydah/shellfie/blob/main/CHANGELOG.md
|
|
114
|
+
rubygems_mfa_required: 'true'
|
|
112
115
|
rdoc_options: []
|
|
113
116
|
require_paths:
|
|
114
117
|
- lib
|
|
@@ -123,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
123
126
|
- !ruby/object:Gem::Version
|
|
124
127
|
version: '0'
|
|
125
128
|
requirements: []
|
|
126
|
-
rubygems_version: 4.0.
|
|
129
|
+
rubygems_version: 4.0.19
|
|
127
130
|
specification_version: 4
|
|
128
131
|
summary: Terminal screenshot-style image generator
|
|
129
132
|
test_files: []
|
data/.rspec
DELETED
data/Rakefile
DELETED
data/docs/.nojekyll
DELETED
|
File without changes
|
data/docs/index.html
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>Shellfie Docs</title>
|
|
7
|
-
<meta
|
|
8
|
-
name="description"
|
|
9
|
-
content="Shellfie documentation. Generate beautiful terminal screenshots from YAML."
|
|
10
|
-
/>
|
|
11
|
-
<link rel="stylesheet" href="./styles.css" />
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<div class="ambient-glow" aria-hidden="true"></div>
|
|
15
|
-
<div class="sun-core" aria-hidden="true"></div>
|
|
16
|
-
<div class="scanlines" aria-hidden="true"></div>
|
|
17
|
-
<div class="stars" aria-hidden="true"></div>
|
|
18
|
-
<div class="grid-floor" aria-hidden="true"></div>
|
|
19
|
-
|
|
20
|
-
<header class="topbar">
|
|
21
|
-
<div class="brand">
|
|
22
|
-
<span class="brand__glyph">◎</span>
|
|
23
|
-
<div class="brand__stack">
|
|
24
|
-
<span class="brand__title">Shellfie</span>
|
|
25
|
-
<span class="brand__subtitle">Terminal Screenshot Generator</span>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
<nav class="topnav">
|
|
29
|
-
<a href="#features">Features</a>
|
|
30
|
-
<a href="#install">Install</a>
|
|
31
|
-
<a href="#usage">Usage</a>
|
|
32
|
-
<a href="#config">Config</a>
|
|
33
|
-
<a href="#themes">Themes</a>
|
|
34
|
-
</nav>
|
|
35
|
-
<a class="cta" href="https://github.com/ydah/shellfie">GitHub</a>
|
|
36
|
-
</header>
|
|
37
|
-
|
|
38
|
-
<main>
|
|
39
|
-
<section class="hero">
|
|
40
|
-
<div class="hero__content">
|
|
41
|
-
<p class="eyebrow">YAML → Image → Imagination</p>
|
|
42
|
-
<h1>
|
|
43
|
-
Terminal visuals that elevate<br />
|
|
44
|
-
your documentation
|
|
45
|
-
</h1>
|
|
46
|
-
<p class="hero__lead">
|
|
47
|
-
Shellfie is a CLI that generates PNGs and animated GIFs from YAML.
|
|
48
|
-
Build documentation, tutorials, and presentations without taking screenshots.
|
|
49
|
-
</p>
|
|
50
|
-
<div class="hero__actions">
|
|
51
|
-
<a class="cta cta--primary" href="#usage">Quick Start</a>
|
|
52
|
-
<a class="cta cta--ghost" href="#config">View Config</a>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="hero__meta">
|
|
55
|
-
<span>Ruby 3.0+</span>
|
|
56
|
-
<span>ImageMagick 7.0+</span>
|
|
57
|
-
<span>CLI: shellfie / shf</span>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="hero__preview">
|
|
61
|
-
<div class="terminal-card">
|
|
62
|
-
<div class="terminal-card__bar">
|
|
63
|
-
<span></span><span></span><span></span>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="terminal-card__body">
|
|
66
|
-
<div
|
|
67
|
-
class="typewriter"
|
|
68
|
-
data-lines="$ shellfie init > demo.yml||$ shellfie generate demo.yml -o neon.png||Generated: neon.png||Let the glow begin..."
|
|
69
|
-
></div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</section>
|
|
74
|
-
|
|
75
|
-
<section id="features" class="section">
|
|
76
|
-
<div class="section__header">
|
|
77
|
-
<p class="eyebrow">Features</p>
|
|
78
|
-
<h2>Make visuals and storytelling effortless</h2>
|
|
79
|
-
<p class="section__lead">
|
|
80
|
-
Switch themes, animate typing, and support ANSI colors to level up your docs.
|
|
81
|
-
</p>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="grid">
|
|
84
|
-
<article class="card">
|
|
85
|
-
<h3>Multi Theme</h3>
|
|
86
|
-
<p>Switch between macOS, Ubuntu, and Windows terminal styles.</p>
|
|
87
|
-
</article>
|
|
88
|
-
<article class="card">
|
|
89
|
-
<h3>Animated GIF</h3>
|
|
90
|
-
<p>Create typing animations that feel like a guided walkthrough.</p>
|
|
91
|
-
</article>
|
|
92
|
-
<article class="card">
|
|
93
|
-
<h3>Full ANSI</h3>
|
|
94
|
-
<p>Support 256-color palettes, TrueColor, and text styles.</p>
|
|
95
|
-
</article>
|
|
96
|
-
<article class="card">
|
|
97
|
-
<h3>HiDPI Output</h3>
|
|
98
|
-
<p>Render crisp assets with 2x or 3x scaling for HiDPI.</p>
|
|
99
|
-
</article>
|
|
100
|
-
</div>
|
|
101
|
-
</section>
|
|
102
|
-
|
|
103
|
-
<section id="install" class="section section--alt">
|
|
104
|
-
<div class="section__header">
|
|
105
|
-
<p class="eyebrow">Install</p>
|
|
106
|
-
<h2>Install in two steps</h2>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="split">
|
|
109
|
-
<div class="code-block">
|
|
110
|
-
<h3>ImageMagick</h3>
|
|
111
|
-
<pre><code>brew install imagemagick
|
|
112
|
-
# Ubuntu/Debian
|
|
113
|
-
sudo apt install imagemagick</code></pre>
|
|
114
|
-
</div>
|
|
115
|
-
<div class="code-block">
|
|
116
|
-
<h3>Shellfie</h3>
|
|
117
|
-
<pre><code>gem install shellfie
|
|
118
|
-
# or
|
|
119
|
-
bundle add shellfie</code></pre>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</section>
|
|
123
|
-
|
|
124
|
-
<section id="usage" class="section">
|
|
125
|
-
<div class="section__header">
|
|
126
|
-
<p class="eyebrow">Usage</p>
|
|
127
|
-
<h2>Quick Start</h2>
|
|
128
|
-
<p class="section__lead">
|
|
129
|
-
Create a YAML file, then generate the output.
|
|
130
|
-
</p>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="split">
|
|
133
|
-
<div class="code-block">
|
|
134
|
-
<h3>terminal.yml</h3>
|
|
135
|
-
<pre><code>theme: macos
|
|
136
|
-
title: "Terminal — zsh"
|
|
137
|
-
|
|
138
|
-
window:
|
|
139
|
-
width: 620
|
|
140
|
-
padding: 20
|
|
141
|
-
|
|
142
|
-
lines:
|
|
143
|
-
- prompt: "$ "
|
|
144
|
-
command: "echo 'Hello, Vaporwave!'"
|
|
145
|
-
- output: "Hello, Vaporwave!"</code></pre>
|
|
146
|
-
</div>
|
|
147
|
-
<div class="code-block">
|
|
148
|
-
<h3>Generate</h3>
|
|
149
|
-
<pre><code>shellfie generate terminal.yml -o output.png
|
|
150
|
-
shellfie generate terminal.yml -o demo.gif --animate</code></pre>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</section>
|
|
154
|
-
|
|
155
|
-
<section id="config" class="section section--alt">
|
|
156
|
-
<div class="section__header">
|
|
157
|
-
<p class="eyebrow">Config</p>
|
|
158
|
-
<h2>Animation controls</h2>
|
|
159
|
-
<p class="section__lead">
|
|
160
|
-
Tune typing speed, delays, and looping.
|
|
161
|
-
</p>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="code-block code-block--wide">
|
|
164
|
-
<pre><code>animation:
|
|
165
|
-
typing_speed: 50
|
|
166
|
-
command_delay: 500
|
|
167
|
-
cursor_blink: true
|
|
168
|
-
loop: true
|
|
169
|
-
|
|
170
|
-
frames:
|
|
171
|
-
- prompt: "$ "
|
|
172
|
-
type: "ls -la"
|
|
173
|
-
delay: 400
|
|
174
|
-
- output: "docs lib README.md"
|
|
175
|
-
delay: 800</code></pre>
|
|
176
|
-
</div>
|
|
177
|
-
</section>
|
|
178
|
-
|
|
179
|
-
<section id="themes" class="section">
|
|
180
|
-
<div class="section__header">
|
|
181
|
-
<p class="eyebrow">Themes</p>
|
|
182
|
-
<h2>Shape the vibe with themes</h2>
|
|
183
|
-
</div>
|
|
184
|
-
<div class="theme-list">
|
|
185
|
-
<div class="theme-pill">macos</div>
|
|
186
|
-
<div class="theme-pill">ubuntu</div>
|
|
187
|
-
<div class="theme-pill">windows</div>
|
|
188
|
-
<div class="theme-pill">headless</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div class="code-block code-block--wide">
|
|
191
|
-
<pre><code>shellfie themes
|
|
192
|
-
shellfie generate config.yml -o neon.png -t ubuntu
|
|
193
|
-
shellfie generate config.yml -o ghost.png --no-header</code></pre>
|
|
194
|
-
</div>
|
|
195
|
-
</section>
|
|
196
|
-
</main>
|
|
197
|
-
|
|
198
|
-
<footer class="footer">
|
|
199
|
-
<p>Shellfie Docs</p>
|
|
200
|
-
<p>Built for GitHub Pages + GitHub Actions</p>
|
|
201
|
-
</footer>
|
|
202
|
-
|
|
203
|
-
<script src="./scripts.js"></script>
|
|
204
|
-
</body>
|
|
205
|
-
</html>
|