About Download Docs Changes

Plain CGI on shared hosting

On nearlyfreespeech.net (which has mercurial and python 2.5 preinstalled), here is how to set up Hatta. Most likely the procedure for installation on other CGI-based shared hosting situations will be similar:

cd /home/public

mkdir -p /home/protected/lib/python2.5/site-packages/
export PYTHONPATH=/home/protected/lib/python2.5/site-packages
easy_install --prefix /home/protected Werkzeug
export -n PYTHONPATH

wget http://hg.hatta-wiki.org/hatta/raw-file/tip/hatta.py
emacs hattarun.py #see below
chmod a+x hattarun.py

The following is the contents of the file "hattarun.py":

#!/usr/bin/env python

import site

import hatta
import wsgiref.handlers
import os

config = hatta.WikiConfig(
    pages_path='/home/protected/hatta/pages/', # XXX Edit this!
    cache_path='/home/protected/hatta/cache/', # XXX Edit this!
application = hatta.Wiki(config).application

In this setup, "hattarun.py" is the relevant URL.

If something fails, you can try enabling tracebacks by adding this before "import site" in hattarun.py:

import cgitb; cgitb.enable()