-----------------------------------
Deliverance README
-----------------------------------
See: http://www.openplans.org/projects/deliverance
for more information
Contents:
* What is Deliverance?
* Quick Start to build deliverance
* Deliverance Proxy
* WSGI Middleware
* Command Line Transformations
* Simple Tests
* WSGI Tests
* Quick Example
----------------------------------
What is Deliverance?
----------------------------------
Deliverance is a non-invasive mechanism for combining HTML content produced
by other systems and normal web pages that typify a desired look and feel
(themes) using a set of rules. This approach allows the "branding" aspects
of a design to remain separate from content production, allows designers to
avoid using and mixing in particular template syntaxes and allows reuse of
existing static designs.
-----------------------------------
Quick Start to build Deliverance
-----------------------------------
The easiest way to get Deliverance installed is to checkout the
buildout and follow the instructions found there.
$ svn co http://codespeak.net/svn/z3/deliverance/buildout/trunk
Otherwise, to install Deliverance manually, first get workingenv.py
from http://cheeseshop.python.org/pypi/workingenv.py. Create a working
environment for Deliverance and its dependencies:
$ workingenv.py deliverance_env
$ source deliverance_env/bin/activate
Then install recent versions of libxml2, libxslt and lxml. You are
likely to encounter segfaults and other failures if recent versions
are not used.
Checkout and setup Deliverance, then make sure your installation is
complete by running the tests:
$ svn co http://codespeak.net/svn/z3/deliverance/trunk/ deliverance
$ cd deliverance
$ python setup.py develop
$ nosetests
You can also run the tests like this:
$ deliverance_env/bin/deliverance-tests
$ deliverance_env/bin/deliverance-speed
----------------------------------------------
Deliverance Proxy
----------------------------------------------
The deliverance proxy is a standalone application which serves a
themed version of some web location using a theme and a set of rules.
eg:
$ deliverance-proxy --serve=localhost:5001 --proxy=localhost:8080
--theme=http://www.example.org
--rule=file:///some/path/somerulesfile.xml
This example provides a themed version of a local webserver at port
8080 served on port 5001. The theme page is http://www.example.org and
the rules are specified in somerulesfile.xml.
For more options, run:
$ deliverance-proxy --help
------------------------------------------------
WSGI Middleware
------------------------------------------------
Deliverance can also be used directly in a WSGI stack using the python
class in deliverance.wsgifilter.DeliveranceMiddleware. See
deliverance/wsgifilter.py and deliverance/test_wsgi.py for examples.
-------------------------------------------------
Command Line Transformations
-------------------------------------------------
The command line tool used to execute Deliverance is called
deliverance-handtransform. For instructions, run:
$ deliverance-handtransform --help
The theme, rules and other parameters are specified using command line
options -t, -r, etc. The result of the transform is output to
standard out.
To avoid lengthy command lines, the tool can accept a "blend" file,
using the -f flag, which describes the theme and rules to apply.
eg:
$ deliverance-handtransform -f ./blendfile.xml http://www.example.org
The second argument refers to the content; blendfile.xml contains
something like: