<commit_before>Django App for a full fledged Bible viewer
==========================================

A Django app that has a full Bible viewer, including the KJV text by default.
Other translation texts can be easily added. Also includes scripture models
and admin definitions to easily add your own scripture verse and passages
to your project.

Included out of the box is the King James Version text as the default version.

This project is in it's early stages...

Dependencies
------------

Uses [python-bible](http://github.com/jasford/python-bible) for
computing and handling the verse and passage lookups. You will need that
on your path somewhere - note that you'll need to use this fork currently
until the original python-bible implementation is fixed: [python-bible](http://github.com/richardbolt/python-bible)<commit_msg>Adding basic usage documentation.<commit_after>Django App for a full fledged Bible viewer
==========================================

A Django app that has a full Bible viewer, including the KJV text by default.
Other translation texts can be easily added. Also includes scripture models
and admin definitions to easily add your own scripture verse and passages
to your project.

Included out of the box is the King James Version text as the default version.

This project is in it's early stages...

Dependencies
------------

Uses [python-bible](http://github.com/jasford/python-bible) for
computing and handling the verse and passage lookups. You will need that
on your path somewhere - note that you'll need to use this fork currently
until the original python-bible implementation is fixed: [python-bible](http://github.com/richardbolt/python-bible)

Installation
------------

* Make sure the dependencies are satisfied and this module is somewhere on your python path.
* Add `'bibletext'` to your `INSTALLED_APPS` in your `settings.py`.
* Install initial data from fixtures: `python manage.py loaddata books.json kjv.json`.

Usage
-----

### Template tags ###

There are template tags to use:

    {% load bibletext_books bibletest_verses %}
    
    All the books of the bible, listed:
    {% books %} or {% books MyTranslation %}
    
    All the chapters and verse counts from John listed:
    {% chapters 'John' %}
    
    A specific verse (John 3:16):
    {% verse 'John 3:16' %} or {% verse 'Jn 3:16' %}
    
    A passage (John 3:16 - 3:18):
    {% passage 'John 3:16 - 3:18' %} or {% passage 'Jn 3:16 - 3:18' %}

### Views and urls ###

Default views and urls for really easy plugging as a simple Bible viewer will be provided soon. 

### Scripture ###

There is a Scripture model (living in `models/scripture.py`) for usage in your own models like so:
    
`models.py`:
    
    from bibletext.models import Scripture
    
    class Sermon(models.Model):
        title = models.CharField(max_length=100, blank=True)
        date = models.DateField(help_text="Date of the Sermon.")
        preacher = models.ForeignKey(Preacher, blank=True, null=True)
        audio = models.FileField(upload_to='%Y/%m %B')
        published = models.BooleanField(default=True)
    
        scripture = generic.GenericRelation(Scripture) # optional, but provides additional APIs.

`admin.py`:
    
    from bibletext.admin import ScriptureInline

    class SermonAdmin(admin.ModelAdmin):
        inlines = [
            ScriptureInline,
        ]
{'fraction_non_alphanumeric': 0.11453092630955904, 'fraction_numerical': 0.008878366380585973, 'mean_word_length': 3.512683578104139, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2780688', 'n_tokens_mistral': 977, 'n_tokens_neox': 906, 'n_words': 389}