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.
This commit is contained in:
Ratatoskr 2024-02-08 15:59:47 +01:00
parent 59e5ffc91a
commit b1390cb435
Signed by: Ratatoskr
GPG Key ID: 28B77439A6D78F4E

View File

@ -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() {