Replaced all instances of KJV with DRB
This commit is contained in:
parent
fda81a610e
commit
70f0276acc
10
Makefile
10
Makefile
|
|
@ -1,14 +1,14 @@
|
|||
kjv: kjv.sh kjv.awk kjv.tsv
|
||||
cat kjv.sh > $@
|
||||
drb: drb.sh drb.awk drb.tsv
|
||||
cat drb.sh > $@
|
||||
|
||||
echo 'exit 0' >> $@
|
||||
|
||||
echo '#EOF' >> $@
|
||||
tar cz kjv.awk kjv.tsv >> $@
|
||||
tar cz drb.awk drb.tsv >> $@
|
||||
|
||||
chmod +x $@
|
||||
|
||||
test: kjv.sh
|
||||
shellcheck -s sh kjv.sh
|
||||
test: drb.sh
|
||||
shellcheck -s sh drb.sh
|
||||
|
||||
.PHONY: test
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -1,10 +1,10 @@
|
|||
# kjv [](https://aur.archlinux.org/packages/kjv-git/)
|
||||
# drb
|
||||
|
||||
Read the Word of God from your terminal
|
||||
|
||||
## Usage
|
||||
|
||||
usage: ./kjv [flags] [reference...]
|
||||
usage: ./drb [flags] [reference...]
|
||||
|
||||
-l list books
|
||||
-W no line wrap
|
||||
|
|
@ -33,10 +33,10 @@ Read the Word of God from your terminal
|
|||
|
||||
## Build
|
||||
|
||||
kjv can be built by cloning the repository and then running make:
|
||||
drb can be built by cloning the repository and then running make:
|
||||
|
||||
git clone https://github.com/bontibon/kjv.git
|
||||
cd kjv
|
||||
git clone https://github.com/Andrew-William-Smith/drb.git
|
||||
cd drb
|
||||
make
|
||||
|
||||
## License
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ BEGIN {
|
|||
FS = "\t"
|
||||
|
||||
MAX_WIDTH = 80
|
||||
if (ENVIRON["KJV_MAX_WIDTH"] ~ /^[0-9]+$/) {
|
||||
if (int(ENVIRON["KJV_MAX_WIDTH"]) < MAX_WIDTH) {
|
||||
MAX_WIDTH = int(ENVIRON["KJV_MAX_WIDTH"])
|
||||
if (ENVIRON["DRB_MAX_WIDTH"] ~ /^[0-9]+$/) {
|
||||
if (int(ENVIRON["DRB_MAX_WIDTH"]) < MAX_WIDTH) {
|
||||
MAX_WIDTH = int(ENVIRON["DRB_MAX_WIDTH"])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ function bookmatches(book, bookabbr, query) {
|
|||
}
|
||||
|
||||
function printverse(verse, word_count, characters_printed) {
|
||||
if (ENVIRON["KJV_NOLINEWRAP"] != "" && ENVIRON["KJV_NOLINEWRAP"] != "0") {
|
||||
if (ENVIRON["DRB_NOLINEWRAP"] != "" && ENVIRON["DRB_NOLINEWRAP"] != "0") {
|
||||
printf("%s\n", verse)
|
||||
return
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# kjv: Read the Word of God from your terminal
|
||||
# drb: Read the Word of God from your terminal
|
||||
# License: Public domain
|
||||
|
||||
SELF="$0"
|
||||
|
|
@ -59,10 +59,10 @@ while [ $# -gt 0 ]; do
|
|||
break
|
||||
elif [ "$1" = "-l" ]; then
|
||||
# List all book names with their abbreviations
|
||||
get_data kjv.tsv | awk -v cmd=list "$(get_data kjv.awk)"
|
||||
get_data drb.tsv | awk -v cmd=list "$(get_data drb.awk)"
|
||||
exit
|
||||
elif [ "$1" = "-W" ]; then
|
||||
export KJV_NOLINEWRAP=1
|
||||
export DRB_NOLINEWRAP=1
|
||||
shift
|
||||
elif [ "$1" = "-h" ] || [ "$isFlag" -eq 1 ]; then
|
||||
show_help
|
||||
|
|
@ -73,7 +73,7 @@ done
|
|||
|
||||
cols=$(tput cols 2>/dev/null)
|
||||
if [ $? -eq 0 ]; then
|
||||
export KJV_MAX_WIDTH="$cols"
|
||||
export DRB_MAX_WIDTH="$cols"
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
|
|
@ -83,13 +83,13 @@ if [ $# -eq 0 ]; then
|
|||
|
||||
# Interactive mode
|
||||
while true; do
|
||||
printf "kjv> "
|
||||
printf "drb> "
|
||||
if ! read -r ref; then
|
||||
break
|
||||
fi
|
||||
get_data kjv.tsv | awk -v cmd=ref -v ref="$ref" "$(get_data kjv.awk)" | ${PAGER}
|
||||
get_data drb.tsv | awk -v cmd=ref -v ref="$ref" "$(get_data drb.awk)" | ${PAGER}
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
get_data kjv.tsv | awk -v cmd=ref -v ref="$*" "$(get_data kjv.awk)" | ${PAGER}
|
||||
get_data drb.tsv | awk -v cmd=ref -v ref="$*" "$(get_data drb.awk)" | ${PAGER}
|
||||
Loading…
Reference in New Issue