added option to disable footnotes

This commit is contained in:
Alexander Bocken 2020-08-14 12:39:09 +02:00
parent 56a5571535
commit c0608babd9
3 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,7 @@ Code largely based off of [https://github.com/bontibon/kjv.git](https://github.c
-l list books
-W no line wrap
-h show help
-F no footnotes
Reference types:
<Book>

View File

@ -197,6 +197,10 @@ function printintroductionpar(verse, word_count, characters_printed) {
}
function printannotation(annotation, word_count, characters_printed) {
if ( ENVIRON["BIBEL_NOFOOTNOTES"] != "" && ENVIRON["BIBEL_NOFOOTNOTES"] != "0"){
return
}
else{
if (ENVIRON["BIBEL_NOLINEWRAP"] != "" && ENVIRON["BIBEL_NOLINEWRAP"] != "0") {
printf("\t\t%s\n", annotation)
return
@ -227,6 +231,7 @@ function printannotation(annotation, word_count, characters_printed) {
printf("\n")
}
printf("\n")
}
}
function processline() {

View File

@ -23,6 +23,7 @@ show_help() {
echo " -l list books"
echo " -W no line wrap"
echo " -h show help"
echo " -F no footnotes"
echo
echo " Reference types:"
echo " <Book>"
@ -64,6 +65,9 @@ while [ $# -gt 0 ]; do
elif [ "$1" = "-W" ]; then
export BIBEL_NOLINEWRAP=1
shift
elif [ "$1" = "-F" ]; then
export BIBEL_NOFOOTNOTES=1
shift
elif [ "$1" = "-h" ] || [ "$isFlag" -eq 1 ]; then
show_help
else