add helper scripts
This commit is contained in:
5
generate.sh
Executable file
5
generate.sh
Executable 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
17
make-svg.sh
Executable 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"
|
||||||
Reference in New Issue
Block a user