scripts for my gemini capsule
NET: Use argv
| -rwxr-xr-x | net.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ #!/bin/sh -if [ "$QUERY_STRING" = "" ] +q="$QUERY_STRING$1" +if [ "$q" = "" ] then printf "10 Enter a scripture reference\r\n" return @@ -7,7 +8,7 @@ fi printf "20 text/gemini\r\n" -qs="$(echo "$QUERY_STRING" |sed 's/ /\+/g')" +qs="$(echo "$q" |sed 's/ /\+/g')" printf "=> https://labs.bible.org This content pulled from bible.org.\n" # TODO: use &type=xml&formatting=para req="$(printf 'https://labs.bible.org/api/?passage=%s&type=text' "$qs")" |