summaryrefslogtreecommitdiffstats
path: root/tools/intro
blob: d437197a81914b762ff387a293838bf42d7c0904 (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
#!/bin/bash
#
# Date:    2009-12-10
# Author:  Ole Kristian Lien
# License: GNU General Public License
#
# Generate intro-file with fade in/out from csv-file

EXT=`echo "$1"|awk -F . '{print $NF}'`
BASENAME=`basename $1 .$EXT`
COUNT="1"

LOGO=`./csv $2 $1 logo`
WHAT=`./csv $2 $1 what`
DATE=`./csv $2 $1 date`
LOCATION=`./csv $2 $1 location`
TITLE=`./csv $2 $1 title`
NAME=`./csv $2 $1 name`
LICENSE=`./csv $2 $1 license`

if [ -z "$2" ]; then
	echo "Usage: $0 <video-file> <csv-file>"
	exit 1
fi

echo -n " * Generating intro-video..."

# LOGO
./image_logo $1 intro-$COUNT white $LOGO
./fade $BASENAME-intro-$COUNT.png 3 white
rm $BASENAME-intro-$COUNT.png
COUNT=`expr $COUNT + 1`

# SLIDE 1
./image_text $1 intro-$COUNT white "$WHAT" "$DATE - $LOCATION"
./fade $BASENAME-intro-$COUNT.png 3 white
rm $BASENAME-intro-$COUNT.png
COUNT=`expr $COUNT + 1`

# SLIDE 2
./image_text $1 intro-$COUNT white "$TITLE" "$NAME"
./fade $BASENAME-intro-$COUNT.png 3 white
rm $BASENAME-intro-$COUNT.png
COUNT=`expr $COUNT + 1`

# LICENSE
cp $LICENSE.png $BASENAME-intro-$COUNT.png
./fade $BASENAME-intro-$COUNT.png 3 white
rm $BASENAME-intro-$COUNT.png

./image2video $1 intro
rm $BASENAME-intro-*.png

echo -e "OK!"