Package: biblehub
biblehubA python module and CLI app (Formerly BibleHubScrapper) that retrieve verses and information on those verses
frombiblehub.InstallationCLI appSimple QueriesInformational QueriesVersioningSearch QueriesScript UsageUseful fieldsSearchingKnown BugsContributingRegretsInstallationpip3 install --pre biblehubCurrently beta testing, some bugs must be reworked.CLI appSimple QueriesFind verses with no information by using thefindcommand and no flagsbiblehubfindMatthew2:4You can retrieve single verses, a range of verses, or an entire chapter.Informational QueriesThe CLI app is also capable of retrieving information on the queried single verse queries with the optional flags-a(All information)-l(Lexicon) and-t(Treasury of Scripture)Note:Information is only available for single verse references (i.eGenesis 1:1),
multiverse references(i.eGenesis 1:1-2) will not return information on
each verse yet.To only retrieve specific information, pass in the corresponding tag:biblehubfind-c[Reference]# Also retrieves the cross-referencesbiblehubfind-l[Reference]# Also retrieves the lexiconbiblehubfind-t[Reference]# Also retrieves the treasury of scriptureAs with most CLI tools, arguments can be stacked with one hyphen and the position of the arguments don't matter
relative to the verse. All of these are valid queries:biblehubfind-cl[Reference]# Retrieves the cross-references and lexicon in addition to the passagebiblehubfindMatthew2:4-cVersioningTo retrieve all the versions for a single verse reference, use the--versionstagbiblehubfind--versionsGenesis2:4To find a specific version (See available verses onbiblehub), use the-vtagbiblehubfind-vKJVJam4:7Search QueriesTo search biblehub use thesearchcommandbiblehubsearchGoliathContains optional arguments--otand--ntto limit the results to the old or new testamentsScript UsageYou can import the query and get_versions methods to use in scripts.frombiblehubimportfind_verse,get_versionsbiblehub_query=find_verse('Genesis 1:1')all_versions=get_versions('Genesis 1:1')print(biblehub_query.text)# In the beginning...print(all_versions[0].passage)By default, it will query all possible fields.
You can choose not to query certain fields by indicating in the parameters
for example:find_verse('Genesis 1:1', get_lexicons=False)Useful fieldsprint(biblehub_query.passage)# Genesis 1:1print(biblehub_query.version)# NIV (default)print(biblehub_query.lexicons)# Text, Hebrew words, translit, strong, and English defintionsprint(biblehub_query.crfs)# Cross Referencesprint(biblehub_query.tos)# Treasury of Scriptureprint(biblehub_query.info)# Prints all the info queried on the verse. Also the same as the __str__there are alsobiblehub_query.format_[field]method that returns the specified field in an easy to read way.Searchingfrombiblehubimportsearchasb_searchlist=b_search("Goliath",filter='nt')Known BugsBecause of the way psalms are formatted in biblehub, if you do a multi-verse query for the psalms (i.e Psalms 23:1-5),
parts of the verses will be cut off. This problem is not present in single verse queries howeverIf you type in a random version (i.ebiblehub -v JOE Matthew 2:4) it will retrieve the NIV by default as expected,
but the version in the reference display will still display that unknown version. This can make for some pretty fun
images though.ContributingIf you feel like improving the codebase, adding a feature, or checking my grammar, feel free!
checkout the issues I post for tasks you can help with, reference specific issues when making a PR.
Make sure to send a pull request against the development branch.RegretsThis was probably one of the most fun side projects I have worked on, sadly though I am unlikely to continue developing
it. I did not begin this with the goal of making it a sustainable project, I only wanted to hash together something to
help me whenever I needed to quickly lookup bible references or look at cross-references. For this reason, I did not
develop tests earlier on and did not spend a lot of time on making the codebase scalable for different uses. I say
all of this just to make this statement:WRITE TESTS!!! They make life so much easier in the long termFind this app helpful? Useful? Please let me know atjoshua@joshpetit.dev!