Files
kjv_api/README.txt
2023-06-06 20:09:38 -07:00

90 lines
3.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
KJV-API
=======
King James Version web API is a machine and human callable service to
query the King James Bible and provides useful features, such as random
verses and a quote of the day.
EXTERNAL DATA
=============
The software uses a sqlite3 database as external data dependancy, saved locally
and modified to remove false Bible translations (included)
https://github.com/scrollmapper/bible_databases
For software dependancies see INSTALL.txt
INSTALLATION
============
See INSTALL.TXT
USAGE
=====
The program may be invoked by running kjv-api.sh in a non-root account, or via
systemd daemon process in a non-root account.
Alternately for testing, the program may be run on another port by running:
$ uwsgi_python3 --http-socket <listen address>:<port> --wsgi-file /opt/kjv-api/app.py --callable app
or by executing kjv-api-test.sh which will listen on 0.0.0.0:1612
Visiting the base directory will show the user-facing documentation via web browser or cURL.
When testing or doing a deployment, the data directory must be owned by whatever user is
running the program in order to prevent a sqlite3.OperationalError for writing to a "readonly"
database.
CONTENTS
========
.
├── app.py - main program
├── data
│   ├── 1828_Webster_KJV.json - Dictionary
│   ├── kjv.aff - KJV Spellchecking Description file (hunspell)
│   ├── kjv.db - KJV sqlite3 database
│   └── kjv.dic - KJV Spellchecking dictionary file (hunspell)
│   └── seq.db - Sqlite3 Database with user's ids for sequenced scripture
│   └── shortcodes.db - Sqlite3 Database with saved shortcodes for scripture groups.
├── favicon.ico
├── html
│   ├── dictionary.html - dictionary search landing page /define
│   ├── find.html - unified search bar landing page /find
│   ├── navbar.html - navigation bar added programatically to rich results
│   ├── heaven.html - Bible way to heaven, static page /salvation
│   ├── on_reading_bible.html - Introduction on good reading practices
│   ├── index.html - / landing page with unified search bar
│   ├── reader.html - not yet implemented Bible browser end point
│   ├── reading_plan.html - not yet implemented Bible reading plan generator
│   ├── response.html - Template for rich verse responses
│   ├── search.html - Bible keyword search landing page /search
│   ├── search_bar.html - Unused
│   ├── show.html - Bible verse search landing page /show
│   ├── seq.html - Bible sequential verse landing page /seq
│   └── votd.html - Matty's test VOTD rich landing page
├── install
│   ├── apache.site.conf.example - example installation configuration
│   └── kjv-api.service - example systemd service file
├── INSTALL.txt - installation instructions
├── logs - log folder (populated at runtime - there is NO log rotation)
├── js
│   └── collapsible.js - js for the definition drop-down menu used in unified search
├── kjv-api.sh - runs uwsgi flask app on port 1611
├── kjv-api-test.sh - runs uwsgi flask app on port 1612
├── README.txt - This document
├── styles
│   ├── collapsible.css
│   ├── header.css
│   ├── fonts
│   │   ├── Arizonia-Regular.ttf
│   │   └── Parisienne-Regular.ttf
│   ├── human_readable.css
│   ├── search_rich.css
│   └── votd.css
└── tools
└── av1611_dictionary_scraper.py - builds a dictionary json for the 1828 dictionary
└── sanity_check.py - Integrated during runtime and also as endpoint testing when run alone.
└── search_keywords.txt - endpoint testing queries
└── sanity_results.txt - results of running sanity_check.py as a standalone
AUTHOR
======
Copyright Tyler R Dinsmoor & Matty Sneederson 2023