Điểm qua asciinema/asciicast2gif: 1.2k sao trên GitHub, viết chủ yếu bằng CSS, thuộc nhóm Image Tools. Generate GIF animations from asciicasts (asciinema recordings)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
In the end the approach it took didn't work well in many cases and it was hard to optimize further. Therefore I won't be putting any more work into it.
See its successor instead: https://github.com/asciinema/agg
asciicast2gif
asciicast2gif is a tool for generating GIF animations from
asciicast files
recorded by asciinema.
How it works
Here's how the asciicast->GIF conversion is implemented.
asciicast2gif shell script parses command line arguments and executes Node.js script
(main.js). main.js loads asciicast (either from remote URL or local
filesystem), generates text representation of the screen for each frame
using asciinema-player's
virtual terminal emulator, and sends it to PhantomJS-based renderer script
(renderer.js), which saves PNG screenshots to a temporary directory. Finally,
main.js calls ImageMagick's convert on these PNG images to construct GIF
animation, also piping it to gifsicle to get the final, optimized GIF file.
Note, asciicast2gif doesn't capture screenshots at a fixed frame-rate (e.g. 30 FPS)
like alternative tools. Instead, it generates PNG files for
each screen update, and specifies delay for every image individually (convert -delay <delay-a> 0.png -delay <delay-b> 1.png -delay <delay-c> 2.png ...). When
the screen is idle there're no screenshots generated. This saves disk space and
makes it less work for both convert and gifsicle, while resulting in smaller
GIF file.
Installation
You can install asciicast2gif with npm, use it via Docker image, or build it
from source.
npm package
To install asciicast2gif using npm run:
npm install --global asciicast2gif
Following runtime dependencies need to be also installed:
ImageMagick
giflossy (or gifsicle)
Docker image
You can use asciicast2gif through official asciicast2gif Docker
image (automated build on
Docker Hub from this repository).
Pull the image:
docker pull asciinema/asciicast2gif
Use it like this:
docker run --rm -v $PWD:/data asciinema/asciicast2gif [options and arguments...]
You need to mount some local directory at /data so input and output files can
be accessed by the container. Mounting current working directory ($PWD) makes
most sense in majority of cases.
For example, generating GIF from local file, with double speed and Solarized
theme:
asciinema/asciicast2gif có 1.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/asciinema/asciicast2gif. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
asciinema/asciicast2gif có những chủ đề gì?
GitHub topics của asciinema/asciicast2gif: "gif", "terminal-recording". TopGit xếp repo vào nhóm Image Tools.
asciinema/asciicast2gif còn đang phát triển không?
Commit gần nhất trên asciinema/asciicast2gif là 4.3 năm trước (theo timestamp GitHub). Repo có 79 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
asciinema/asciicast2gif viết bằng ngôn ngữ gì?
asciinema/asciicast2gif chủ yếu viết bằng CSS. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Cùng nhóm Image Tools còn repo nào?
asciinema/asciicast2gif thuộc nhóm Image Tools trên TopGit, cùng 2 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về asciinema/asciicast2gif ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/asciinema/asciicast2gif là nguồn chính thức.
Vì sao asciinema/asciicast2gif được xếp vào nhóm Image Tools?
TopGit xếp asciinema/asciicast2gif vào nhóm Image Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "gif", "terminal-recording"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về asciicast2gif?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về asciicast2gif.