3
A Bloxsom clone in python, see http://www.raelity.org/apps/blosxom/ for
6
# Uncomment this if something goes wrong (for debugging)
7
#import cgitb; cgitb.enable()
9
# Settings are now in config.py, you should disable access to it by htaccess
10
# (make it executable or deny access)
13
# If the user defined a "codebase" property in their config file,
14
# then we insert that into our sys.path because that's where the
15
# PyBlosxom installation is.
16
if config.py.has_key("codebase"):
18
sys.path.insert(0, config.py["codebase"])
20
__author__ = 'Wari Wahab <wari@wari.per.sg>'
21
__version__ = config.py['pyblosxom_version']
22
__date__ = "$Date: 2004/05/04 20:53:48 $"
23
__revision__ = "$Revision: 1.7 $"
24
__copyright__ = "Copyright (c) 2003-2004 Wari Wahab"
25
__license__ = "Python"
27
if __name__ == '__main__':
28
from Pyblosxom.pyblosxom import Request, test_installation, PyBlosxom
32
req.addConfiguration(config.py)
35
for mem in ["HTTP_HOST", "HTTP_USER_AGENT", "HTTP_REFERER", "PATH_INFO",
36
"QUERY_STRING", "REMOTE_ADDR", "REQUEST_METHOD", "REQUEST_URI",
37
"SCRIPT_NAME", "HTTP_IF_NONE_MATCH", "HTTP_IF_MODIFIED_SINCE"]:
38
d[mem] = os.environ.get(mem, "")
41
if not os.environ.get("REQUEST_METHOD", ""):
42
if len(sys.argv) > 1 and sys.argv[1] == "--static":
43
if "--incremental" in sys.argv:
48
p.runStaticRenderer(incremental)
50
test_installation(req)
56
# vim: shiftwidth=4 tabstop=4 expandtab