Add news item for News improvements.
[htmlpurifier-web.git] / viewvc.cgi
blob15e7b6704f130ef76795935bd43493d287440484
1 #!/usr/bin/python
2 # -*-python-*-
4 # Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved.
6 # By using this file, you agree to the terms and conditions set forth in
7 # the LICENSE.html file which can be found at the top level of the ViewVC
8 # distribution or at http://viewvc.org/license-1.html.
10 # For more information, visit http://viewvc.org/
12 # -----------------------------------------------------------------------
14 # viewvc: View CVS/SVN repositories via a web browser
16 # -----------------------------------------------------------------------
18 # This is a teeny stub to launch the main ViewVC app. It checks the load
19 # average, then loads the (precompiled) viewvc.py file and runs it.
21 # -----------------------------------------------------------------------
24 #########################################################################
26 # INSTALL-TIME CONFIGURATION
28 # These values will be set during the installation process. During
29 # development, they will remain None.
32 LIBRARY_DIR = r"/home/ezyang/viewvc/lib"
33 CONF_PATHNAME = r"/home/ezyang/viewvc/viewvc.conf"
35 #########################################################################
37 # Adjust sys.path to include our library directory
40 import sys
41 import os
43 if LIBRARY_DIR:
44 sys.path.insert(0, LIBRARY_DIR)
45 else:
46 sys.path.insert(0, os.path.abspath(os.path.join(sys.argv[0],
47 "../../../lib")))
49 #########################################################################
51 ### add code for checking the load average
53 #########################################################################
55 # go do the work
56 import sapi
57 import viewvc
59 server = sapi.CgiServer()
60 cfg = viewvc.load_config(CONF_PATHNAME, server)
61 viewvc.main(server, cfg)