diff --git a/Sapo.sh b/Sapo.sh index 087d8a7..a141b4f 100755 --- a/Sapo.sh +++ b/Sapo.sh @@ -45,7 +45,8 @@ sed -i 's/^\.$//g' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # get rid of sed -i "s/^'//g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt #get rid of ' at start of line sed -i 's/^Ey /A /g' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # A's at line start are usually articles, not capitals #sed -i 's/\,/\n/3' "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # delimit to 3rd occurence of , -sed -i "s/—/ — /g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # put spaces around —, to not interfere with pronunciation +#sed -i "s/—/ — /g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # put spaces around —, to not interfere with pronunciation +sed -i "s/—/\,/g" "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt # convert — to , ##################extra delimit to comma and space ################################### DELIM=$(cat "$DIRECTORY""Sapo_""$NAME"/"$NAME"sentenced.txt|wc -l) while [ $DELIM -ge 1 ] @@ -220,7 +221,7 @@ do ;; 1) GO=true;exit ;; - 2) celluloid "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & + 2) if [[ -e "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV ]];then celluloid "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV & ; else notify-send "There is no file ""$DIRECTORY""Sapo_""$NAME"/"$ERROR_WAV"".";fi ;; 3) s="$(yad --entry --width="600" --text="This is the original text of the line $ERROR_TEXT_LINE. Edit as you wish, then hit OK to render." --entry-text="$TEXT_TO_CORRECT" --window-icon=$HOME/git/sapo/sapo.png --title="Line $ERROR_TEXT_LINE - $NAME")";tts --text "$s" --out_path "$DIRECTORY""Sapo_""$NAME"/$ERROR_WAV