2015-02-08 12:13:45 +01:00
|
|
|
#!/bin/bash
|
|
|
|
if [ ! -z $1 ]
|
|
|
|
then
|
|
|
|
loops=$1
|
|
|
|
else
|
|
|
|
loops=1
|
|
|
|
fi
|
|
|
|
i=0
|
|
|
|
while [ $i -lt $loops ]
|
|
|
|
do
|
|
|
|
ikeaname=$(./ikeagen.py)
|
2015-02-08 12:16:54 +01:00
|
|
|
text=$(shuf -n 1 adj.txt)
|
2015-02-08 12:13:45 +01:00
|
|
|
# adj_count=$(shuf -i 0-2 -n 1)
|
2015-02-08 12:16:54 +01:00
|
|
|
adj_count=$(python -c "import random;print '{:1.0f}'.format(round(random.gauss(3.0,3.0)))")
|
2015-02-08 12:13:45 +01:00
|
|
|
a=0
|
|
|
|
while [ $a -lt $adj_count ]
|
|
|
|
do
|
|
|
|
if [ $(shuf -i 0-4 -n 1) == "0" ]
|
|
|
|
then
|
2015-02-08 12:16:54 +01:00
|
|
|
adj="with $(shuf -n 1 adj.txt)"
|
2015-02-08 12:13:45 +01:00
|
|
|
else
|
|
|
|
adj=$(shuf -n 1 adj.txt)
|
|
|
|
fi
|
|
|
|
text="$text $adj"
|
|
|
|
((a++))
|
|
|
|
done
|
2015-02-08 12:16:54 +01:00
|
|
|
echo "$ikeaname: $text"
|
|
|
|
echo "$ikeaname: $text" | festival --tts
|
2015-02-08 12:13:45 +01:00
|
|
|
((i++))
|
|
|
|
done
|