Fichiers
TEMA_OT/сгенерировать|generate

27 lignes
613 B
Bash
Fichiers exécutables
Brut Lien permanent Annotations Historique

Ce fichier contient des caractères Unicode ambigus.

Ce fichier contient des caractères Unicode qui peuvent être confondus avec d'autres caractères. Si vous pensez que c'est intentionnel, vous pouvez ignorer cet avertissement. Utilisez le bouton Échappe pour les dévoiler.

#!/bin/bash
SRC="фон-128.png"
makeTexture()
{
src=$1
id=$2
char=$3
dst="${id}.png"
convert -pointsize 20 -draw "text 30,85 '$char'" $src $dst
}
# Первые 34 группы фишек, по 4 каждой в поле.
for i in {1..34}; do
echo $i
makeTexture $SRC $(printf '%02d' $i) $i
done
# Оставшиеся 8 фишек, по одной в поле.
makeTexture $SRC 35 "|ц"
makeTexture $SRC 36 "|ц|"
makeTexture $SRC 37 "||ц|"
makeTexture $SRC 38 "||ц||"
makeTexture $SRC 39 "|с"
makeTexture $SRC 40 "|с|"
makeTexture $SRC 41 "||с|"
makeTexture $SRC 42 "||с||"