python-scriptures is a Python module and regular expression library for validating, extracting, and normalizing biblical scripture references from blocks of text.
For more information, see http://www.davisd.com/projects/python-scriptures/
Typical usage is as follows:
#!/usr/bin/env python
>>> import scriptures
>>> scriptures.extract('This is a test Rom 3:23-28 and 1 JOHn 2')
[('Romans', 3, 23, 3, 28), ('I John', 2, 1, 2, 29)]
Range validation is performed automatically and invalid references are not extracted.
>>> import scriptures
>>> scriptures.extract('Romans 3:23 is real, but Romans 2:30 is invalid.')
[('Romans', 3, 23, 3, 23)]
Installation
A setup script (setup.py) is provided. To install, simply run the script with the install command:
python setup.py install
Or just put the scriptures package somewhere on the Python path.
Product's homepage
Requirements:
· Python