add helper scripts

This commit is contained in:
Your Name
2025-12-07 14:59:30 +00:00
parent 0e9e8d3450
commit bb221e5072
2 changed files with 22 additions and 0 deletions

5
generate.sh Executable file
View File

@@ -0,0 +1,5 @@
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
do
./make-svg.sh $i
ffmpeg -i $i.svg -vf "scale=800:600" -pix_fmt argb -r 30 -f rawvideo $i.dat
done

17
make-svg.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# usage: ./make-svg.sh 123 → creates 123.svg in the current directory
NUM=$1 # the number (or any text) you want inside the SVG
OUT="${NUM}.svg" # name the file after the number (change if you wish)
# --- 1⃣ Write the SVG XML directly ------------------------------------------------
printf '%s\n' \
'<?xml version="1.0" encoding="UTF-8"?>' \
'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="100">' \
' <style>text{font-family:Arial,Helvetica,sans-serif; font-size:48px; fill:#fff;}</style>' \
' <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle">' \
"$NUM" \
' </text>' \
'</svg>' > "$OUT"
echo "✅ SVG written to $OUT"