scripts for my gemini capsule
plan: add script for cron to make page with today's readings
Zach DeCook 2021-02-24
parent c3b3e59 · commit e7ec12e
-rw-r--r--makeplan.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/makeplan.sh b/makeplan.sh
new file mode 100644
index 0000000..8853728
--- /dev/null
+++ b/makeplan.sh
@@ -0,0 +1,21 @@
+#!/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)"
+
+echo "# Old Testament Reading"
+gmni "gemini://gemini.zachdecook.com/cgi-bin/esv.sh?$ot"
+
+echo "# New Testament Reading"
+gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$nt"
+
+echo "# Psalm"
+gmni "gemini://gemini.zachdecook.com/cgi-bin/esv.sh?$ps"
+
+echo "# Proverb"
+gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$pr"
+