HexaCone/tools/linkfarmer.sh

133 lines
2.2 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-12 12:33:39 +11:00
TEXTCOL="orange"
STROKOL="darkblue"
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"
2025-01-12 12:33:39 +11:00
local NBRE=180
2025-01-05 10:41:14 +11:00
for foo in $(seq 0 $NBRE)
do
2025-01-12 12:33:39 +11:00
Ypos=$(( 210 - ( foo / 3 ) ))
convert "WS/negatif.png" \
-gravity north \
-font $FONTE \
-pointsize 172 \
-kerning 6 \
-fill $TEXTCOL \
-strokewidth 3 -stroke $STROKOL \
2025-01-08 00:33:26 +11:00
-annotate +0+${Ypos} "HexaCone" \
2025-01-05 10:41:14 +11:00
${TMP}
# identify ${TMP}
addfile ${TMP}
2025-01-12 12:33:39 +11:00
printf "."
2025-01-05 10:41:14 +11:00
done
2025-01-12 12:33:39 +11:00
echo
2025-01-05 10:41:14 +11:00
}
# -------------------------------------------------------
faire_la_fin ()
{
2025-01-12 12:33:39 +11:00
local NBRE=150
datetime=$(LANG=fr date -u +"%Y/%M/%D")
2025-01-08 00:33:26 +11:00
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 \
2025-01-12 12:33:39 +11:00
-kerning 6 \
-fill $TEXTCOL \
-strokewidth 2 -stroke $STROKOL \
2025-01-08 00:33:26 +11:00
-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 \
2025-01-12 12:33:39 +11:00
-annotate +0+270 "${datetime}" \
2025-01-05 10:41:14 +11:00
${TMP}
# identify ${TMP}
addfile ${TMP}
2025-01-12 12:33:39 +11:00
printf "."
2025-01-05 10:41:14 +11:00
done
2025-01-12 12:33:39 +11:00
echo
2025-01-05 10:41:14 +11:00
}
# -------------------------------------------------------
2025-01-08 00:33:26 +11:00
figlet "Link farmer"
2025-01-12 12:33:39 +11:00
rm -f frames/Spool/*.png
2025-01-05 10:41:14 +11:00
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
2025-01-12 12:33:39 +11:00
linkfarm essai
2025-01-05 10:41:14 +11:00
tools/plot-timing.sh
faire_la_fin
ff_encodage Spool full.mp4
2025-01-12 12:33:39 +11:00
echo "linkfarmed $IDX files" | tee -a WS/log
2025-01-05 10:41:14 +11:00