docs: make more vhs tapes

This commit is contained in:
Daylin Morgan 2023-03-08 03:28:07 -06:00
parent 9b5296036d
commit ff110f0829
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
5 changed files with 50 additions and 7 deletions

View file

@ -22,11 +22,13 @@ install: ## symlink to $PREFIX
uninstall: ## delete $(PREFIX)/viv
rm $(PREFIX)/viv
docs: docs/demo.gif docs/freeze.gif ## generate usage examples
TAPES = demo freeze list-info-rm
GIFS := $(foreach n, $(TAPES), docs/$(n).gif)
docs: $(GIFS) ## generate usage examples
docs/%.gif: docs/%.tape
viv rm $$(viv l -q)
vhs < $<
cd docs; vhs < $*.tape
clean: ## remove build artifacts
rm -rf {build,dist}

11
docs/demo.py Normal file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python3
__import__("viv").activate("pyfiglet==0.8.post1") # noqa
from pyfiglet import Figlet
if __name__ == "__main__":
f = Figlet(font="slant")
figtxt = f.renderText("viv").splitlines()
figtxt[-2] += " isn't venv!"
print("\n".join(figtxt))

View file

@ -1,12 +1,12 @@
Set Height 750
Set Width 1500
Set Theme "Catppuccin Mocha"
Output ./docs/demo.gif
Output ./demo.gif
Type "viv list"
Enter
Sleep 2s
Type "python examples/cli.py --help"
Type "python ../examples/cli.py --help"
Enter
Sleep 10s
Type "viv list"
@ -15,9 +15,9 @@ Sleep 3s
Type "viv info 841"
Enter
Sleep 3s
Type "python examples/cli.py hello 'prospective viv user!'"
Type "python ../examples/cli.py hello 'prospective viv user!'"
Enter
Sleep 2s
Type "python examples/cli.py goodbye 'prospective viv user!'"
Type "python ../examples/cli.py goodbye 'prospective viv user!'"
Enter
Sleep 2s

View file

@ -1,7 +1,7 @@
Set Height 750
Set Width 1500
Set Theme "Catppuccin Mocha"
Output ./docs/freeze.gif
Output ./freeze.gif
Type "viv freeze --help"
Enter

30
docs/list-info-rm.tape Normal file
View file

@ -0,0 +1,30 @@
Set Height 750
Set Width 1500
Set Theme "Catppuccin Mocha"
Output ./list-info-rm.gif
Type "cat demo.py"
Enter
Sleep 500ms
Type "python demo.py"
Enter
Sleep 3s
Type "viv list -h"
Enter
Sleep 500ms
Type "viv list -q"
Enter
Sleep 1s
Type "viv info -h"
Enter
Sleep 500ms
Type "viv info "
Sleep 1s
Type "f8"
Enter
Sleep 1s
Type "viv remove -h"
Enter
Type "viv rm f8"
Enter
Sleep 2s