doc: improve hero gif

Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
Brian McGee 2024-05-01 12:00:12 +01:00
parent 2f557e364a
commit 17f354b880
Signed by: brianmcgee
GPG Key ID: D49016E76AD1E8C0
3 changed files with 30 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,20 +1,24 @@
Require nix Require treefmt
Set Shell zsh Set Shell zsh
Set FontSize 14 Set FontSize 11
Set Theme "Catppuccin Mocha" Set Theme "Catppuccin Mocha"
Set Width 720 Set Width 320
Set Height 400 Set Height 220
Set Padding 20
Type "nix fmt -- -v -c" Type "treefmt -c"
Sleep 1s
Enter Enter
Sleep 3s Sleep 3s
Enter Enter
Type "nix fmt -- -v" Enter
Sleep 1s
Type "treefmt"
Enter Enter
Sleep 3s Sleep 5s

View File

@ -57,14 +57,24 @@ _: {
{ {
category = "docs"; category = "docs";
help = "regenerate gifs for docs"; help = "regenerate gifs for docs";
name = "gifs"; package = let
command = '' treefmt = pkgs.writeShellApplication {
set -xeuo pipefail name = "treefmt";
runtimeInputs = [self'.packages.treefmt] ++ (import ./formatters.nix pkgs);
for tape in $PRJ_ROOT/docs/vhs/*; do text = ''
vhs $tape -o "$PRJ_ROOT/docs/public/$(basename $tape .tape).gif" treefmt -C "$PRJ_ROOT/test/examples" --allow-missing-formatter "$@"
done '';
''; };
in
pkgs.writeShellApplication {
name = "gifs";
runtimeInputs = [treefmt];
text = ''
for tape in "$PRJ_ROOT"/docs/vhs/*; do
vhs "$tape" -o "$PRJ_ROOT/docs/public/$(basename "$tape" .tape).gif"
done
'';
};
} }
]; ];
}; };