doc: improve hero gif
Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
cc88b8a61a
commit
6898fdfdfe
Binary file not shown.
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 33 KiB |
|
@ -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
|
26
nix/docs.nix
26
nix/docs.nix
|
@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Reference in New Issue
Block a user