From dbd8ccbe5da2fb06a03c37c8f6cbc2c121b93e61 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Fri, 24 Jan 2025 13:28:46 -0500 Subject: [PATCH] Basic functionality and API call to ESV.org is complete along with the parsing of the returned object to something more presentable. --- README.md | 25 +++++ __pycache__/timeout.cpython-313.pyc | Bin 0 -> 1733 bytes requirements.txt | 8 ++ timeout.py | 26 +++++ verse-time-display.py | 153 ++++++++++++++++++++++++++++ 5 files changed, 212 insertions(+) create mode 100644 README.md create mode 100644 __pycache__/timeout.cpython-313.pyc create mode 100644 requirements.txt create mode 100644 timeout.py create mode 100644 verse-time-display.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..bde0fde --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Bible Clock Project + +As I was thinking about a gift for my partner, I saw an ad on Instagram a few weeks ago that was a simple box with a e-ink screen that simple displays a verse based on the time. So if it is 3:16, the screen would display the verse for a book in the Bible that contains a verse at chapter 3, verse 16. I thought that would be simple enough to build myself and give for her birthday. + +The hardware is pretty easy to conceptualize (subject to change once I start putting wires to hardware): +* ESP powered device +* eInk display +* (optional) RTC sensor + +Since Python is the language I'm the most comfortable with, I've been looking for a project to dip my feet into [Micropython](https://micropython.org/). + +Current status: +* Logic for making an API call to [Crossway's ESV Endpoint](https://api.esv.org/) +* Parse returned JSON to make it more presentable (fixing special characters, closing open quotes, removing footnotes, etc) +* Add timeout decorator for times that are do not commonly have a verse/chapter association (i.e 11:58). +* Remove the 0 for any "xx:0x" timestamp as verses do not have 0s for numbers under 10. + +To Do List: +- [ ] If timeout triggers, display generic verse on screen with the current time +- [ ] Check time every x seconds and run the functions if the time has changed from previous value. +- [ ] Setup micropython files & functions, including display libraries. + +Longer term plans to make this "giftable": +- [ ] Create Wi-Fi SSID & Interface to connect to your own Wi-Fi network +- [ ] Web UI to remove/add specific books from being shown diff --git a/__pycache__/timeout.cpython-313.pyc b/__pycache__/timeout.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dcd14020fddd115eb483d21f06fabd7adb81df3e GIT binary patch literal 1733 zcma)6O>7%g5T3U`jvdxXnji8b;kZ_bvuii0dpEqd zZb1SmCsgIq3Wx|25)~KV1}APvoVcb+5Af0(z2s)$v?@I@v+GUVstBI6GqdyF{Ji;Q zUOSoW1zZEaeO~nyfIsOcT6#xle~iK|6rsr81|D+8S@5rLCEzMo#~=emWde%osy3&F zwp=f2tE^x|E>C#|R-w>$`X5PiER<%IqCNrF7>`$(89O57N+mi(ymJoP!}zm{-Y6r? zhH2BMxMjI^!?7&cYgr9%y;&#Ou&fW7cD=LH zZ&@2PF8q4UbzBd(M=VSDwqL7Qw(s-W)u!(V%i`pj zqE~4)9M>1Qcer=Wsi1HjPdPI_=9VLZ31+uG;u`u02zeA#{7*q@aZbex^hX3$1yMR# zBvYl^V@R&R6}AgyRtBsc!`j7NrL3F-Q(37*#Ue|JGlXCJJtTPr%@j0KXIW^}P%fiB zT!rpn9bE=W5P?)y%23v3vEUSLu5-d=WrktZm8Wv0JcFdl*pmOOtxaO z;JT(NW1?1dn+>UNaD+=H9m3ISI6~M}N07&KdYdPa%YN&9+g(Q-I~A3$MWsDo_bPT> z+fyXRUL*{L-($Jzgk z*KM%@7t~4EVAxWe5{@9U>$0bK>8*vO!m`xuy3HGAOlmf-3K`qH5pwQ`X5Hr_XePCd zrdyFc0s(Q?g`kE{Ba+)4EPHNnduz+#a{B*Z*f~tFi4qdT?tw9QYk6n+>#1+DUuD0~ z-80^}kD8^OrM=O6#@UvlCewe6zqIG?k7w^(zdN429eXhF;+Mu}#@@SM^#49IeslTp zu?lBKL)C8o6G5HvOMD>(zoy0(=2cUX3A%&td37OmN=2AYNE|})5C)Dl#uB$*KL%v27>tbGx%%Dax0^q{{PXlr(+5-ehj50C H1b+VkI!