💾 Archived View for tilde.club › ~filip › tech › script › versify › versify.gmi captured on 2023-04-26 at 13:48:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-07-16)

-=-=-=-=-=-=-

versify

A bash/awk script for browsing versified text given in a TSV file. The script is a remake (and an improvement) of a script for browsing The King James Bible.

Usage

List books and print random series or verse:
  ./versify.sh <FILE> -l  --  list books
  ./versify.sh <FILE> -s  --  random series
  ./versify.sh <FILE> -v  --  random verse

Get up to 12 random words from:
  ./versify.sh <FILE> -o

Print verses in a reference:
  ./versify.sh <FILE> <REF> [<REF> <REF> ...]
Exampes of a reference:"
  1:2:1,3,5-10  --  1st book, 2nd series, verses 1,3,5,6,7,8,9,10
  /key          --  verses containing 'key'
  1/key         --  verses from the 1st book containing 'key'
  *:1:1         --  1st series, 1st verse of all the books
  1-2:1         --  1st series of books 1 and 2

Interactive mode:
  ./versify.sh <FILE> -i

Help:
  ./versify.sh -h

TSV file format

<BOOK_NUM>\t<BOOK_TIT>\t<SERIES_NUM>\t<SERIES_BOOK_NUM>\t<SERIES_TIT>\t<VERSE_NUM>\t<VERSE_SERIES_NUM>\t<VERSE>

Download

The script is split into two files: `versify.sh` and `versify.awk`.

versify.sh.txt

versify.awk.txt

Some texts in the appropriate format:

Biblia Vulgata

King James Bible with Apocrypha

Example

Output of `./versify.sh kjv.tsv "amos:5/evil"`:

[Amos 5-13]	Therefore the prudent shall keep silence in that time; for it is an evil time.
[Amos 5-14]	Seek good, and not evil, that ye may live: and so the LORD, the God of hosts, shall be with you, as ye have spoken.
[Amos 5-15]	Hate the evil, and love the good, and establish judgment in the gate: it may be that the LORD God of hosts will be gracious unto the remnant of Joseph.

Back matter

Links

<1> bontibon/kjv