1
0
Fork 0
mirror of https://github.com/Findus23/nonsense.git synced 2024-09-19 16:03:50 +02:00

Branch "english" hinzugefügt

This commit is contained in:
Findus23 2015-02-08 12:16:54 +01:00
parent fe427c8552
commit 4f21c5fa38
3 changed files with 7 additions and 25 deletions

View file

@ -6,43 +6,25 @@ else
loops=1
fi
i=0
function nomen {
if [ $(shuf -i 0-10 -n 1) == "1" ]
then
praf=$(shuf -n 1 präf.txt)
echo "$praf$(nomen)"
elif [ $(shuf -i 0-10 -n 1) == "2" ]
then
suf=$(shuf -n 1 suf.txt)
echo "$(nomen)$suf"
else
echo $(shuf -n 1 nomen.txt)
fi
}
while [ $i -lt $loops ]
do
ikeaname=$(./ikeagen.py)
text=$(nomen)
text=$(shuf -n 1 adj.txt)
# adj_count=$(shuf -i 0-2 -n 1)
adj_count=$(python -c "import random;print '{:1.0f}'.format(round(random.gauss(1.0,1.0)))")
adj_count=$(python -c "import random;print '{:1.0f}'.format(round(random.gauss(3.0,3.0)))")
a=0
while [ $a -lt $adj_count ]
do
if [ $(shuf -i 0-4 -n 1) == "0" ]
then
adj="mit $(shuf -n 1 nomen.txt)"
adj="with $(shuf -n 1 adj.txt)"
else
adj=$(shuf -n 1 adj.txt)
fi
text="$text $adj"
((a++))
done
if [ ! -z $2 ] && [ $2 == "tex-export" ]
then
echo "$ikeaname & $text \\\\"
else
echo -e "$ikeaname:\t$text"
# espeak -vde+m2 "$ikeaname: $text"
fi
echo "$ikeaname: $text"
echo "$ikeaname: $text" | festival --tts
((i++))
done

View file

@ -2,7 +2,7 @@
import random
import sys
table= [ [ 0 for i in range(2210) ] for j in range(2210) ]
table= [ [ 0 for i in range(221) ] for j in range(221) ]
contents = open("ikeaname.txt").read().splitlines()
anzahl=0
for name in contents:

View file

@ -4,7 +4,7 @@ rm descr.txt
for i in {0..25}
do
wget -O download.tmp http://www.ikea.com/at/de/catalog/productsaz/$i/
wget -O download.tmp http://www.ikea.com/gb/en/catalog/productsaz/$i/
grep "productsAzLink" download.tmp > lines.tmp
while read line; do
name=$(echo $line | xmllint --xpath 'string(//a)' -)