#Advanced Type Ahead

User Story:

User starts to type in a word and a drop down menu showing entities broken out by type appears. The entities are selectable.

Acceptance:

Produces a deduped list with a variety of entity types.

Usage:

Currently the project is in two parts: an HTML/CSS/JS frontend (in the html folder) and a Python Django backend (in the backend folder).

HTML/CSS/JS Frontend

Place this on a web server and visit index.html. It also works running it from your filesystem. Needed libraries not loaded from a cdn are included in html/scripts.

Installing the Application

The application consists of a backend server that makes calls to OCLC web services, and a stand alone web page that offers a text input for searching and displays results.

Backend Requirements:

Install the dependencies:

git clone https://github.com/OCLC-Developer-Network/oclc-auth-python.git
cd oclc-auth-python
sudo python setup.py install
cd ..
sudo pip install Django
sudo pip install djangorestframework
sudo pip install markdown
sudo pip install requests
sudo pip install rdflib
sudo pip install django-cors-headers

Install the application:

git clone https://github.com/oclc-developer-house/advanced-typeahead.git

Configure the OCLC Discovery API Authorization parameters:

You'll need to rename backend/backend/settings/authentication_template.py to backend/backend/settings/authentication.py and fill in the blanks with your OCLC WSkey details.

Run the Django Server:

Launch the Django dev server by running backend/devstart.sh. It's set to listen on localhost:8000.

Note that default Django settings from spinning up a basic project are used, and the secret key is currently included in settings/base.py, so under no circumstances should this be used in a production environment as-is.

Open the web page in the browser

With the backend running in the Django server, open the file html/index.html in your browser to run the example.