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:
parent
59e5ffc91a
commit
b1390cb435
@ -14,16 +14,21 @@ export PATH=$PATH:/data/data/com.termux/files/usr/bin
|
|||||||
|
|
||||||
# Array with the desired languages in order
|
# Array with the desired languages in order
|
||||||
lang_order=("es" "de" "es-l")
|
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
|
# Directories
|
||||||
txt_dir="/data/scripts/.text"
|
txt_dir="/sdcard/.text"
|
||||||
mp3_dir="/data/scripts/.mp3"
|
mp3_dir="/sdcard/.mp3"
|
||||||
# remove old files
|
# remove old files
|
||||||
rm -f "$txt_dir"/*complete.txt
|
rm -f "$txt_dir"/*complete.txt
|
||||||
|
|
||||||
# open handout.md file
|
# 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
|
# Function to create MP3 files
|
||||||
create_mp3_files() {
|
create_mp3_files() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user