Support vtv video. - bitreich-conference - Bitreich Conference System
(HTM) git clone git://bitreich.org/bitreich-conference git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-conference
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8a3e9a2bffa8ce7ba588187e121f2a178bcfc2e0
(DIR) parent 7d25178828468555a279887edfc98f5f0a6b11c2
(HTM) Author: Troels Henriksen <athas@sigkill.dk>
Date: Sat, 12 Aug 2023 19:53:02 +0200
Support vtv video.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M bin/bitreich-con-teaser-shell | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/bin/bitreich-con-teaser-shell b/bin/bitreich-con-teaser-shell
@@ -13,11 +13,13 @@ function shell() {
}
adpath="/br/gopher/con/${year}/ads"
+framelines=25
while /bin/true;
do
clear
adfile="${adpath}/$(ls -1 "${adpath}" | shuf -n 1)"
+ nframes=$(( "$(wc -l < "${adfile}")" / $framelines))
i=0
# Change the ad every 30 seconds.
@@ -25,7 +27,7 @@ do
do
tput cup 0 0
tput civis
- cat "$adfile"
+ tail -n +$((1+i%$nframes*$framelines)) "$adfile" | head -n $framelines
# Redisplay every second, in case someone freshly attached.
i=$(($i + 1))