trac安装所需的工具下载地址
2009-05-04 08:16 setsail_wu 阅读(196) 评论(0) 编辑 收藏 举报安装指南:http://www.cnblogs.com/longsan/articles/1282098.html
Genshi-0.5.1.win32-py2.5.exe
http://genshi.edgewall.org/wiki/Download
svn-python-1.5.6.win32-py2.5.exe:
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8637&expandFolder=8637&folderID=469
(备注:安装svn-python后,必须将SVN根目录下的dll文件复制到Python25/Lib/site-packages/libsvn)
http://initd.org/pub/software/pysqlite/releases/2.4/2.4.1/
setuptools-0.6c7.win32-py2.5.exe
http://pypi.python.org/pypi/setuptools/0.6c7
Trac-0.11.4.win32.exe
http://trac.edgewall.org/wiki/TracDownload
accountmanagerplugin_trunk-r5655.zip
http://trac-hacks.org/wiki/AccountManagerPlugin
#####tony.wu : trac-digest.py
from optparse import OptionParser
# The md5 module is deprecated in Python 2.5
try:
from hashlib import md5
except ImportError:
from md5 import md5
realm = 'trac'
# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
help="the password to use")
parser.add_option("-r", "--realm",action="store", dest="realm", type = "string",
help="the realm in which to create the digest")
(options, args) = parser.parse_args()
# check options
if (options.username is None) or (options.password is None):
parser.error("You must supply both the username and password")
if (options.realm is not None):
realm = options.realm
# Generate the string to enter into the htdigest file
kd = lambda x: md5(':'.join(x)).hexdigest()
print ':'.join((options.username, realm, kd([options.username, realm, options.password])))