bbl

Read, search and index the Bible on the command line -- Greek, Latin, KJV, Knox, RSV, and more
git clone git://git.wilsonrgheen.com/bbl
Log | Files | Refs | README | LICENSE

commit 47900031eb7d589062df5985cbbdbb10e09bcbb5
parent d5ba4c33abb7ecc6eb26a3f4464a392953b478d4
Author: Wilson Gheen <wilson@wilsonrgheen.com>
Date:   Sun, 25 Sep 2022 07:29:45 -0500

Add ability to get all books at once

Diffstat:
Mbbl.awk | 8++++++++
Mbbl.sh | 2++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/bbl.awk b/bbl.awk @@ -60,6 +60,7 @@ cmd == "list" { function parseref(arr, q, i) { # NOTE: For Hebrew, the colon between book and chapter is required + # 0. * # 1. <book> # 1a. <book>[, ?<book>]... # 2. <book>:?<chapter> @@ -78,6 +79,9 @@ function parseref(arr, q, i) { #11. <book> @ <number of verses>? #12. <book>:?<chapter> @ <number of verses>? + if (q == "*") { + return "all" + } if (match(q, re["book"]) == 1) { # 1, 1a, 2, 2a, 3, 3a, 3b, 4, 5, 6, 8, 9, 11, 12 arr["book", cleanbook(substr(q, 1, RLENGTH))] = 1 @@ -396,6 +400,10 @@ cmd == "ref" && !header_ended { next } +cmd == "ref" && mode == "all" { + processline() +} + cmd == "ref" && mode == "exact" && hasbook($1, $2) && (p["chapter"] == "" || $4 == p["chapter"]) && (p["verse"] == "" || $5 == p["verse"]) { processline() } diff --git a/bbl.sh b/bbl.sh @@ -106,6 +106,8 @@ show_help() { echo " <Book> can refer either to the name of a book, or an alias referring to a list of books." echo " Specify the -l flag to get list of both books and aliases" echo " References for Hebrew must be in Hebrew; for all else, must be in English." + echo " *" + echo " Every book" echo " <Book>" echo " Individual book" echo " <Book>:<Chapter>"