grepbible


Namegrepbible JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://gitlab.com/maxlit/grepbible
SummaryA CLI tool to look up Bible verses locally.
upload_time2024-03-10 13:49:33
maintainer
docs_urlNone
authorMaxim Litvak
requires_python
licenseMIT
keywords bible kjv
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # grepbible

`grepbible` is a command-line interface (CLI) tool designed to make searching for Bible verses (in ca. 60 languages) locally (like grepping) and looking up the Bible quotes fast and intuitive.  
It also represents a new channel for Bible distribution and aids in language learning, as parallel Bible translations have been used for centuries to learn languages.

Wikipedia article on [Bible citations](https://en.wikipedia.org/wiki/Bible_citation)  
The raw text is taken from [Wordproject®](https://www.wordproject.org), and has undergone processing to fit the specific needs and format of this project.

## Features

- **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.
- **Parallel and interleave text**: Combine text blocks from different translations.

## Installation

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

```sh
pip install grepbible
```

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

You might need to update your `PATH` as well (e.g. on Ubuntu):

```sh
export PATH=$PATH:$(python3 -m site --user-base)/bin
```
and add it to `~/.bashrc` to make it persistent

![demo](./gifs/240309_gbib_demo.gif)

## 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](https://en.wikipedia.org/wiki/King_James_Version)), in English.

Below are some common usage examples:

### Look Up a Single Verse

```sh
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

```sh
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

```sh
gbib -c 'Psalms 117'
```

```
O Praise the LORD, all ye nations: praise him, all ye people.
For his merciful kindness is great toward us: and the truth of the LORD endureth for ever. Praise ye the LORD.
```

### Show a Range of Verses

```sh
gbib -c "Gen 41:29-30"
```

```
Behold, there come seven years of great plenty throughout all the land of Egypt:
And there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;
```

### Fetch Multiple Disjoint Verses

```sh
gbib -c "Genesis 1:1,3"
```

### Compare different versions

Show interleave translation of Latin Vulgata to English KJV (line-by-line):
```sh
gbib -c 'Gen 41:29-30' -v kj,vg -i
```

![Compare different versions line-by-line](./gifs/5_range-of-verses-i.gif)

Block-by block translation (omit the flag `-i`):

```sh
 gbib -c 'Gen 41:29-30' -v kj,vg 
```

```
Behold, there come seven years of great plenty throughout all the land of Egypt:
And there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;

ecce septem anni venient fertilitatis magnae in universa terra Aegypti
quos sequentur septem anni alii tantae sterilitatis ut oblivioni tradatur cuncta retro abundantia consumptura est enim fames omnem terram
```
### Random quotes

Time for some fun! One can generate random quotes (in different languages and in parallel as well).

```sh
gbib -r
```

![demo](./gifs/240309_gbib_random-quotes.gif)

### Get help

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

```sh
gbib --help
```

![demo](./gifs/8_usage.gif)

### 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

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

#### Go to line

Example, jump 10th line of 5th chapter in Exodus:
```sh
less +10 $GB/Exodus/5.txt
```

#### Count occurences of words

How often the word 'camel' appears in the Bible:
```sh
grep -nr $GB -e camel | wc -l # 59
```

#### What was this quote about the sheep and wolves?

```sh
grep -nr $GB -e wolves | grep sheep
```

![local grep](./gifs/9_grep.gif)

## Contributing

Contributions to `grepbible` are welcome! Whether it's improving code, or reporting issues, or spreading the word, or financial support, your input is valuable.  

### Issues/bugs

To raise an issue, go to 'Issues' tab, and click on 'New issue'.

### Code

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.

### Social

Feel free to spread the word or/and use the hashtag `#grepbible` in social media.

### Financial

Feel free to buy me a coffee: [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J1VEX6J)

## License

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/maxlit/grepbible",
    "name": "grepbible",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "bible,KJV",
    "author": "Maxim Litvak",
    "author_email": "maxim@litvak.eu",
    "download_url": "https://files.pythonhosted.org/packages/92/28/0800cd78787d2c10acb40ada1ed08aa6aa684c0164a88450fc45bbdf5451/grepbible-0.2.3.tar.gz",
    "platform": null,
    "description": "# grepbible\n\n`grepbible` is a command-line interface (CLI) tool designed to make searching for Bible verses (in ca. 60 languages) locally (like grepping) and looking up the Bible quotes fast and intuitive.  \nIt also represents a new channel for Bible distribution and aids in language learning, as parallel Bible translations have been used for centuries to learn languages.\n\nWikipedia article on [Bible citations](https://en.wikipedia.org/wiki/Bible_citation)  \nThe raw text is taken from [Wordproject\u00ae](https://www.wordproject.org), and has undergone processing to fit the specific needs and format of this project.\n\n## Features\n\n- **Search Capabilities**: Look up individual verses, ranges of chapters, or specific passages across multiple translations.\n- **Multiple Bible Versions**: Easily switch between different Bible translations to compare interpretations and wording.\n- **Local Caching**: Bible versions are downloaded and stored locally for quick access and offline use.\n- **Parallel and interleave text**: Combine text blocks from different translations.\n\n## Installation\n\nTo install `grepbible`, ensure you have Python 3.9 or higher installed on your system. You can install `grepbible` directly from PyPI:\n\n```sh\npip install grepbible\n```\n\nThis command installs the `grepbible` package and makes the `gbib` command available in your shell.\n\nYou might need to update your `PATH` as well (e.g. on Ubuntu):\n\n```sh\nexport PATH=$PATH:$(python3 -m site --user-base)/bin\n```\nand add it to `~/.bashrc` to make it persistent\n\n![demo](./gifs/240309_gbib_demo.gif)\n\n## Usage\n\n`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](https://en.wikipedia.org/wiki/King_James_Version)), in English.\n\nBelow are some common usage examples:\n\n### Look Up a Single Verse\n\n```sh\ngbib -c \"John 3:11\"\n```\n\n```\nVerily, verily, I say unto thee, We speak that we do know, and testify that we have seen; and ye receive not our witness.\n```\n\n### Compare Verses in Different Translations\n\n```sh\ngbib -v kj,pl -c \"Romans 8:20\"\n```\n\n```\nFor the creature was made subject to vanity, not willingly, but by reason of him who hath subjected the same in hope,\n\nGdy\u017c stworzenie marno\u015bci jest poddane, nie dobrowolnie, ale dla tego, kt\u00f3ry je podda\u0142,\n```\n\n### Lookup a Chapter\n\n```sh\ngbib -c 'Psalms 117'\n```\n\n```\nO Praise the LORD, all ye nations: praise him, all ye people.\nFor his merciful kindness is great toward us: and the truth of the LORD endureth for ever. Praise ye the LORD.\n```\n\n### Show a Range of Verses\n\n```sh\ngbib -c \"Gen 41:29-30\"\n```\n\n```\nBehold, there come seven years of great plenty throughout all the land of Egypt:\nAnd there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;\n```\n\n### Fetch Multiple Disjoint Verses\n\n```sh\ngbib -c \"Genesis 1:1,3\"\n```\n\n### Compare different versions\n\nShow interleave translation of Latin Vulgata to English KJV (line-by-line):\n```sh\ngbib -c 'Gen 41:29-30' -v kj,vg -i\n```\n\n![Compare different versions line-by-line](./gifs/5_range-of-verses-i.gif)\n\nBlock-by block translation (omit the flag `-i`):\n\n```sh\n gbib -c 'Gen 41:29-30' -v kj,vg \n```\n\n```\nBehold, there come seven years of great plenty throughout all the land of Egypt:\nAnd there shall arise after them seven years of famine; and all the plenty shall be forgotten in the land of Egypt; and the famine shall consume the land;\n\necce septem anni venient fertilitatis magnae in universa terra Aegypti\nquos sequentur septem anni alii tantae sterilitatis ut oblivioni tradatur cuncta retro abundantia consumptura est enim fames omnem terram\n```\n### Random quotes\n\nTime for some fun! One can generate random quotes (in different languages and in parallel as well).\n\n```sh\ngbib -r\n```\n\n![demo](./gifs/240309_gbib_random-quotes.gif)\n\n### Get help\n\nFor more information on command options and additional features, you can run:\n\n```sh\ngbib --help\n```\n\n![demo](./gifs/8_usage.gif)\n\n### Use with grep\n\nOne can literally use `grep` to look up the verses and leverage `gbib` only for downloading the sources. Here's how.\n\nFirst, 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\n\n```sh\ngbib -d kj,vg\nexport GB=$HOME/grepbible_data/kj\n```\n\n#### Go to line\n\nExample, jump 10th line of 5th chapter in Exodus:\n```sh\nless +10 $GB/Exodus/5.txt\n```\n\n#### Count occurences of words\n\nHow often the word 'camel' appears in the Bible:\n```sh\ngrep -nr $GB -e camel | wc -l # 59\n```\n\n#### What was this quote about the sheep and wolves?\n\n```sh\ngrep -nr $GB -e wolves | grep sheep\n```\n\n![local grep](./gifs/9_grep.gif)\n\n## Contributing\n\nContributions to `grepbible` are welcome! Whether it's improving code, or reporting issues, or spreading the word, or financial support, your input is valuable.  \n\n### Issues/bugs\n\nTo raise an issue, go to 'Issues' tab, and click on 'New issue'.\n\n### Code\n\nTo contribute code:\n\n1. Fork the repository.\n2. Create a new branch for your feature or fix.\n3. Commit your changes with clear, descriptive messages.\n4. Push your branch and submit a pull request.\n\nPlease 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.\n\n### Social\n\nFeel free to spread the word or/and use the hashtag `#grepbible` in social media.\n\n### Financial\n\nFeel free to buy me a coffee: [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J1VEX6J)\n\n## License\n\n`grepbible` is open-source software licensed under the MIT License. See the LICENSE file for more details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to look up Bible verses locally.",
    "version": "0.2.3",
    "project_urls": {
        "Homepage": "https://gitlab.com/maxlit/grepbible"
    },
    "split_keywords": [
        "bible",
        "kjv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73e02f4a068ad5505104411ff91e9de5154144f72a9fa7d5d8249d25c03c209d",
                "md5": "594360557c69c822a184a1209c757a2f",
                "sha256": "46733c7444a14efd316a06da8d0f00cde5de4db53befe6533ba2561f613d6b8a"
            },
            "downloads": -1,
            "filename": "grepbible-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "594360557c69c822a184a1209c757a2f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12544,
            "upload_time": "2024-03-10T13:49:31",
            "upload_time_iso_8601": "2024-03-10T13:49:31.494679Z",
            "url": "https://files.pythonhosted.org/packages/73/e0/2f4a068ad5505104411ff91e9de5154144f72a9fa7d5d8249d25c03c209d/grepbible-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92280800cd78787d2c10acb40ada1ed08aa6aa684c0164a88450fc45bbdf5451",
                "md5": "a2607a242095a8fa5b4137430232bebf",
                "sha256": "55f451d2f1b2a737c01a88cfc922041d179fca77f3bfddd8eec2a45bc3159ba0"
            },
            "downloads": -1,
            "filename": "grepbible-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a2607a242095a8fa5b4137430232bebf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14402,
            "upload_time": "2024-03-10T13:49:33",
            "upload_time_iso_8601": "2024-03-10T13:49:33.145813Z",
            "url": "https://files.pythonhosted.org/packages/92/28/0800cd78787d2c10acb40ada1ed08aa6aa684c0164a88450fc45bbdf5451/grepbible-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-10 13:49:33",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "maxlit",
    "gitlab_project": "grepbible",
    "lcname": "grepbible"
}
        
Elapsed time: 3.39233s