Skip to main content

A CLI tool to look up Bible verses locally.

Project description

grepbible

grepbible is a command-line interface (CLI) tool designed to make searching for Bible verses (in ca. 70 languages) locally (like grepping) and looking up the Bible quotes fast and intuitive. It also represents a new channel for Bible distribution, and helps language learners as well since parallel Bible translations were used for languages learning for centuries.

Wikipedia article on Bible citations The raw text is taken from Wordproject®

Features

  • Versatile Search Capabilities: Look up individual verses, ranges of chapters, or specific passages across multiple translations.
  • Multiple Bible Versions: Easily switch between different Bible translations to compare interpretations and wording.
  • Local Caching: Bible versions are downloaded and stored locally for quick access and offline use.
  • Customizable: Set your preferred Bible version and customize search options to suit your study needs.

Installation

To install grepbible, ensure you have Python 3.9 or higher installed on your system. You can install grepbible directly from PyPI:

pip install grepbible

This command installs the grepbible package and makes the gbib command available in your shell.

Usage

grepbible is designed to be straightforward and easy to use from the command line. The default version (unless the flag -v is specified) is 'kj' (KJV), in English.

Below are some common usage examples:

Look Up a Single Verse

gbib -c "John 3:11"
Verily, verily, I say unto thee, We speak that we do know, and testify that we have seen; and ye receive not our witness.

Compare Verses in Different Translations

gbib -v kj,pl -c "Romans 8:20"
For the creature was made subject to vanity, not willingly, but by reason of him who hath subjected the same in hope,
Gdyż stworzenie marności jest poddane, nie dobrowolnie, ale dla tego, który je poddał,

Lookup a Chapter

gbib -c "Psalms 23"

Show a Range of Verses

gbib -c "Genesis 1:1–3"

Fetch Multiple Disjoint Verses

gbib -c "Genesis 1:1–3"

Fetch Multiple Disjoint Verses

Show interleave translation of Latin Vulgata to English KJV (line-by-line)

gbib -c "Genesis 1:1–3" -v vg,kj -i

For more information on command options and additional features, you can run:

gbib --help

Use with grep

One can literally use grep to look up the verses and leverage gbib only for downloading the sources. Here's how.

First, download KJV ('kj') and Vulgata ('vg'). The data is stored in $HOME/grepbible_data, thus, it makes sense to store it as a variable, e.g. the path to the 5th chapter of Exodus in KJV will be $HOME/grepbible_data/kj/Exodus/5.txt

gbib -d kj,vg
export GB=$HOME/grepbible_data/kj

Go to line

Example, jump 10th line of 5th chapter in Exodus:

less +10 $GB/Exodus/5.txt

Count occurences of words

How often the word 'camel' appears in the Bible:

grep -nr $GB -e camel | wc -l # 59

What was this quote about the sheep and wolves?

grep -nr $GB -e wolves | grep sheep

Result:

./grepbible_data/kj/Matthew/10.txt:16:Behold, I send you forth as sheep in the midst of wolves: be ye therefore wise as serpents, and harmless as doves.
./grepbible_data/kj/Matthew/7.txt:15:Beware of false prophets, which come to you in sheep's clothing, but inwardly they are ravening wolves.

Contributing

Contributions to grepbible are welcome! Whether it's adding new features, improving existing functionality, or reporting issues, your input is valuable. To raise an issue, go to 'Issues' tab, and click on 'New issue'.

To contribute code:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Commit your changes with clear, descriptive messages.
  4. Push your branch and submit a pull request.

Please ensure your code adheres to the project's style and quality standards. For major changes, please open an issue first to discuss what you would like to change.

License

grepbible is open-source software licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grepbible-0.1.6.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

grepbible-0.1.6-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file grepbible-0.1.6.tar.gz.

File metadata

  • Download URL: grepbible-0.1.6.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for grepbible-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5d829eeaa9ef98f99ceb9d35042cdacb720bb993ab103b534471a7b3d2b33caa
MD5 54a0565f6de2c14f827e5723968aabcb
BLAKE2b-256 6ab52465b0e33ad512242635dfe1707f0ff4593f84f05e539980fe1cc6c9ca3c

See more details on using hashes here.

File details

Details for the file grepbible-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: grepbible-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for grepbible-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e0804192c3521bccbe0482985faaba35c6abe2f0d3edaea0cce10b28b5c82b75
MD5 be416c525682f905fa4c8aa486e9d7d5
BLAKE2b-256 d095600a0e142f839c07eba3debc4f689a278cefc6238dbd7421e5bb4b5e5ea4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page