5The Open Shakespeare package provides a full open set of shakespeare's works
6(often in multiple versions) along with ancillary material, a variety of tools,
7a python API and a web interface that provides access to many (but not all) of
8these facilities from the comfort of your web browser (see
9http://www.openshakespeare.org/).
11All material is open source/open knowledge so that anyone can use, redistribute
12and reuse these materials freely. For exact details of the license under which
13this package is made available please see COPYING.txt.
15Open Shakespeare has been developed under the aegis of the Open Knowledge
16Foundation (http://www.okfn.org/).
21Please mail open-shakespeare@okfn.org or join the open-literature mailing list:
23 http://lists.okfn.org/listinfo/open-literature
321.1: (EITHER) Install using setup.py (preferred)
33------------------------------------------------
35Install ``shakespeare`` using easy_install (or pip)::
37 easy_install shakespeare
39 pip install shakespeare
41NB: If you don't have easy_install you can get from here:
43<http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions>
461.2 (OR) Get the code straight from the repository
47--------------------------------------------------
491. Check out the mercurial repo::
51 hg clone https://knowledgeforge.net/shakespeare/hg
55 python setup.py develop
67To access most of the main features of Open Shakespeare you need a database.
68For this an other bits and bobs of configuration you will need a configuration
71You can make a config file as follows::
73 paster make-config shakespeare {your-config.ini}
75You should also symlink who.ini into same directory as your config file.
77Tweak the config file as appropriate and then setup the application::
79 paster setup-app config.ini
81[TODO: this should be part of setup-app]
85 $ shakespeare-admin db init
91The graphical user interface is a web interface.
93You can start a web server to provide a easy-to-use web interface to the
94shakespeare material and facilities by doing::
96 $ paster serve {your-config.ini}
98NB: {your-config.ini} should be replaced with the name of the config file you
1023. Commands and Command Line Interface
103--------------------------------------
105Main command line interface is via shakespeare-admin. Check it out by doing::
107 shakespeare-admin help
109In addition to shakespeare-admin commands there are also some paster commands.
110To see what is available::
1181. To load the data packages, make sure you have downloaded and installed the
119 relevant data package (e.g. shksprdata or miltondata) and then do::
121 shakespeare-admin --config {your-ini-file} db init_shksprdata
1232. Search index. To run the search index you will need xapian and the python
124 xapian bindings installed. (On Debian/Ubuntu this is xapian and python-xapian).
125 Then take a look at::
127 shakespeare-admin search
1293. Word of the day. Enable this in your config file and then run
130word_of_the_day command to pull the data.
139Follow the basic steps above but with an ini file named: development.ini
141NB: you'll probably want to change log levels to debug.
1431. Check out the administrative commands
144----------------------------------------
146 $ bin/shakespeare-admin help.
1482. Run the tests using either py.test of nosetests::
149----------------------------------------------------
151 $ nosetests shakespeare
154__application_name__ = 'shakespeare'
156def register_config(config_path):
158 # TODO: remove? 2008-08-24 not mentioned in docs any more
159 # envVarName = __application_name__.upper() + 'CONF'
160 # config_path = os.environ.get(envVarName, '')
161 config_path = os.path.abspath(config_path)
163 pasteconf = paste.deploy.appconfig('config:' + config_path)
164 import shakespeare.config.environment
165 shakespeare.config.environment.load_environment(pasteconf.global_conf,
166 pasteconf.local_conf)
169# TODO: rename to get_config()
171 from pylons import config