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
#!/bin/sh
day=$(date +%j)
echo "# Day $day/365"

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

if [ -e /srv/gemini.zachdecook.com/oyb/$day.mp3 ]; then
	echo "=> /oyb/$day.mp3 Listen to today's reading by Zach!"
elif [ -e /srv/gemini.zachdecook.com/oyb/$day.ogg ]; then
	echo "=> /oyb/$day.ogg Listen to today's reading by Zach!"
fi
echo "=>/cgi-bin/aoyb.sh/tomdooley/$(date +%m%d).mp3 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'
gcat "gemini://songs.zachdecook.com/searchVerse.gmi?$ot" | grep -v '^51\ ' | grep -v '^20\ '

echo "# New Testament Reading"
./oeb.py "$nt" |grep -v 'xt/ge'
gcat "gemini://songs.zachdecook.com/searchVerse.gmi?$nt" | grep -v '^51\ ' | grep -v '^20\ '

echo "# Psalm"
./oeb.py "$ps" |grep -v 'xt/ge'
gcat "gemini://songs.zachdecook.com/searchVerse.gmi?$ps" | grep -v '^51\ ' | grep -v '^20\ '

echo "# Proverb"
./lsv.py "$pr" | grep -v 'xt/ge'
gcat "gemini://songs.zachdecook.com/searchVerse.gmi?$pr" | grep -v '^51\ ' | grep -v '^20\ '