The Bookworm API acts as an interchange format for requesting data about large collections of texts.
The orthodox implementation at the time of writing is my BookwormAPI repository, written in Python and connecting to the MySQL backend.
One of the major advantages of the API, however, is that it can be implemented on top of other systems (in whole or in part); so that bookcounts queries can easily be run through Solr, for example.
You can clone the repository directly into your webserver's /cgi-bin
directory, or just download the scripts if there are other cgi-scripts you don't want to disturb. Once it's cloned, you should be able to query the database by hitting, for example, http://myhost.org/cgi-bin/dbbindings.py?queryTerms={"database":"YOURDBNAME","method":"returnPossibleFields"}
Your local web installations will rely on this API working to make queries.
You can submit issues ot the github page.
To tell if your API is broken, first try the command-line interface to the API using bookworm query '{"format":"return_tsv","database":"$your_database","counttype":"counttype"}'
Also try running the federalist test suite by running some of the test scripts.
This script uses python to connect to MySQL through Apache, so there are many possible points of failure. Check /var/log/apache2/error.log
or elsewhere.
If that works but the cgi-bin
/cgi-bin
treated as executable?#!/usr/local/bin/python
to make use of all necessary modules.This is possible through manipulating the "known_hosts" file.