doc: improve hero gif
Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
7f84bc2e88
commit
b5d095949b
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 FontSize 14
|
||||
Set FontSize 11
|
||||
|
||||
Set Theme "Catppuccin Mocha"
|
||||
|
||||
Set Width 720
|
||||
Set Height 400
|
||||
Set Width 320
|
||||
Set Height 220
|
||||
Set Padding 20
|
||||
|
||||
Type "nix fmt -- -v -c"
|
||||
Type "treefmt -c"
|
||||
Sleep 1s
|
||||
Enter
|
||||
|
||||
Sleep 3s
|
||||
|
||||
Enter
|
||||
Type "nix fmt -- -v"
|
||||
Enter
|
||||
Sleep 1s
|
||||
|
||||
Type "treefmt"
|
||||
Enter
|
||||
|
||||
Sleep 3s
|
||||
Sleep 5s
|
20
nix/docs.nix
20
nix/docs.nix
|
@ -57,14 +57,24 @@ _: {
|
|||
{
|
||||
category = "docs";
|
||||
help = "regenerate gifs for docs";
|
||||
package = let
|
||||
treefmt = pkgs.writeShellApplication {
|
||||
name = "treefmt";
|
||||
runtimeInputs = [self'.packages.treefmt] ++ (import ./formatters.nix pkgs);
|
||||
text = ''
|
||||
treefmt -C "$PRJ_ROOT/test/examples" --allow-missing-formatter "$@"
|
||||
'';
|
||||
};
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = "gifs";
|
||||
command = ''
|
||||
set -xeuo pipefail
|
||||
|
||||
for tape in $PRJ_ROOT/docs/vhs/*; do
|
||||
vhs $tape -o "$PRJ_ROOT/docs/public/$(basename $tape .tape).gif"
|
||||
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