HexaCone/tools/linkfarmer.sh

123 lines
2.0 KiB
Bash
Raw Normal View History

2025-01-05 10:41:14 +11:00
#!/bin/bash
set -e ; set -u
IDX=0
SPOOL="frames/Spool"
SEQNAME="none"
TMP="WS/tmp.png"
2025-01-08 00:33:26 +11:00
FONTE="Palatino-Bold"
2025-01-05 10:41:14 +11:00
source tools/fonctions.sh
# -------------------------------------------------------
# /!\ this function just copy the
# file to the spool dir, so
# you can use it for tmp pics.
#
addfile ()
{
src="$1"
dstname=$(printf "%s/%05d.png" $SPOOL $IDX)
# echo "$src -> $dstname"
# ln --force --symbolic $src $dstname
cp -f $src $dstname
IDX=$(( IDX + 1 ))
}
# -------------------------------------------------------
linkfarm ()
{
SRC="frames/$1"
echo "linkfarm $SRC" | tee -a WS/log
local NBRE=30
for foo in $(seq 0 $NBRE)
do
addfile "$SRC/00000.png"
done
for src in "$SRC"/*
do
addfile $src
done
for foo in $(seq 0 $NBRE)
do
addfile "$SRC/00359.png"
done
}
# -------------------------------------------------------
faire_le_titre ()
{
echo "faire le titre"
local NBRE=190
for foo in $(seq 0 $NBRE)
do
2025-01-08 00:33:26 +11:00
Ypos=$(( 210 - ( foo / 2 ) ))
2025-01-05 10:41:14 +11:00
convert "WS/negatif.png" \
-gravity north \
2025-01-08 00:33:26 +11:00
-font $FONTE \
-pointsize 172 \
-fill black \
-strokewidth 2 -stroke gray90 \
-annotate +0+${Ypos} "HexaCone" \
2025-01-05 10:41:14 +11:00
${TMP}
# identify ${TMP}
addfile ${TMP}
done
}
# -------------------------------------------------------
faire_la_fin ()
{
local NBRE=120
2025-01-08 00:33:26 +11:00
datetime=$(LANG=fr date -u)
echo $datetime | tee -a WS/log
2025-01-05 10:41:14 +11:00
for foo in $(seq 0 $NBRE)
do
Ypos=$(( foo + 100 ))
convert "WS/negatif.png" \
-gravity north \
2025-01-08 00:33:26 +11:00
-font $FONTE \
-pointsize 86 \
-fill Black \
-strokewidth 2 -stroke gray90 \
-annotate +0+${Ypos} "tTh des Bourtoulots" \
2025-01-05 10:41:14 +11:00
-pointsize 48 \
2025-01-08 00:33:26 +11:00
-strokewidth 1 \
-gravity south \
-annotate +0+170 "${datetime}" \
2025-01-05 10:41:14 +11:00
${TMP}
# identify ${TMP}
addfile ${TMP}
done
}
# -------------------------------------------------------
2025-01-08 00:33:26 +11:00
figlet "Link farmer"
2025-01-05 10:41:14 +11:00
rm frames/Spool/*.png
tools/plot-timing.sh
faire_le_titre
linkfarm hexabenz
2025-01-08 00:33:26 +11:00
linkfarm escadrille
2025-01-05 10:41:14 +11:00
linkfarm topview
linkfarm passage
linkfarm scene
2025-01-08 00:33:26 +11:00
linkfarm orbite
# linkfarm essai
2025-01-05 10:41:14 +11:00
tools/plot-timing.sh
faire_la_fin
ff_encodage Spool full.mp4