commit 1906c66c95ad9a54cf372c6218d0e287eccafa6b
parent 89508a45aedca7ffde34fc4ac871c91f2e825652
Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 10 Aug 2024 09:21:31 +0200
Add slide effects to README.md, fix minor stuff.
Diffstat:
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
@@ -5,6 +5,20 @@ documentation comes in a series of slides. Just do:
$ make && ./catpoint showoff/*.txt
+## Slide Effects
+
+If you want to have some effects between slides, you can run a script or
+application. The argument to catpoint needs to be some executable file.
+
+An example for how to do this is:
+
+ $ catpoint-wrap showoff/random-animation.sh showoff/*.txt
+
+You will need terminaltexteffects from:
+
+ https://github.com/ChrisBuilds/terminaltexteffects
+ $ pip install --user terminaltexteffects
+
## Pointtools
Check out
@@ -17,6 +31,10 @@ How to easily create a presentation for catpoint from some md file is then:
% cat presentation.md | md2point
% catpoint *.txt
+Or simply:
+
+ % dir2point
+
This will greatly speed up your productivity.
## Usage
diff --git a/catpoint-wrap b/catpoint-wrap
@@ -1,5 +1,12 @@
#!/bin/sh -e
+if [ $# -lt 2 ];
+then
+ printf "%s: animation_script.sh slide...\n" \
+ "$(basename "$0")" >&2
+ exit 1
+fi
+
animation_script=$1
shift
diff --git a/showoff/random-animation.sh b/showoff/random-animation.sh
@@ -3,10 +3,12 @@
randomanimation() {
printf '%s\n' beams binarypath blackhole bouncyballs bubbles burn \
colorshift crumble decrypt errorcorrect expand fireworks \
- matrix middleout orbittingvolley overflow pour print rain \
+ middleout orbittingvolley overflow pour print rain \
randomsequence rings scattered slice slide spotlights spray \
swarm synthgrid unstable vhstape waves wipe \
| sort -R | head -n 1
}
+# From: https://github.com/ChrisBuilds/terminaltexteffects
exec tte --frame-rate 400 --input-file "$1" "$(randomanimation)"
+