scripts for my gemini capsule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
day=$(date +'%j')
day_human=$(date +'%B %d')
echo "# Reading for $day_human"

nt="$(grep "^$day_human" "$1" | cut -f3)"
ot="$(grep "^$day_human" "$1" | cut -f2)"
ps="$(grep "^$day_human" "$1" | cut -f4)"
pr="$(grep "^$day_human" "$1" | cut -f5)"

if [ -e /srv/gemini/gemini.zachdecook.com/oyb/$day.mp3 ]; then
	echo "=> /oyb/$day.mp3 Listen to today's reading by Zach!"
elif [ -e /srv/gemini/gemini.zachdecook.com/oyb/$day.ogg ]; then
	echo "=> /oyb/$day.ogg Listen to today's reading by Zach!"
fi
echo "=>https://audio.oneyearbibleonline.com/ Listen to today's reading by Tom Dooley © MasterMedia Ministries/Tyndale."
cd "$(dirname "$0")"
echo "# Old Testament Reading"
./webp.py "$ot" |grep -v 'text/gemini'
gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$ot"

echo "# New Testament Reading"
./bsb.py "$nt" |grep -v 'xt/ge'
gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$nt"

echo "# Psalm"
./webp.py "$ps" |grep -v 'xt/ge'
gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$ps"

echo "# Proverb"
./net.sh "$pr" | grep -v 'xt/ge'
gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$pr"