From 0fb0ae1e486cdde02985ebe85384547aa9c80552 Mon Sep 17 00:00:00 2001 From: Ratatoskr Date: Tue, 6 Feb 2024 17:38:20 +0100 Subject: [PATCH] Refactor directory comment, update file opening command, and improve German MP3 creation comment in generate_mp3.sh: - Refactored a directory comment in the script for clarity. - Updated the file opening command to use the correct path (/sdcard/handout.html). - Improved the comment explaining the creation of German MP3 files. --- generate_mp3.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generate_mp3.sh b/generate_mp3.sh index c70904e..1140e06 100644 --- a/generate_mp3.sh +++ b/generate_mp3.sh @@ -19,12 +19,11 @@ category_order=("date" "time") # Directories txt_dir="/data/scripts/.text" mp3_dir="/data/scripts/.mp3" - # remove old files rm -f "$txt_dir"/*complete.txt # open handout.md file -am start --user 0 -a android.intent.action.VIEW -d file:///data/local/tmp/file.txt -t text/plain +am start --user 0 -a android.intent.action.VIEW -d file:///sdcard/handout.html -t text # Function to create MP3 files create_mp3_files() { @@ -34,7 +33,7 @@ create_mp3_files() { base_filename=$(basename "$file" .txt) # File name without path and extension if [[ $file == *de.txt ]]; then - # If it's a German file, create a German MP3 + # If it's a German file, create a German MP3 /data/data/com.termux/files/usr/bin/gtts-cli -l de "$text" --output "$mp3_dir/$base_filename.mp3" echo "$text" >> "$txt_dir/de_complete.txt" echo "German MP3 file created: $base_filename.mp3"