Bales

Table of contents

Description

This is a program I’ve been wanting for awhile, which is just a basic bible in the command line. Can get exact verses, search terms, or just read from any point.
As of now (v0.0.3) it only contains the English KJV.


Install

To install:

$ go install github.com/unclassedpenguin/bible@latest

Update

Manually update

If you manually cloned the repo and installed the program with go install just pull the changes with git pull and then run go install again.


Usage

Option Description
-e Exact search. Use with -s, ie bible -s -e 'term'
-i Enable interactive mode
-l List info. with no arguments, will give all books. With a book will give number of chapters. With a book and chapter will give number of verses.
-r Print random verse
-s Search for term ie bible -s 'hope' (“hope” would match hopeful or hopefully or anything containing hope. If you want to match for only “hope” then use -s -e)
-v Print version

Examples

Basic usage for showing a specific verse is:
bible Book chapter verse
If the Book has multiples, it needs to be in quotations. Ie:
bible "1 Corinthians" 1 1

Basic Usage Examples

bible with no other arguments, will merely print all the books of the bible in order.
bible Genesis will print the number of chapters in the book Genesis.
bible Genesis 1 will print the entirety of chapter 1 of the book Genesis.
bible Genesis 1 1 will print verse 1 of chapter 1 of the book Genesis.

You can do ranges on verses:
bible Genesis 1 1-10 will print the first 10 verses.
You can also do ranges on chapters, which will print the chapters in their entireties
bible Genesis 1-3 (This works well with piping it into less ie bible Genesis 1-3 | less)

Search Examples

If you want to search for a term, for example “hope”, then you can use -s
bible -s hope
If the search term is only a single word, no quotations are required. However, if you want to search for a phrase, you need quotations.
bible -s "love thy neighbour"
These will return all verses that contain the search term.

If you want to match only exact matches, use -e
bible -s -e hope will ONLY return verses where the word hope is found.
(On a side note, this is kind of broken right now, because if the word is found at the end of a sentence, ie “hope.” or with a comma ie “hope,”, it will NOT match. More research is needed to figure this out! Probably need to use regex or something…)

Interactive mode

bible -i puts you into interactive mode. as of v0.0.3, this needs more work. currently you enter the book, chapter, then verse. Then you can hit n for next verse, p for previous, q for quit. I’d like it to be alot more substantial. Look better, have favorites, and bookmarks. All in good time