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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -2
  3. data/README.md +258 -97
  4. data/lib/shellfie/animation_frame_builder.rb +31 -7
  5. data/lib/shellfie/animation_timeline.rb +2 -1
  6. data/lib/shellfie/ansi_line_buffer.rb +20 -4
  7. data/lib/shellfie/ansi_normalizer.rb +18 -8
  8. data/lib/shellfie/ansi_parser.rb +120 -7
  9. data/lib/shellfie/cassette.rb +76 -0
  10. data/lib/shellfie/cli.rb +65 -2
  11. data/lib/shellfie/cli_authoring.rb +233 -0
  12. data/lib/shellfie/cli_generate.rb +244 -40
  13. data/lib/shellfie/cli_info.rb +106 -6
  14. data/lib/shellfie/cli_run.rb +167 -0
  15. data/lib/shellfie/config.rb +5 -1
  16. data/lib/shellfie/config_defaults.rb +21 -2
  17. data/lib/shellfie/config_validation.rb +93 -4
  18. data/lib/shellfie/dependency_checker.rb +74 -3
  19. data/lib/shellfie/errors.rb +1 -0
  20. data/lib/shellfie/ffmpeg_encoder.rb +46 -0
  21. data/lib/shellfie/font_resolver.rb +11 -1
  22. data/lib/shellfie/gif_generator.rb +157 -11
  23. data/lib/shellfie/gif_palette.rb +8 -4
  24. data/lib/shellfie/html_renderer.rb +54 -0
  25. data/lib/shellfie/line_layout.rb +19 -10
  26. data/lib/shellfie/output_writer.rb +7 -2
  27. data/lib/shellfie/parser.rb +82 -19
  28. data/lib/shellfie/parser_validation.rb +48 -15
  29. data/lib/shellfie/render_geometry.rb +2 -1
  30. data/lib/shellfie/render_segment.rb +17 -5
  31. data/lib/shellfie/renderer.rb +28 -11
  32. data/lib/shellfie/rendering/text_painter.rb +23 -15
  33. data/lib/shellfie/rendering/window_chrome.rb +2 -2
  34. data/lib/shellfie/reproducibility_manifest.rb +41 -0
  35. data/lib/shellfie/session.rb +111 -0
  36. data/lib/shellfie/session_config.rb +562 -0
  37. data/lib/shellfie/session_runner.rb +689 -0
  38. data/lib/shellfie/svg_renderer.rb +222 -0
  39. data/lib/shellfie/terminal_screen.rb +389 -0
  40. data/lib/shellfie/text_metrics.rb +74 -15
  41. data/lib/shellfie/transcript_renderer.rb +92 -0
  42. data/lib/shellfie/version.rb +1 -1
  43. data/lib/shellfie/yaml_safety.rb +147 -0
  44. data/lib/shellfie.rb +8 -1
  45. data/schema/shellfie-v1.schema.json +153 -0
  46. data/schema/shellfie-v2.schema.json +262 -0
  47. metadata +27 -24
  48. data/.rspec +0 -3
  49. data/Rakefile +0 -8
  50. data/docs/.nojekyll +0 -0
  51. data/docs/index.html +0 -205
  52. data/docs/scripts.js +0 -85
  53. data/docs/styles.css +0 -507
  54. data/examples/animation.yml +0 -33
  55. data/examples/colored.yml +0 -20
  56. data/examples/demo.gif +0 -0
  57. data/examples/demo.png +0 -0
  58. data/examples/demo_animation.yml +0 -31
  59. data/examples/headless.png +0 -0
  60. data/examples/headless.yml +0 -16
  61. data/examples/scrolling.yml +0 -48
  62. data/examples/simple.yml +0 -21
  63. data/examples/theme_macos.png +0 -0
  64. data/examples/theme_ubuntu.png +0 -0
  65. data/examples/theme_windows.png +0 -0
  66. data/shellfie.gemspec +0 -32
@@ -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-1.0.0.gem
15
- Successfully installed shellfie-1.0.0
16
- 1 gem installed
17
-
18
- - prompt: "$ "
19
- command: "shellfie --version"
20
-
21
- - output: "shellfie 1.0.0"
Binary file
Binary file
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