Created
July 20, 2022 02:30
-
-
Save makyo/cf7aab68f9969e4c7076bcc0d5fab41a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
howlong=`python -c "howlong = float($(cat $@ | espeak --stdout|wc --bytes)) / 44000.0 / 60;print('%d minutes, %d seconds' % (int(howlong), int((howlong - int(howlong)) * 100 * (3/5))))"` | |
echo "st TOLEDOT" | |
sleep 0.1 | |
echo "st -------" | |
sleep 0.1 | |
echo -e "st Toledot is book 2 in the Post-Self cycle. Book 1, Qoheleth, was read a while back, but if you missed it, you can find it at https://qoheleth.post-self.ink where you can purchase ebooks, paperbacks, listen to it as a podcast, or read it for free in the browser. Toledot is available at https://toledot.post-self.ink\nCW: the occasional well-placed curse word (I've tried to reduce them)" | |
sleep 0.1 | |
echo "st Tonight's chapter will take $howlong to read." | |
echo "st -------" | |
sleep 6 | |
cat $@ | while read -r line; do | |
words=`echo "$line" | wc -w` | |
if [ $words -gt 0 ]; then | |
bytes=`espeak "$line" --stdout | wc --bytes` | |
seconds=`python -c "print(float($bytes) / 44000.0)"` | |
echo "st $line" | |
sleep $seconds | |
fi | |
done | |
echo ":steps down." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment