//' | sed 's/<\/i>//' | sed 's/.*ds-single\">\([^<]*\)<.*/\1/')
illustration=$(echo "$raw_ideoms" | sed 's/.*class=illustration>\([^<]*\)<.*/\1/')
if [[ $ideom ]]; then
echo -e "$C_GRAY_RED_RAW"Ideom:$C_NORMAL
echo $ideom
[[ $illustration ]] && echo $illustration
fi
else
ency_link=$(echo "$list" | grep -o 'http://encyclopedia2[^"]*')
if [[ $ency_link ]]; then
raw_ency=$(curl -s --user-agent "$useragent" $httpsproxy -x "$httpproxy" "$ency_link")
ency=$(echo "$raw_ency" | grep '
' | grep -o 'div>.*
/'$(tput bold)'/g' -e 's/<\/b>/'$C_NORMAL'/g' | sed 's/div>\([^<]*\).*/\1/')
contr_ency=$(echo "$raw_ency" | grep "Contrast with" | sed 's/.*\">\([^<]*\)<\/a.*/\1/')
if [[ $ency ]]; then
echo -e "$C_GRAY_RED_RAW"Ideom:$C_NORMAL
echo "$ency"
[[ $contr_ency ]] && echo -e Contrast with: "$C_BRIGHT_RAW"$contr_ency"$C_NORMAL"
fi
fi
fi
fi
fi
fi
fi #end of english dictionary
[[ $fl_raw ]] && echo -e "$fl" #empty line... cant fix it (:'d #google fixed text output
else #cache output
cat "$cachefile" #output
[[ $source == en ]] && echo -e "$C_DARK_BLUE_RAW"http://oxforddictionaries.com/definition/english/"$request"$C_NORMAL
fi
#sound
if [[ $sound == 1 ]]; then
wait
if [[ -e "$cachefile".mp3 ]]; then
if [[ $(stat -c%s "$cachefile".mp3) -ge 11000 ]]; then #if .mp3 is corrrect
stat=$(mpg123 "$cachefile".mp3 2>&1)
# echo "$stat"
[[ ! $(echo "$stat" | grep -o 'Comment') ]] && rm "$cachefile".mp3
else
rm "$cachefile".mp3
echo ".mp3 file is corrupt. try again."
fi
else
#echo ".mp3 file not found."
sleep 1 #to be able Ctrl+C to delete cache file
fi
fi
fi
exit
#rest languages for interface. not in list of source language
#hl=ak Akan
#hl=bem Bemba
#hl=bh Bihari
#hl=xx-bork Bork, bork, bork!
#hl=bs Bosnian
#hl=br Breton
#hl=km Cambodian
#hl=chr Cherokee
#hl=ny Chichewa
#hl=zh-TW Chinese (Traditional)
#hl=co Corsican
#hl=xx-elmer Elmer Fudd
#hl=ee Ewe
#hl=fy Frisian
#hl=gaa Ga
#hl=gn Guarani
#hl=xx-hacker Hacker
#hl=ha Hausa
#hl=haw Hawaiian
#hl=ig Igbo
#hl=ia Interlingua
#hl=jw Javanese
#hl=kk Kazakh
#hl=rw Kinyarwanda
#hl=rn Kirundi
#hl=xx-klingon Klingon
#hl=kg Kongo
#hl=kri Krio (Sierra Leone)
#hl=ku Kurdish
#hl=ckb Kurdish (SoranĂ®)
#hl=ky Kyrgyz
#hl=ln Lingala
#hl=loz Lozi
#hl=lg Luganda
#hl=ach Luo
#hl=mg Malagasy
#hl=ml Malayalam
#hl=mi Maori
#hl=mr Marathi
#hl=mfe Mauritian Creole
#hl=mo Moldavian
#hl=mn Mongolian
#hl=sr-ME Montenegrin
#hl=ne Nepali
#hl=pcm Nigerian Pidgin
#hl=nso Northern Sotho
#hl=nn Norwegian (Nynorsk)
#hl=oc Occitan
#hl=or Oriya
#hl=om Oromo
#hl=ps Pashto
#hl=xx-pirate Pirate
#hl=pt-BR Portuguese (Brazil)
#hl=pt-PT Portuguese (Portugal)
#hl=pa Punjabi
#hl=qu Quechua
#hl=rm Romansh
#hl=nyn Runyakitara
#hl=gd Scots Gaelic
#hl=sh Serbo-Croatian
#hl=st Sesotho
#hl=tn Setswana
#hl=crs Seychellois Creole
#hl=sn Shona
#hl=sd Sindhi
#hl=si Sinhalese
#hl=so Somali
#hl=es-419 Spanish (Latin American)
#hl=su Sundanese
#hl=tg Tajik
#hl=tt Tatar
#hl=ti Tigrinya
#hl=to Tonga
#hl=lua Tshiluba
#hl=tum Tumbuka
#hl=tk Turkmen
#hl=tw Twi
#hl=ug Uighur
#hl=uz Uzbek
#hl=wo Wolof
#hl=xh Xhosa
#hl=yo Yoruba
#hl=zu Zulu
#comment="arr=googlearr;
#for (var c = 0; c < arr.length; c++){ //testing
# if(typeof arr[c] !== 'undefined' && arr[c] !== null){ //dictionary output
# for (var i = 0; i < arr[c].length; i++){
# if(typeof arr[c][i] !== 'undefined' && arr[c][i] !== null){
# for (var e = 0; e < arr[c][i].length; e++){
# print(c);
# print(arr[c][i][e]);
# //print(arr[8][0][1]);
# }
# }
# }
# }
#}
# frequency experiment whitespace=' ' //for x.x and xxx format
# num2=Math.round(num*10000)/10;
# if (num2 < 10 && num2%1 == 0){
# whitespace=' '; //for x format
# }
# if (num2 >= 10){
# num2=Math.round(num2/10)*10;
# if (num2 < 100){
# whitespace=' '; //for xx format
# }
# }
# print(num2+whitespace+arr[1][a][2][b][0]+' '+arr[1][a][2][b][1]);//frequency + word + variant of speach
#"