doc: add init gif
Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
166a919fee
commit
b01ea779aa
|
@ -6,7 +6,7 @@ hero:
|
||||||
name: "Treefmt"
|
name: "Treefmt"
|
||||||
text: "One CLI to format your repo"
|
text: "One CLI to format your repo"
|
||||||
image:
|
image:
|
||||||
src: /fmt.gif
|
src: /treefmt.gif
|
||||||
alt: Treefmt
|
alt: Treefmt
|
||||||
actions:
|
actions:
|
||||||
- theme: brand
|
- theme: brand
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
BIN
docs/public/init.gif
Normal file
BIN
docs/public/init.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
BIN
docs/public/treefmt.gif
Normal file
BIN
docs/public/treefmt.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -1,24 +0,0 @@
|
||||||
Require treefmt
|
|
||||||
|
|
||||||
Set Shell zsh
|
|
||||||
Set FontSize 11
|
|
||||||
|
|
||||||
Set Theme "Catppuccin Mocha"
|
|
||||||
|
|
||||||
Set Width 320
|
|
||||||
Set Height 220
|
|
||||||
Set Padding 20
|
|
||||||
|
|
||||||
Type "treefmt -c"
|
|
||||||
Sleep 1s
|
|
||||||
Enter
|
|
||||||
|
|
||||||
Sleep 3s
|
|
||||||
Enter
|
|
||||||
Enter
|
|
||||||
Sleep 1s
|
|
||||||
|
|
||||||
Type "treefmt"
|
|
||||||
Enter
|
|
||||||
|
|
||||||
Sleep 5s
|
|
29
docs/vhs/init.tape
Normal file
29
docs/vhs/init.tape
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
Require treefmt
|
||||||
|
Require nano
|
||||||
|
|
||||||
|
Set Shell zsh
|
||||||
|
Set FontSize 14
|
||||||
|
|
||||||
|
Set Theme "Catppuccin Mocha"
|
||||||
|
|
||||||
|
Set Width 720
|
||||||
|
Set Height 360
|
||||||
|
Set Padding 20
|
||||||
|
|
||||||
|
Hide
|
||||||
|
Type "TEMP_DIR=$(mktemp -d) && cd $TEMP_DIR && clear"
|
||||||
|
Enter
|
||||||
|
|
||||||
|
Show
|
||||||
|
Type "treefmt --init"
|
||||||
|
Enter
|
||||||
|
Sleep 2s
|
||||||
|
|
||||||
|
Type "nano treefmt.toml"
|
||||||
|
Enter
|
||||||
|
Sleep 5s
|
||||||
|
|
||||||
|
Ctrl+x
|
||||||
|
|
||||||
|
Hide
|
||||||
|
Type "cd && rm -rf $TEMP_DIR"
|
36
docs/vhs/treefmt.tape
Normal file
36
docs/vhs/treefmt.tape
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
Require rsync
|
||||||
|
Require treefmt
|
||||||
|
|
||||||
|
Set Shell zsh
|
||||||
|
Set FontSize 11
|
||||||
|
|
||||||
|
Set Theme "Catppuccin Mocha"
|
||||||
|
|
||||||
|
Set Width 320
|
||||||
|
Set Height 220
|
||||||
|
Set Padding 20
|
||||||
|
|
||||||
|
Hide
|
||||||
|
Type "TEMP_DIR=$(mktemp -d) && rsync -av $PRJ_ROOT/test/examples/ $TEMP_DIR && cd $TEMP_DIR && clear"
|
||||||
|
Enter
|
||||||
|
Type "alias treefmt='treefmt --allow-missing-formatter' && clear"
|
||||||
|
Enter
|
||||||
|
Show
|
||||||
|
|
||||||
|
Type "treefmt -c"
|
||||||
|
Sleep 1s
|
||||||
|
Enter
|
||||||
|
|
||||||
|
Sleep 3s
|
||||||
|
Enter
|
||||||
|
Enter
|
||||||
|
Sleep 1s
|
||||||
|
|
||||||
|
Type "treefmt"
|
||||||
|
Enter
|
||||||
|
|
||||||
|
Sleep 5s
|
||||||
|
|
||||||
|
Hide
|
||||||
|
Type "cd && rm -rf $TEMP_DIR"
|
||||||
|
Enter
|
36
nix/docs.nix
36
nix/docs.nix
|
@ -51,30 +51,20 @@ _: {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
inherit category;
|
inherit category;
|
||||||
package = pkgs.vhs;
|
name = "vhs";
|
||||||
help = "generate terminal gifs";
|
help = "generate terminal gifs";
|
||||||
}
|
|
||||||
{
|
package = pkgs.writeShellApplication {
|
||||||
category = "docs";
|
name = "gif";
|
||||||
help = "regenerate gifs for docs";
|
runtimeInputs =
|
||||||
package = let
|
[
|
||||||
treefmt = pkgs.writeShellApplication {
|
self'.packages.treefmt
|
||||||
name = "treefmt";
|
pkgs.rsync
|
||||||
runtimeInputs = [self'.packages.treefmt] ++ (import ./formatters.nix pkgs);
|
pkgs.vhs
|
||||||
text = ''
|
]
|
||||||
treefmt -C "$PRJ_ROOT/test/examples" --allow-missing-formatter "$@"
|
++ (import ./formatters.nix pkgs);
|
||||||
'';
|
text = ''vhs "$@"'';
|
||||||
};
|
};
|
||||||
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