diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-02-22 08:07:24 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-02-22 08:07:24 -0500 |
| commit | b3285ce6bb2f9f257af7755999587e438be4f7f5 (patch) | |
| tree | d09c2c6233300a8249133480a8d35d0a667303ae /esv.sh | |
| parent | 4aa90f0c0cf3400728152a33d20fc8d6d37b6532 (diff) | |
| download | cgi-bin-b3285ce6bb2f9f257af7755999587e438be4f7f5.tar.gz | |
Bible: add esv api wrapper
Diffstat (limited to 'esv.sh')
| -rwxr-xr-x | esv.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/esv.sh b/esv.sh new file mode 100755 index 0000000..e31d721 --- /dev/null +++ b/esv.sh @@ -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" |
