Skip to content

Commit

Permalink
Screencast update (#1445)
Browse files Browse the repository at this point in the history
  • Loading branch information
mre authored Jun 14, 2024
1 parent dedc554 commit 4dde528
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 11 deletions assets/screencast.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/screencast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4dde528

Please sign in to comment.