asciinema_win 0.1.0 → 0.3.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 +96 -0
- data/LICENSE +21 -0
- data/README.md +645 -575
- data/docs/architecture.md +113 -0
- data/docs/cheat-sheet.md +80 -0
- data/docs/customization.md +141 -0
- data/docs/example.md +350 -0
- data/docs/how-to-use.md +153 -0
- data/docs/test-report.md +165 -0
- data/docs/troubleshooting.md +94 -0
- data/docs/windows-notes.md +87 -0
- data/exe/asciinema_win +18 -17
- data/lib/asciinema_win/ansi_parser.rb +437 -437
- data/lib/asciinema_win/asciicast.rb +567 -537
- data/lib/asciinema_win/cli.rb +604 -591
- data/lib/asciinema_win/export.rb +1412 -780
- data/lib/asciinema_win/output_organizer.rb +276 -276
- data/lib/asciinema_win/player.rb +348 -348
- data/lib/asciinema_win/recorder.rb +519 -480
- data/lib/asciinema_win/screen_buffer.rb +371 -375
- data/lib/asciinema_win/themes.rb +334 -334
- data/lib/asciinema_win/version.rb +6 -6
- data/lib/asciinema_win/win32_screen.rb +119 -0
- data/lib/asciinema_win.rb +156 -153
- data/lib/rich/_palettes.rb +148 -148
- data/lib/rich/box.rb +342 -342
- data/lib/rich/cells.rb +524 -512
- data/lib/rich/color.rb +631 -628
- data/lib/rich/color_triplet.rb +227 -220
- data/lib/rich/console.rb +604 -549
- data/lib/rich/control.rb +332 -332
- data/lib/rich/json.rb +260 -254
- data/lib/rich/layout.rb +314 -314
- data/lib/rich/markdown.rb +531 -509
- data/lib/rich/markup.rb +186 -175
- data/lib/rich/panel.rb +318 -311
- data/lib/rich/progress.rb +430 -430
- data/lib/rich/segment.rb +387 -387
- data/lib/rich/style.rb +464 -433
- data/lib/rich/syntax.rb +1220 -1145
- data/lib/rich/table.rb +547 -525
- data/lib/rich/terminal_theme.rb +126 -126
- data/lib/rich/text.rb +460 -433
- data/lib/rich/tree.rb +232 -220
- data/lib/rich/version.rb +5 -5
- data/lib/rich/win32_console.rb +620 -859
- data/lib/rich.rb +108 -108
- metadata +22 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e135bbf64620bb1818be3cd474223855079130ad94cd33d45f82298fe9c708d
|
|
4
|
+
data.tar.gz: 0f5ffd8f7b6689d6fadd78722f8e37c12e4ed76acf9c1be5aad5d094972aa25d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 876966d6061438ca7739f62fda22cf433f9743eb9885ec5039bf1b793af4c9e0c778b55895aaf7a6bdcb01b06cb507b6e2d0fccfaed99ef7fd65b769245930b8
|
|
7
|
+
data.tar.gz: 964d98367843b1ec2421ccf51731a0a951345c2f8232c710393a522525dd23dd38395dec06c2dbe0210a563def95df2b9dd9670f51c9844104b6adea8dd4c992
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.1] - 2026-05-29
|
|
9
|
+
|
|
10
|
+
Repair release. Re-integrates the rebuilt Rich library and fixes the bugs that
|
|
11
|
+
left the gem unloadable and unable to record.
|
|
12
|
+
|
|
13
|
+
### Fixed — the gem loads and records again
|
|
14
|
+
- **Load failure.** `require_relative "rich"` pointed at a `lib/rich` that no
|
|
15
|
+
longer existed, so `require "asciinema_win"` raised `LoadError`. The fixed
|
|
16
|
+
Rich library is vendored back into `lib/` (`lib/rich.rb` + `lib/rich/**`), so
|
|
17
|
+
the require resolves and the gem packages Rich again (zero runtime deps).
|
|
18
|
+
- **Recording was broken.** The capture loop called
|
|
19
|
+
`Rich::Win32Console.capture_screen_buffer`, which the rebuilt Rich no longer
|
|
20
|
+
provides. Console cell-reading now lives in `AsciinemaWin::Win32Screen`
|
|
21
|
+
(binding `ReadConsoleOutputCharacterW` + `ReadConsoleOutputAttribute`), so it
|
|
22
|
+
is owned by the recorder and can never be dropped again when Rich is
|
|
23
|
+
re-vendored. Output matches the previously-working implementation, with added
|
|
24
|
+
UTF-16→UTF-8 hardening and non-negative cursor/width clamping.
|
|
25
|
+
|
|
26
|
+
### Fixed — correctness
|
|
27
|
+
- Interactive recording control keys did nothing on Windows: the loop used
|
|
28
|
+
cooked `$stdin.ready?`/`getc` and treated Ctrl+D as EOF (Unix behavior), but
|
|
29
|
+
the Windows console is line-buffered and Ctrl+D is not EOF. Keys are now read
|
|
30
|
+
one keystroke at a time with `IO#getch` (raw mode), so **Ctrl+D** (stop) and
|
|
31
|
+
**Ctrl+M/Enter** (marker) work; Ctrl+C/Ctrl+Z also stop cleanly. Markers now
|
|
32
|
+
print an immediate on-screen confirmation (they were previously written
|
|
33
|
+
silently, which read as "the key does nothing").
|
|
34
|
+
- `Asciicast.load` opened a file but had no block form and leaked the handle;
|
|
35
|
+
it now accepts a block (yields the reader, auto-closes) and `Reader` gained
|
|
36
|
+
`#close`/`#closed?`. A malformed header no longer leaks the open file.
|
|
37
|
+
- `AsciinemaWin.cat` emitted screen-control escapes (`\e[2J\e[H\e[?25l`) because
|
|
38
|
+
it used the timing `Player`; it now uses `RawPlayer`, so piping a `.cast`
|
|
39
|
+
yields clean output (consistent with the `cat` CLI command).
|
|
40
|
+
- `Export.ffmpeg_available?` now uses array-form `system` (no shell): paths with
|
|
41
|
+
spaces work and `FFMPEG_PATH` cannot be used for shell injection.
|
|
42
|
+
|
|
43
|
+
### Fixed — vendored Rich rendering
|
|
44
|
+
- `Rich::Tree` printed label markup literally (`[blue]lib/[/]` instead of a blue
|
|
45
|
+
`lib/`). Labels are now parsed through `Markup.parse` with the node style as
|
|
46
|
+
the base, so tree labels render with color like every other component. Fixed
|
|
47
|
+
in both the vendored copy and the upstream `rich-ruby` source (+ a regression
|
|
48
|
+
test) so re-vendoring keeps the fix. This regression was caught by
|
|
49
|
+
regenerating the demo GIF.
|
|
50
|
+
- `examples/rich_ruby_demo.rb` no longer crashes when `get_size` returns nil
|
|
51
|
+
(no attached console); it falls back to 100×40.
|
|
52
|
+
|
|
53
|
+
### Changed — tests, packaging, docs
|
|
54
|
+
- Regenerated `rich_demo.gif` from the current renderer (Panel, Table, Tree,
|
|
55
|
+
Syntax, Progress, and color palette all render correctly).
|
|
56
|
+
- Removed eight stale copies of Rich's own test files from `test/`; repurposed
|
|
57
|
+
`test_helper` for asciinema and added `ScreenBuffer`/`Win32Screen` integration
|
|
58
|
+
tests. Suite: 56 runs, 204 assertions, green on Ruby 3.4.
|
|
59
|
+
- Gemspec: dropped the redundant `homepage_uri` metadata key and added a `#!`
|
|
60
|
+
line to `exe/asciinema_win` (both silenced `gem build` warnings).
|
|
61
|
+
- Updated `docs/architecture.md` to reflect the `Win32Screen` split.
|
|
62
|
+
|
|
63
|
+
## [0.2.0] - 2025-12-27
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
- **FFmpeg Video Export**: Convert `.cast` recordings to GIF, MP4, and WebM
|
|
67
|
+
- Pure Ruby PPM frame renderer with embedded 8x16 VGA bitmap font
|
|
68
|
+
- 2-pass palette optimization for high-quality GIF output
|
|
69
|
+
- H.264 encoding for MP4 (libx264, yuv420p, CRF 23)
|
|
70
|
+
- VP9 encoding for WebM (libvpx-vp9, CRF 30)
|
|
71
|
+
- **New CLI Options**: `--fps`, `--theme`, `--scale` for video export
|
|
72
|
+
- **Video Export Test Suite**: `examples/video_export_test.rb` with comprehensive edge case testing
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
- **Rich::Tree markup rendering**: Labels with markup like `[blue]text[/]` now correctly parse to ANSI escape codes instead of rendering as literal text
|
|
76
|
+
- **Unicode characters in video export**: Added block elements (█ ░ ▒ ▓), box-drawing characters, and symbols (✓ ✗ ▶) to embedded font for proper progress bar and table rendering
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
- Updated gemspec description with video export capabilities
|
|
80
|
+
- Updated README with video export documentation
|
|
81
|
+
|
|
82
|
+
### Dependencies
|
|
83
|
+
- FFmpeg required for video export (optional, native formats work without it)
|
|
84
|
+
|
|
85
|
+
## [0.1.0] - 2025-12-24
|
|
86
|
+
|
|
87
|
+
### Initial Release
|
|
88
|
+
- Native Windows terminal recording with Win32 Console APIs
|
|
89
|
+
- Asciicast v2 format support (compatible with asciinema.org)
|
|
90
|
+
- Export formats: HTML, SVG, Text, JSON
|
|
91
|
+
- 9 terminal themes (asciinema, dracula, monokai, nord, tokyo-night, etc.)
|
|
92
|
+
- Rich-Ruby integration for beautiful terminal formatting
|
|
93
|
+
- Speed adjustment and idle compression
|
|
94
|
+
- Recording concatenation
|
|
95
|
+
- Thumbnail generation
|
|
96
|
+
- Zero external dependencies for core functionality
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 tigel-agm
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|