SMOLNET PORTAL home about changes

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

<1> bontibon/kjv (https://github.com)
Response: 20 (Success), text/gemini
Original URLgemini://tilde.club/~filip/tech/script/versify/versify.gmi
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8; lang=en