scripts for my gemini capsule
Bible: add esv api wrapper
| -rwxr-xr-x | esv.sh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#!/bin/sh +if [ "$QUERY_STRING" = "" ] +then + printf "10 Enter a scripture reference\r\n" + return +fi + +printf "20 text/gemini\r\n" + +qs="$(echo "$QUERY_STRING" |sed 's/ /\+/g')" +printf "=> http://www.esvapi.org This page's contents pulled from esvapi.org.\n#" +req="$(printf 'http://www.esvapi.org/v2/rest/passageQuery?key=TEST&passage=%s&include-headings=false&output-format=plain-text&include-verse-numbers=false&include-footnotes=false&line-length=0&include-first-verse-numbers=false&include-passage-horizontal-lines=false&include-heading-horizontal-lines=false&include-subheadings=false' "$qs")" +#echo $req +curl "$req" |