-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_example_media.sh
54 lines (45 loc) · 1.29 KB
/
generate_example_media.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -e
cd $(dirname $(realpath $0))
rm -rf media
mkdir media
cd media
generateImage() {
convert -size 1920x1080 xc:black +repage -size 1720x880 -fill white -background None -font Helvetica -gravity center caption:"$2" +repage -gravity Center -composite -strip $1.jpg
}
echo "Generating borrel menu..."
generateImage "borrel-menu" "Borrel menu"
echo "Generating implicit arrangement example..."
ARRANGEMENT="example_implicit"
mkdir $ARRANGEMENT
cd $ARRANGEMENT
for i in $(seq 1 5); do
generateImage "$i" "example implicit: Image $i"
done
cd ..
echo "Generating hidden arrangement example..."
ARRANGEMENT=".example_hidden"
mkdir $ARRANGEMENT
cd $ARRANGEMENT
for i in $(seq 1 5); do
generateImage "$i" "example hidden: Image $i"
done
cd ..
echo "Generating numbered arrangement examples..."
for j in $(seq 1 5); do
echo " - $j..."
mkdir "${j}_example_numbered"
cd "${j}_example_numbered"
ARRANGEMENT="numbered #$j"
for i in $(seq 1 5); do
generateImage "$i" "$ARRANGEMENT: Image $i"
done
echo "title: \"$ARRANGEMENT\"" > arrangement.yaml
echo "items:" >> arrangement.yaml
for i in $(seq 5 -1 1); do
echo "- file: $i.jpg" >> arrangement.yaml
echo " duration: 2" >> arrangement.yaml
done
cd ..
done
echo "Done!"