Compare commits
2 commits
4d6f09578a
...
71d6b5f0d4
Author | SHA1 | Date | |
---|---|---|---|
71d6b5f0d4 | |||
21cad9b6df |
5 changed files with 147 additions and 0 deletions
0
bash/feed-reader.sh
Normal file → Executable file
0
bash/feed-reader.sh
Normal file → Executable file
100
bash/scripts.org
100
bash/scripts.org
|
@ -48,11 +48,111 @@ i already know that to build the spectrometer is out of the scope of what i can
|
|||
-c:a copy \
|
||||
output.mp4
|
||||
#+end_src
|
||||
|
||||
** check dependencies
|
||||
#+begin_src shell :tangle check-dependencies.sh
|
||||
#!/bin/bash
|
||||
|
||||
# Abort if any command fails.
|
||||
set -e
|
||||
|
||||
# Check for presence of a command.
|
||||
# $1 is name of dependency
|
||||
# $2 is command that gets run to check for it
|
||||
# eg. check "disroot.org reachable?" "ping disroot.org"
|
||||
check() {
|
||||
echo -n "Checking for $1... "
|
||||
|
||||
if eval $2 &> /dev/null ; then
|
||||
echo ✔︎
|
||||
false
|
||||
else
|
||||
echo ✗
|
||||
storytime_ready=false
|
||||
true
|
||||
fi
|
||||
}
|
||||
|
||||
# assume ready until proven otherwise
|
||||
storytime_ready=true
|
||||
|
||||
if check "cron" "crontab -l"; then
|
||||
echo " Please install cron."
|
||||
fi
|
||||
|
||||
if check "mimic3" "mimic3 --version"; then
|
||||
echo " Please install mimic3."
|
||||
echo " Via pip: pip3 install mycroft-mimic3-tts[all]"
|
||||
fi
|
||||
|
||||
if check "ffmpeg 7" "ffmpeg -version | grep \"ffmpeg version 7\""; then
|
||||
echo " Please install ffmpeg ~7."
|
||||
fi
|
||||
|
||||
if check "feed2exec" "feed2exec"; then
|
||||
echo " Please install feed2exec."
|
||||
echo " Via pip: pip3 install feed2exec"
|
||||
fi
|
||||
|
||||
# final check for readiness
|
||||
if $storytime_ready; then
|
||||
echo -e "\nReady for Storytime!"
|
||||
else
|
||||
echo -e "\nStorytime is not ready to go. Please install the missing dependencies."
|
||||
fi
|
||||
#+end_src
|
||||
* one big ole rube goldberg spaghetti mess
|
||||
surely this can actually be written as one script.
|
||||
|
||||
#+begin_src shell :tangle storytime.sh
|
||||
#!/bin/bash
|
||||
# Abort if any command fails.
|
||||
set -e
|
||||
|
||||
# Check for presence of a command.
|
||||
# $1 is name of dependency
|
||||
# $2 is command that gets run to check for it
|
||||
# eg. check "disroot.org reachable?" "ping disroot.org"
|
||||
check() {
|
||||
echo -n "Checking for $1... "
|
||||
|
||||
if eval $2 &> /dev/null ; then
|
||||
echo ✔︎
|
||||
false
|
||||
else
|
||||
echo ✗
|
||||
storytime_ready=false
|
||||
true
|
||||
fi
|
||||
}
|
||||
|
||||
# assume ready until proven otherwise
|
||||
storytime_ready=true
|
||||
|
||||
if check "cron" "crontab -l"; then
|
||||
echo " Please install cron."
|
||||
fi
|
||||
|
||||
if check "mimic3" "mimic3 --version"; then
|
||||
echo " Please install mimic3."
|
||||
echo " Via pip: pip3 install mycroft-mimic3-tts[all]"
|
||||
fi
|
||||
|
||||
if check "ffmpeg 7" "ffmpeg -version | grep \"ffmpeg version 7\""; then
|
||||
echo " Please install ffmpeg ~7."
|
||||
fi
|
||||
|
||||
if check "feed2exec" "feed2exec"; then
|
||||
echo " Please install feed2exec."
|
||||
echo " Via pip: pip3 install feed2exec"
|
||||
fi
|
||||
|
||||
# final check for readiness
|
||||
if $storytime_ready; then
|
||||
echo -e "\nReady for Storytime!"
|
||||
else
|
||||
echo -e "\nStorytime is not ready to go. Please install the missing dependencies."
|
||||
fi
|
||||
figlet "Fetching feed items."
|
||||
figlet "Reading into an audio file."
|
||||
figlet "Mixing video."
|
||||
|
|
|
@ -1,4 +1,51 @@
|
|||
#!/bin/bash
|
||||
# Abort if any command fails.
|
||||
set -e
|
||||
|
||||
# Check for presence of a command.
|
||||
# $1 is name of dependency
|
||||
# $2 is command that gets run to check for it
|
||||
# eg. check "disroot.org reachable?" "ping disroot.org"
|
||||
check() {
|
||||
echo -n "Checking for $1... "
|
||||
|
||||
if eval $2 &> /dev/null ; then
|
||||
echo ✔︎
|
||||
false
|
||||
else
|
||||
echo ✗
|
||||
storytime_ready=false
|
||||
true
|
||||
fi
|
||||
}
|
||||
|
||||
# assume ready until proven otherwise
|
||||
storytime_ready=true
|
||||
|
||||
if check "cron" "crontab -l"; then
|
||||
echo " Please install cron."
|
||||
fi
|
||||
|
||||
if check "mimic3" "mimic3 --version"; then
|
||||
echo " Please install mimic3."
|
||||
echo " Via pip: pip3 install mycroft-mimic3-tts[all]"
|
||||
fi
|
||||
|
||||
if check "ffmpeg 7" "ffmpeg -version | grep \"ffmpeg version 7\""; then
|
||||
echo " Please install ffmpeg ~7."
|
||||
fi
|
||||
|
||||
if check "feed2exec" "feed2exec"; then
|
||||
echo " Please install feed2exec."
|
||||
echo " Via pip: pip3 install feed2exec"
|
||||
fi
|
||||
|
||||
# final check for readiness
|
||||
if $storytime_ready; then
|
||||
echo -e "\nReady for Storytime!"
|
||||
else
|
||||
echo -e "\nStorytime is not ready to go. Please install the missing dependencies."
|
||||
fi
|
||||
figlet "Fetching feed items."
|
||||
figlet "Reading into an audio file."
|
||||
figlet "Mixing video."
|
||||
|
|
0
bash/tts-to-file.sh
Normal file → Executable file
0
bash/tts-to-file.sh
Normal file → Executable file
0
bash/video-builder.sh
Normal file → Executable file
0
bash/video-builder.sh
Normal file → Executable file
Loading…
Reference in a new issue