diff options
| author | Zach DeCook <zachdecook@librem.one> | 2021-02-27 22:14:09 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2021-02-27 22:14:09 -0500 |
| commit | 279f8c6c79f29b4009a7448fdecbc7f9a36a0c1d (patch) | |
| tree | 54d187eb40f9716ecbe1ba1927027d40d305007e | |
| parent | 42543a360631a47aa0308fafb198d4fe27e182fd (diff) | |
| download | cgi-bin-279f8c6c79f29b4009a7448fdecbc7f9a36a0c1d.tar.gz | |
oeb and lsv: newline changes, use in makeplan
| -rwxr-xr-x | lsv.py | 4 | ||||
| -rw-r--r-- | makeplan.sh | 4 | ||||
| -rwxr-xr-x | oeb.sh | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lsv.py b/lsv.py index 64857ab..98d1207 100755 --- a/lsv.py +++ b/lsv.py @@ -5,12 +5,12 @@ import os import sys def printf(line): - if line: + if line.strip(): notref = ' '.join(line.split(' ')[2:]).strip() notref = notref.replace('||', "\n") print(notref, end=' ') else: - print('') + print() def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) diff --git a/makeplan.sh b/makeplan.sh index 942c550..2a02d03 100644 --- a/makeplan.sh +++ b/makeplan.sh @@ -8,13 +8,13 @@ ps="$(grep "^$day" "$1" | cut -f4)" pr="$(grep "^$day" "$1" | cut -f5)" echo "# Old Testament Reading" -gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$ot" +gmni "gemini://gemini.zachdecook.com/cgi-bin/lsv.py?$ot" echo "# New Testament Reading" gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$nt" echo "# Psalm" -gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$ps" +gmni "gemini://gemini.zachdecook.com/cgi-bin/oeb.sh?$ps" echo "# Proverb" gmni "gemini://gemini.zachdecook.com/cgi-bin/net.sh?$pr" diff --git a/oeb.sh b/oeb.sh index 388fd5a..53b41ec 100755 --- a/oeb.sh +++ b/oeb.sh @@ -22,7 +22,11 @@ if ! test "$file"; then return 1 fi printf "20 text/gemini\r\n" +echo '=> https://github.com/openenglishbible/Open-English-Bible This content from OpenEnglishBible (public domain)' +echo '=> gemini://gemini.zachdecook.com/usfm2gmi/ and rendered with usfm2gmi' echo "# $book $chstart:$vstart - $chend:$vend" grep '\c '"$chstart$" $file -A5000 | grep '\v '"$vstart " -A5000 \ | tac|grep '\c '$(($chend + 1))'$' -A5000 | grep '\v '$vend' ' -A5000 | tac\ | usfm2gmi/usfm2gmi.py +# end in newline +echo '' |
