Screencast update (#1445)

This commit is contained in:
Matthias Endler 2024-06-15 01:27:52 +02:00 committed by GitHub
parent dedc554eda
commit 4dde5288d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 13 deletions

View file

@ -55,4 +55,6 @@ doc: ## Open documentation
.PHONY: screencast
screencast: ## Create a screencast for the docs
svg-term --command 'assets/screencast.sh' --out 'assets/screencast.svg' --width 100 --padding 10 --window
termsvg rec --command=assets/screencast.sh recording.asc
termsvg export --minify recording.asc --output=assets/screencast.svg
rm recording.asc

18
assets/screencast.sh Normal file → Executable file
View file

@ -4,18 +4,12 @@
# https://github.com/marionebl/svg-term-cli
# https://github.com/sharkdp/fd/blob/master/doc/screencast.sh
#
# Designed to be executed via svg-term from the lychee root directory:
# svg-term --command="bash assets/screencast.sh" --out assets/screencast.svg --padding=10
# Then run this (workaround for https://github.com/sharkdp/fd/issues/1003):
# sed -i '' 's/<text/<text font-size="1.67"/g' assets/screencast.svg
# Designed to be executed via termsvg from the lychee root directory
set -e
set -u
PROMPT=""
# Always use latest version of lychee for screencast
alias lychee="cargo run --"
enter() {
INPUT=$1
DELAY=1
@ -40,14 +34,16 @@ type() {
main() {
IFS='%'
enter "lychee README.md"
enter "lychee --verbose README.md"
enter "lychee https://lychee.cli.rs"
enter "lychee --verbose --format=json fixtures/TEST.html"
enter "lychee --verbose --format=json fixtures/TEST.html | jq"
enter "lychee --no-progress --format detailed https://example.com"
enter "lychee --no-progress --mode emoji --format detailed https://example.com"
enter "lychee --dump --include github -- './**/*.md'"
prompt
sleep 3

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 953 KiB