scripts for my gemini capsule
Bible reading plan: Add Professor Grant Horner's plan
Zach DeCook 2022-10-19
parent 8cf204e · commit 1714465
-rw-r--r--chapterN.py12
-rw-r--r--horner.sh64
2 files changed, 76 insertions, 0 deletions
diff --git a/chapterN.py b/chapterN.py
new file mode 100644
index 0000000..0f11adf
--- /dev/null
+++ b/chapterN.py
@@ -0,0 +1,12 @@
+import bible
+import sys
+def main(n, books):
+ for book in books:
+ cc = len(bible.find_book(book)[1]['verse_counts'])
+ if n <= cc:
+ return book + " " + str(n)
+ n = n - cc
+
+
+if __name__ == '__main__':
+ print(main(int(sys.argv[1]), sys.argv[2:]))
diff --git a/horner.sh b/horner.sh
new file mode 100644
index 0000000..4de1c52
--- /dev/null
+++ b/horner.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+day="$(($(date +%s) / (60*60*24)))"
+
+# Gospels
+echo "# 1. The Gospel"
+gs="$(python chapterN.py $(($day % 89 +1)) Matthew Mark Luke John)"
+./oeb.py "$gs" |grep -v 'xt/ge'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$gs"
+
+# Moses
+echo "# 2. The Law"
+ms="$(python chapterN.py $(($day % 187 +1)) Genesis Exodus Leviticus Numbers Deuteronomy)"
+./webp.py "$ms" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$ms"
+
+# 3. Major Pauline
+echo "# 3. Major Epistle"
+pl="$(python chapterN.py $(($day % 78 +1)) Romans "1 Corinthians" "2 Corinthians" Galatians Ephesians Philipians Colossians Hebrews)"
+./webp.py "$pl" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$pl"
+
+# 4. Minor Epistles
+echo "# 4. Minor Epistle"
+me="$(python chapterN.py $(($day % 65 +1)) "1 Thessalonians" "2 Thessalonians" "1 Timothy" "2 Timothy" Titus Philemon James "1 Peter" "2 Peter" "1 John" "2 John" "3John" Jude Revelation)"
+./webp.py "$me" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$me"
+
+
+# 5. Job Eccl SoS
+echo "# 5. Wisdom"
+pt="$(python chapterN.py $(($day % 62 +1)) Job Ecclesiastes "Song of Solomon")"
+./webp.py "$pt" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$pt"
+
+# 6. Psalms
+echo "# 6. Psalm"
+ps="Psalm $(($day % 150 +1))"
+./oeb.py "$ps" |grep -v 'xt/ge'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$ps"
+
+# 7. Proverbs
+echo "# 7. Proverbs"
+pr="Proverbs $(($day % 31 +1))"
+./lsv.py "$pr" | grep -v 'xt/ge'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$pr"
+
+# Writings
+echo "# 8. History"
+wr="$(python chapterN.py $(($day % 249 +1)) Joshua Judges Ruth "1 Samuel" "2 Samuel" "1 Kings" "2 Kings" "1 Chronicles" "2 Chronicles" Ezra Nehemiah Esther)"
+./webp.py "$wr" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$wr"
+
+# 9. Prophets
+echo "# 9. Prophecy"
+py="$(python chapterN.py $(($day % 250 +1)) Isaiah Jeremiah Lamentation Ezekial Daniel Hosea Joel Amos Obadiah Jonah Micah Nahum Habakkuk Zephaniah Haggai Zechariah Malachi)"
+./webp.py "$py" |grep -v 'xt/gemini'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$py"
+
+# 10. Acts
+
+echo "# 10. Acts"
+ac="Acts $(($day % 28 +1))"
+./oeb.py "$ac" |grep -v 'xt/ge'
+gmni "gemini://songs.zachdecook.com/searchVerse.gmi?$ac"