shellfie 0.1.1 → 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 +248 -228
- data/lib/shellfie/animation_frame_builder.rb +202 -0
- data/lib/shellfie/animation_scroll_easing.rb +77 -0
- data/lib/shellfie/animation_timeline.rb +28 -0
- data/lib/shellfie/ansi_colors.rb +94 -0
- data/lib/shellfie/ansi_line_buffer.rb +103 -0
- data/lib/shellfie/ansi_normalizer.rb +61 -0
- data/lib/shellfie/ansi_parser.rb +162 -83
- data/lib/shellfie/cassette.rb +76 -0
- data/lib/shellfie/cli.rb +75 -163
- data/lib/shellfie/cli_authoring.rb +233 -0
- data/lib/shellfie/cli_generate.rb +401 -0
- data/lib/shellfie/cli_info.rb +239 -0
- data/lib/shellfie/cli_run.rb +167 -0
- data/lib/shellfie/config.rb +112 -25
- data/lib/shellfie/config_defaults.rb +83 -0
- data/lib/shellfie/config_validation.rb +289 -0
- data/lib/shellfie/dependency_checker.rb +147 -0
- data/lib/shellfie/errors.rb +12 -1
- data/lib/shellfie/ffmpeg_encoder.rb +46 -0
- data/lib/shellfie/font_resolver.rb +68 -0
- data/lib/shellfie/format_resolver.rb +15 -0
- data/lib/shellfie/gif_generator.rb +231 -89
- data/lib/shellfie/gif_palette.rb +105 -0
- data/lib/shellfie/headless_theme_registry.rb +42 -0
- data/lib/shellfie/html_renderer.rb +54 -0
- data/lib/shellfie/image_magick_command_builder.rb +75 -0
- data/lib/shellfie/line_layout.rb +146 -0
- data/lib/shellfie/output_writer.rb +46 -0
- data/lib/shellfie/parser.rb +183 -30
- data/lib/shellfie/parser_validation.rb +178 -0
- data/lib/shellfie/raster_painter.rb +157 -0
- data/lib/shellfie/render_chrome_cache.rb +40 -0
- data/lib/shellfie/render_geometry.rb +115 -0
- data/lib/shellfie/render_segment.rb +71 -0
- data/lib/shellfie/renderer.rb +96 -149
- data/lib/shellfie/rendering/shape_helpers.rb +42 -0
- data/lib/shellfie/rendering/text_painter.rb +195 -0
- data/lib/shellfie/rendering/window_chrome.rb +196 -0
- 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_raster_wrapper.rb +35 -0
- data/lib/shellfie/svg_renderer.rb +222 -0
- data/lib/shellfie/terminal_screen.rb +389 -0
- data/lib/shellfie/text_metrics.rb +155 -0
- data/lib/shellfie/theme_data.rb +80 -0
- data/lib/shellfie/theme_registry.rb +131 -0
- data/lib/shellfie/themes/base.rb +10 -1
- data/lib/shellfie/themes/configured.rb +61 -0
- data/lib/shellfie/themes/macos.rb +3 -1
- data/lib/shellfie/themes/ubuntu.rb +2 -1
- data/lib/shellfie/themes/windows_terminal.rb +7 -1
- 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 +44 -3
- data/schema/shellfie-v1.schema.json +153 -0
- data/schema/shellfie-v2.schema.json +262 -0
- metadata +58 -20
- data/.rspec +0 -3
- data/Rakefile +0 -8
- 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
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:
|
|
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,47 +39,79 @@ 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
|
-
- examples/animation.yml
|
|
43
|
-
- examples/colored.yml
|
|
44
|
-
- examples/demo.gif
|
|
45
|
-
- examples/demo.png
|
|
46
|
-
- examples/demo_animation.yml
|
|
47
|
-
- examples/headless.png
|
|
48
|
-
- examples/headless.yml
|
|
49
|
-
- examples/scrolling.yml
|
|
50
|
-
- examples/simple.yml
|
|
51
|
-
- examples/theme_macos.png
|
|
52
|
-
- examples/theme_ubuntu.png
|
|
53
|
-
- examples/theme_windows.png
|
|
54
46
|
- exe/shellfie
|
|
55
47
|
- exe/shf
|
|
56
48
|
- lib/shellfie.rb
|
|
49
|
+
- lib/shellfie/animation_frame_builder.rb
|
|
50
|
+
- lib/shellfie/animation_scroll_easing.rb
|
|
51
|
+
- lib/shellfie/animation_timeline.rb
|
|
52
|
+
- lib/shellfie/ansi_colors.rb
|
|
53
|
+
- lib/shellfie/ansi_line_buffer.rb
|
|
54
|
+
- lib/shellfie/ansi_normalizer.rb
|
|
57
55
|
- lib/shellfie/ansi_parser.rb
|
|
56
|
+
- lib/shellfie/cassette.rb
|
|
58
57
|
- lib/shellfie/cli.rb
|
|
58
|
+
- lib/shellfie/cli_authoring.rb
|
|
59
|
+
- lib/shellfie/cli_generate.rb
|
|
60
|
+
- lib/shellfie/cli_info.rb
|
|
61
|
+
- lib/shellfie/cli_run.rb
|
|
59
62
|
- lib/shellfie/config.rb
|
|
63
|
+
- lib/shellfie/config_defaults.rb
|
|
64
|
+
- lib/shellfie/config_validation.rb
|
|
65
|
+
- lib/shellfie/dependency_checker.rb
|
|
60
66
|
- lib/shellfie/errors.rb
|
|
67
|
+
- lib/shellfie/ffmpeg_encoder.rb
|
|
68
|
+
- lib/shellfie/font_resolver.rb
|
|
69
|
+
- lib/shellfie/format_resolver.rb
|
|
61
70
|
- lib/shellfie/gif_generator.rb
|
|
71
|
+
- lib/shellfie/gif_palette.rb
|
|
72
|
+
- lib/shellfie/headless_theme_registry.rb
|
|
73
|
+
- lib/shellfie/html_renderer.rb
|
|
74
|
+
- lib/shellfie/image_magick_command_builder.rb
|
|
75
|
+
- lib/shellfie/line_layout.rb
|
|
76
|
+
- lib/shellfie/output_writer.rb
|
|
62
77
|
- lib/shellfie/parser.rb
|
|
78
|
+
- lib/shellfie/parser_validation.rb
|
|
79
|
+
- lib/shellfie/raster_painter.rb
|
|
80
|
+
- lib/shellfie/render_chrome_cache.rb
|
|
81
|
+
- lib/shellfie/render_geometry.rb
|
|
82
|
+
- lib/shellfie/render_segment.rb
|
|
63
83
|
- lib/shellfie/renderer.rb
|
|
84
|
+
- lib/shellfie/rendering/shape_helpers.rb
|
|
85
|
+
- lib/shellfie/rendering/text_painter.rb
|
|
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
|
|
91
|
+
- lib/shellfie/svg_raster_wrapper.rb
|
|
92
|
+
- lib/shellfie/svg_renderer.rb
|
|
93
|
+
- lib/shellfie/terminal_screen.rb
|
|
94
|
+
- lib/shellfie/text_metrics.rb
|
|
95
|
+
- lib/shellfie/theme_data.rb
|
|
96
|
+
- lib/shellfie/theme_registry.rb
|
|
64
97
|
- lib/shellfie/themes/base.rb
|
|
98
|
+
- lib/shellfie/themes/configured.rb
|
|
65
99
|
- lib/shellfie/themes/macos.rb
|
|
66
100
|
- lib/shellfie/themes/ubuntu.rb
|
|
67
101
|
- lib/shellfie/themes/windows_terminal.rb
|
|
102
|
+
- lib/shellfie/transcript_renderer.rb
|
|
68
103
|
- lib/shellfie/version.rb
|
|
69
|
-
- shellfie.
|
|
104
|
+
- lib/shellfie/yaml_safety.rb
|
|
105
|
+
- schema/shellfie-v1.schema.json
|
|
106
|
+
- schema/shellfie-v2.schema.json
|
|
70
107
|
homepage: https://github.com/ydah/shellfie
|
|
71
108
|
licenses:
|
|
72
109
|
- MIT
|
|
73
110
|
metadata:
|
|
74
111
|
homepage_uri: https://github.com/ydah/shellfie
|
|
75
|
-
source_code_uri: https://github.com/ydah/shellfie
|
|
112
|
+
source_code_uri: https://github.com/ydah/shellfie/tree/main
|
|
76
113
|
changelog_uri: https://github.com/ydah/shellfie/blob/main/CHANGELOG.md
|
|
114
|
+
rubygems_mfa_required: 'true'
|
|
77
115
|
rdoc_options: []
|
|
78
116
|
require_paths:
|
|
79
117
|
- lib
|
|
@@ -88,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
88
126
|
- !ruby/object:Gem::Version
|
|
89
127
|
version: '0'
|
|
90
128
|
requirements: []
|
|
91
|
-
rubygems_version: 4.0.
|
|
129
|
+
rubygems_version: 4.0.19
|
|
92
130
|
specification_version: 4
|
|
93
131
|
summary: Terminal screenshot-style image generator
|
|
94
132
|
test_files: []
|
data/.rspec
DELETED
data/Rakefile
DELETED
data/examples/animation.yml
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# animation.yml - Animated GIF example
|
|
2
|
-
theme: macos
|
|
3
|
-
title: "Terminal — zsh"
|
|
4
|
-
|
|
5
|
-
window:
|
|
6
|
-
width: 600
|
|
7
|
-
padding: 20
|
|
8
|
-
|
|
9
|
-
animation:
|
|
10
|
-
typing_speed: 50
|
|
11
|
-
command_delay: 500
|
|
12
|
-
cursor_blink: true
|
|
13
|
-
loop: true
|
|
14
|
-
|
|
15
|
-
frames:
|
|
16
|
-
- prompt: "$ "
|
|
17
|
-
type: "echo Hello, World!"
|
|
18
|
-
delay: 500
|
|
19
|
-
|
|
20
|
-
- output: "Hello, World!"
|
|
21
|
-
delay: 1000
|
|
22
|
-
|
|
23
|
-
- prompt: "$ "
|
|
24
|
-
type: "ls -la"
|
|
25
|
-
delay: 500
|
|
26
|
-
|
|
27
|
-
- output: |
|
|
28
|
-
total 24
|
|
29
|
-
drwxr-xr-x 5 user staff 160 Jan 10 10:00 .
|
|
30
|
-
drwxr-xr-x 3 user staff 96 Jan 10 09:00 ..
|
|
31
|
-
-rw-r--r-- 1 user staff 1024 Jan 10 10:00 README.md
|
|
32
|
-
-rw-r--r-- 1 user staff 512 Jan 10 10:00 Gemfile
|
|
33
|
-
delay: 2000
|
data/examples/colored.yml
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# colored.yml - Example with ANSI color codes
|
|
2
|
-
theme: ubuntu
|
|
3
|
-
title: "user@ubuntu: ~/project"
|
|
4
|
-
|
|
5
|
-
window:
|
|
6
|
-
width: 700
|
|
7
|
-
padding: 20
|
|
8
|
-
|
|
9
|
-
lines:
|
|
10
|
-
- prompt: "\e[32muser@ubuntu\e[0m:\e[34m~/project\e[0m$ "
|
|
11
|
-
command: "bundle exec rspec"
|
|
12
|
-
|
|
13
|
-
- output: |
|
|
14
|
-
\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m\e[32m.\e[0m
|
|
15
|
-
|
|
16
|
-
- output: "Finished in 0.12 seconds (files took 0.5 seconds to load)"
|
|
17
|
-
- output: "\e[32m10 examples, 0 failures\e[0m"
|
|
18
|
-
|
|
19
|
-
- prompt: "\e[32muser@ubuntu\e[0m:\e[34m~/project\e[0m$ "
|
|
20
|
-
command: ""
|
data/examples/demo.gif
DELETED
|
Binary file
|
data/examples/demo.png
DELETED
|
Binary file
|
data/examples/demo_animation.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
theme: macos
|
|
2
|
-
title: "Terminal — zsh"
|
|
3
|
-
|
|
4
|
-
window:
|
|
5
|
-
width: 550
|
|
6
|
-
padding: 18
|
|
7
|
-
visible_lines: 7
|
|
8
|
-
|
|
9
|
-
animation:
|
|
10
|
-
typing_speed: 35
|
|
11
|
-
command_delay: 400
|
|
12
|
-
loop: true
|
|
13
|
-
|
|
14
|
-
frames:
|
|
15
|
-
- prompt: "$ "
|
|
16
|
-
type: "shellfie generate config.yml -o demo.png"
|
|
17
|
-
delay: 600
|
|
18
|
-
|
|
19
|
-
- output: "Generated: demo.png"
|
|
20
|
-
delay: 1200
|
|
21
|
-
|
|
22
|
-
- prompt: "$ "
|
|
23
|
-
type: "shellfie themes"
|
|
24
|
-
delay: 500
|
|
25
|
-
|
|
26
|
-
- output: |
|
|
27
|
-
Available themes:
|
|
28
|
-
macos - macOS Terminal style
|
|
29
|
-
ubuntu - Ubuntu Terminal style
|
|
30
|
-
windows - Windows Terminal style
|
|
31
|
-
delay: 2000
|
data/examples/headless.png
DELETED
|
Binary file
|
data/examples/headless.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# headless.yml - Terminal output without window decoration
|
|
2
|
-
theme: macos
|
|
3
|
-
headless: true
|
|
4
|
-
|
|
5
|
-
window:
|
|
6
|
-
width: 500
|
|
7
|
-
padding: 15
|
|
8
|
-
|
|
9
|
-
lines:
|
|
10
|
-
- prompt: "$ "
|
|
11
|
-
command: "ruby -v"
|
|
12
|
-
|
|
13
|
-
- output: "ruby 3.3.0 (2024-12-25 revision 5124f9ac75) [arm64-darwin24]"
|
|
14
|
-
|
|
15
|
-
- prompt: "$ "
|
|
16
|
-
command: ""
|
data/examples/scrolling.yml
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# scrolling.yml - Animation with fixed visible lines and scrolling
|
|
2
|
-
theme: macos
|
|
3
|
-
title: "Terminal — zsh"
|
|
4
|
-
|
|
5
|
-
window:
|
|
6
|
-
width: 600
|
|
7
|
-
padding: 20
|
|
8
|
-
visible_lines: 6 # Number of lines visible in the terminal window
|
|
9
|
-
|
|
10
|
-
animation:
|
|
11
|
-
typing_speed: 40
|
|
12
|
-
command_delay: 300
|
|
13
|
-
loop: true
|
|
14
|
-
|
|
15
|
-
frames:
|
|
16
|
-
- prompt: "$ "
|
|
17
|
-
type: "for i in {1..10}; do echo \"Line $i\"; done"
|
|
18
|
-
delay: 500
|
|
19
|
-
|
|
20
|
-
- output: "Line 1"
|
|
21
|
-
delay: 200
|
|
22
|
-
|
|
23
|
-
- output: "Line 2"
|
|
24
|
-
delay: 200
|
|
25
|
-
|
|
26
|
-
- output: "Line 3"
|
|
27
|
-
delay: 200
|
|
28
|
-
|
|
29
|
-
- output: "Line 4"
|
|
30
|
-
delay: 200
|
|
31
|
-
|
|
32
|
-
- output: "Line 5"
|
|
33
|
-
delay: 200
|
|
34
|
-
|
|
35
|
-
- output: "Line 6"
|
|
36
|
-
delay: 200
|
|
37
|
-
|
|
38
|
-
- output: "Line 7"
|
|
39
|
-
delay: 200
|
|
40
|
-
|
|
41
|
-
- output: "Line 8"
|
|
42
|
-
delay: 200
|
|
43
|
-
|
|
44
|
-
- output: "Line 9"
|
|
45
|
-
delay: 200
|
|
46
|
-
|
|
47
|
-
- output: "Line 10"
|
|
48
|
-
delay: 1500
|
data/examples/simple.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# simple.yml - Basic terminal screenshot example
|
|
2
|
-
theme: macos
|
|
3
|
-
title: "Terminal — zsh"
|
|
4
|
-
|
|
5
|
-
window:
|
|
6
|
-
width: 600
|
|
7
|
-
padding: 20
|
|
8
|
-
|
|
9
|
-
lines:
|
|
10
|
-
- prompt: "$ "
|
|
11
|
-
command: "gem install shellfie"
|
|
12
|
-
|
|
13
|
-
- output: |
|
|
14
|
-
Fetching shellfie-0.1.0.gem
|
|
15
|
-
Successfully installed shellfie-0.1.0
|
|
16
|
-
1 gem installed
|
|
17
|
-
|
|
18
|
-
- prompt: "$ "
|
|
19
|
-
command: "shellfie --version"
|
|
20
|
-
|
|
21
|
-
- output: "shellfie 0.1.0"
|
data/examples/theme_macos.png
DELETED
|
Binary file
|
data/examples/theme_ubuntu.png
DELETED
|
Binary file
|
data/examples/theme_windows.png
DELETED
|
Binary file
|
data/shellfie.gemspec
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/shellfie/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "shellfie"
|
|
7
|
-
spec.version = Shellfie::VERSION
|
|
8
|
-
spec.authors = ["Yudai Takada"]
|
|
9
|
-
spec.email = ["t.yudai92@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "Terminal screenshot-style image generator"
|
|
12
|
-
spec.description = "Generate beautiful terminal screenshot-style PNG images and animated GIFs from YAML configuration files. Perfect for README files and documentation."
|
|
13
|
-
spec.homepage = "https://github.com/ydah/shellfie"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 3.0.0"
|
|
16
|
-
|
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
20
|
-
|
|
21
|
-
spec.files = Dir.chdir(__dir__) do
|
|
22
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
23
|
-
(File.expand_path(f) == __FILE__) ||
|
|
24
|
-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
spec.bindir = "exe"
|
|
28
|
-
spec.executables = %w[shellfie shf]
|
|
29
|
-
spec.require_paths = ["lib"]
|
|
30
|
-
|
|
31
|
-
spec.add_dependency "mini_magick", ">= 4.12"
|
|
32
|
-
end
|