Skip to content

Commit e21e998

Browse files
committed
πŸ“(project) add demo GIFs that run examples
Thanks to VHS, we now script every documentation example by generating a GIF that shows the command output.
1 parent dfb0421 commit e21e998

37 files changed

+284
-433
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/guidelines.md

β€ŽMakefileβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# -- General
22
SHELL := /bin/bash
33

4+
# -- Docs
5+
DOCS_TAPES_PATH = scripts/docs
6+
DOCS_GIFS_PATH = docs/img/tapes
7+
DOCS_TAPES = $(wildcard $(DOCS_TAPES_PATH)/*.tape)
8+
DOCS_GIFS = $(addprefix $(DOCS_GIFS_PATH)/,$(patsubst %.tape,%.gif,$(notdir $(DOCS_TAPES))))
9+
410
# ==============================================================================
511
# RULES
612

@@ -9,6 +15,11 @@ default: help
915
docs/openapi.json:
1016
uv run onzr openapi > docs/openapi.json
1117

18+
$(DOCS_GIFS_PATH)/%.gif: $(DOCS_TAPES_PATH)/%.tape
19+
@echo -e "---\nπŸ“Ό $< β†’ $@"
20+
# Unset MAILCHECK to avoid notification in generated GIFs
21+
unset MAILCHECK; uv run vhs $< -o $@
22+
1223
# -- Build
1324
bootstrap: ## bootstrap the project for development
1425
bootstrap: \
@@ -20,6 +31,11 @@ build: ## install project
2031
uv sync --locked --all-extras --dev
2132
.PHONY: build
2233

34+
docs-gifs: ## compile all tapes included in the docs
35+
docs-gifs: $(DOCS_GIFS)
36+
@echo "βœ… Documentation GIFs updated"
37+
.PHONY: docs-gifs
38+
2339
docs-serve: ## run documentation server
2440
# Force OpenAPI schema generation
2541
uv run onzr openapi > docs/openapi.json

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
This project is still at an early stage. It works in its core parts, but
1111
will not meet standard requirements for a decent player.
1212

13-
![Onzr Demo VHS](https://vhs.charm.sh/vhs-3CduAqZ4CVFSJSre52MFik.gif)
13+
![Onzr Demo VHS](https://vhs.charm.sh/vhs-6cGaxSq0RKCq7ELvYDItWy.gif)
1414

1515
## Requirements
1616

β€Ždocs/commands.mdβ€Ž

Lines changed: 16 additions & 354 deletions
Large diffs are not rendered by default.

β€Ždocs/contribute.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Contributing to Onzr requires the following dependencies to be installed:
55
- [GNU Make](https://www.gnu.org/software/make/)
66
- [`uv`](https://docs.astral.sh/uv/)
77
- [VLC](https://www.videolan.org/vlc/)
8+
- [VHS](https://github.com/charmbracelet/vhs)
89

910
!!! Note
1011

β€Ždocs/img/quick-start.gifβ€Ž

1.85 MB
Loading

β€Ždocs/img/tapes/cmd-album.gifβ€Ž

517 KB
Loading
145 KB
Loading
80.7 KB
Loading
120 KB
Loading

0 commit comments

Comments
Β (0)