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.
This commit is contained in:
parent
45955451d7
commit
0fb0ae1e48
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user