From b1390cb43564d75d62e9ed385352d15e022f2ee2 Mon Sep 17 00:00:00 2001 From: Ratatoskr Date: Thu, 8 Feb 2024 15:59:47 +0100 Subject: [PATCH] Enhance generate_mp3.sh script - Add 'weather' to category_order array to include weather information in the generated MP3 files. - Create directories /sdcard/.mp3/ and /sdcard/.text/ to store MP3 and text files respectively. - Update txt_dir and mp3_dir paths to use /sdcard/ instead of /data/scripts/. - Modify the 'am start' command to open handout.html in a Chromium tabbed activity for better compatibility. - Remove unnecessary commented-out am start command and replace it with an updated command. - Improve comments for better script understanding. --- generate_mp3.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/generate_mp3.sh b/generate_mp3.sh index 1140e06..b2c7d1d 100644 --- a/generate_mp3.sh +++ b/generate_mp3.sh @@ -14,16 +14,21 @@ export PATH=$PATH:/data/data/com.termux/files/usr/bin # Array with the desired languages in order lang_order=("es" "de" "es-l") -category_order=("date" "time") +category_order=("date" "time" "weather") + +# Create Directories +mkdir -p /sdcard/.mp3/ +mkdir -p /sdcard/.text/ # Directories -txt_dir="/data/scripts/.text" -mp3_dir="/data/scripts/.mp3" +txt_dir="/sdcard/.text" +mp3_dir="/sdcard/.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:///sdcard/handout.html -t text +#am start --user 0 -a android.intent.action.VIEW -d content://pl.solidexplorer2.files/storage/emulated/0/.text/handout.html -t text/html +am start --user 0 -n org.bromite.chromium/org.chromium.chrome.browser.ChromeTabbedActivity -d content://pl.solidexplorer2.files/storage/emulated/0/.text/handout.html -t text/html # Function to create MP3 files create_mp3_files() {