A module to scrape biblehub.com, also cli app
Project description
BibleHubScrapper
A python module that retrieve a single verse and the information on it from biblehub.com. Also a simple commandline application
Instillation
pip3 install BibleHubScrapper
Commandline
To retrieve all the currently available information on a reference, use the '-a' tag:
biblehub -a [Reference]
To only retrieve specific information, pass in the corresponding tag:
biblehub -c [Reference] # Also retrieves the cross-references
biblehub -t [Reference] # Also retrieves the lexicon
As with most cli tools, arguments can be stacked with one hyphen, such as:
biblehub -cl [Reference] # Retrieves the cross-references and lexicon in addition to the passage
Script Usage
You can import the query method to use in scripts.
from BibleHubScrapper import query
biblehub_query = query('Genesis 1:1')
print(biblehub_query.text) # In the beginning...
By default, it will query all possible fields.
You can choose not to query certain fields by indicating in the parameters
for example:
query('Genesis 1:1', get_lexicons=False)
Useful fields
print(biblehub_query.passage) # Genesis 1:1
print(biblehub_query.version) # NIV (default)
print(biblehub_query.lexicons) # Text, Hebrew words, translit, strong, and English defintions
print(biblehub_query.crfs) # Cross References
print(biblehub_query.tos) # Treasury of Scripture
print(biblehub_query.info) # Prints all the info queried on the verse. Also the same as the __str__
there are also biblehub_query.format_[field]
method that returns the specified field in an easy to read way.
Todo
- Possibly support multiple verses
- Possibly make vim plugin
- Consider fetching commentaries, or a specific one
- Implement search function
- Reformat module structure
- Create etc config file for formatting (colors, verbosity, etc.)
Contributing
If you feel like improving the codebase, adding a feature, or checking my grammar, feel free! Just make sure to send a pull request against the development branch.
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
Built Distribution
File details
Details for the file BibleHubScrapper-1.3.3.tar.gz
.
File metadata
- Download URL: BibleHubScrapper-1.3.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.4.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d19caa7ce4930d28612fc246b81072d3742f77a4da685eb1f3732f4bb6a3552 |
|
MD5 | 680a9fc3322c5ea6791fe225e6b92dcb |
|
BLAKE2b-256 | 113089bb92107f7c524d55e1628f5de03fa890fde478a206f7ca537b94f11881 |
File details
Details for the file BibleHubScrapper-1.3.3-py3-none-any.whl
.
File metadata
- Download URL: BibleHubScrapper-1.3.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.4.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a81b25ea22a1de5d1b83a3fc0cd2c957b06b1eaaf93e02cf54265b5bd7cdbe6 |
|
MD5 | 2a9333cb962fffaabcdb8720a6a066ce |
|
BLAKE2b-256 | 93efecbf3368baab965cddf3a8134ef81fb772dbd0d5a87337677c9da9843f17 |