scripts for my gemini capsule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
case "$PATH_INFO" in
"")
printf '20 text/gemini\r\n'
curl https://audio.oneyearbible.com/ | grep mp3 |sed 's/href="/\t/g' |cut -f2 |cut -d '"' -f1 | sed 's/^/=>/g'
;;
*.mp3)
printf "20 audio/mpeg\r\n"
curl --output - "https://audio.oneyearbible.com/$PATH_INFO"
;;
*)
printf '20 text/gemini\r\n'
printf '=> https://audio.oneyearbible.com/%s' "$PATH_INFO"
;;
esac
|