summaryrefslogtreecommitdiff
path: root/update_index.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update_index.sh')
-rwxr-xr-xupdate_index.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/update_index.sh b/update_index.sh
index f675188..61a0e03 100755
--- a/update_index.sh
+++ b/update_index.sh
@@ -6,13 +6,18 @@ dir=${1:-}
filepath=$(du -a $dir | awk '($1 > 50) {print $2}' | shuf -n 1)
echo "$filepath"
-mpv "$filepath"
-cp "$filepath" todays_audio.opus
+cp "$filepath" /home/grail/projects/web/dynamic-web-page/todays_audio.opus
-whisper --model medium --language de --device cpu todays_audio.opus
+whisper --model medium --language de --device cpu /home/grail/projects/web/dynamic-web-page/todays_audio.opus
phrase=$(cat todays_audio.opus.txt)
-./replace_phrase.sh "$phrase"
+phrase=$(echo $phrase | tr "\n" " ")
+/home/grail/projects/web/dynamic-web-page/get_sd_image.sh "$phrase"
+/home/grail/projects/web/dynamic-web-page/replace_phrase.sh "$phrase"
-./get_sd_image.sh "$phrase"
+# in case of error go back
+# cp audio.bak todays_audio.opus
+
+cp "$filepath" /home/grail/projects/web/grailblog/src/todays_audio.opus
+rsync -rPha /home/grail/projects/web/grailblog/src hostiko:/var/www