blob: 3dea6e023d6e8aa3293b22ac07cb00f9cc13048d (
plain)
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
55
56
|
#!/bin/bash
LANG=nb_NO
# Makefront av Hans-Petter "Atluxity" Fjeld <atluxity@gmail.com>
# CC-BY-SA 3.0
echo "Startet Makefront, laget for NUUG 2009."
#Lag et unikt filnavn å spytte ut
count=0
while [ -e NUUG-vid_front${count}.png ]; do
count=`expr ${count} + 1`
done
echo "Output til filen NUUG-vid_front${count}.png..."
#Starte med å putte NUUG-logoen på video-bakgrunnen.
composite -geometry +52+167 NUUG-logo-2-150.png NUUG-vid_bg.png NUUG-vid_front${count}.png
echo "Laget trinn 1 av 3..."
#Putte CC-BY-SA-logoen på der igjen
composite -geometry +632+770 cc-by-sa.png NUUG-vid_front${count}.png NUUG-vid_front${count}.png
echo "Laget trinn 2 av 3..."
#Sette opp standard innhold i variabler for debugging
#presenter="Foredragsholder"
#title="Tittel"
#timeplace="Tid og sted"
#Spør om input til variabler
echo "Skriv inn navnet på foredragsholder: "
read presenter
echo "Skriv inn tittelen til foredraget: "
read title
echo "Skriv inn tid for foredraget: (`date +%d.\ %B\ %Y`)"
read time
if [ -z "${time}" ] ; then
time=`date +%d.\ %B\ %Y`
fi
echo "Skriv inn sted for foredraget: "
read place
if [ -z "${place}" ] ; then
timeplace="${time}"
else
timeplace="${time} - ${place}"
fi
#Sette tekst på bildet
echo "Setter teksten på bildet..."
convert NUUG-vid_front${count}.png -pointsize 72 -fill white -draw "text 400,167 '${presenter}'" -draw "text 400,267 '${title}'" -pointsize 40 -draw "text 400,567 '${timeplace}'" NUUG-vid_front${count}.png
echo "Laget trinn 3 av 3."
echo "Makefront avslutter"
exit
|