Suddenly, I wanted to do ticket-driven development, and I was curious about what happened to Trac, which was popular a few years ago and I don't hear much about it now, so I installed it.
Speaking of Trac, Trac Lightning for Windows is famous, but to be honest, I don't recommend it to programmers. That's because Trac Lightning puts various plug-ins in the ruggedness, and honestly, the functions that I do not use at all interfere with it, and it is troublesome to delete them one by one, so this time I installed and operated pure Trac Tell me the story.
This story is I am talking based on ** Trac ver 1.0.4 **.
Information on v0.1 and v0.12, which is the most popular Trac, is on the WEB, but this time I will use the latest v1.0.4. The settings are different! Please do not mourn. (Wailed person w
Since it is made of Python, it can be installed with pip.
only this. (As expected, Python! I fall in love with it w I long for it w)
Create a folder to save the set of projects operated by Trac.
For the time being, I created a folder called Main.
You can configure Trac with trac-admin. ./Main is the directory you just created initenv is to initialize in that directory.
So, when I hit the command, it doesn't look like the following ... It's actually in English, so please proceed somehow.
There are two items. Project name and database selection. The project name is main this time The database is enter and uses the default SQLite. SQLite best w
I hate Apache (because it's huge beyond my understanding), so this time it's Python, so why not have a simple server? I thought it was included in Trac as standard.
tracd is Trac's server app, --port is the port number setting, but --host is also available. The rest is a directory declaration.
Gradually launch your browser and try to access localhost: 1121 to the suspicious demon.
Then, the following site will appear, and when you click the link,
Will be. (Oh? I'm sorry if you noticed that the menu is in English, please understand that I will write the method of Japaneseization later.)
Congratulations. The installation of Trac has been completed successfully. Next is the story of passwords and Japanese localization.
Login with Trac is Basic-login. I think I could have selected other Login methods, but I'm not sure, so I'll pass.
So, here as well, various sites say to use Apachi, but here we generate hash code with Python.
pass.py
from optparse import OptionParser
import md5
# 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")
(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")
# Generate the string to enter into the htdigest file
realm = 'trac'
kd = lambda x: md5.md5(':'.join(x)).hexdigest()
str = ':'.join((options.username, realm, kd([options.username, realm, options.password])))
f = open("login","w")
f.write(str)
f.close()
A little modification of the official sample,
Now that the login file is created, start the server again.
As you can see, --auth has been added.
--auth is --auth =
If you start it with this, if you go safely, the ticket creation tab will increase.
Trac uses Subversion, so put it in first.
Put it in something like that
So download the file and
easy_install Babel
python setup.py extract_messages
python setup.py update_catalog
python setup.py install
Install with.
And when I start Tracd again, I think the menu is a little Japanese.
I don't think many people know about Trac now, so http://ja.wikipedia.org/wiki/Trac It's a little old http://itpro.nikkeibp.co.jp/article/COLUMN/20080414/298973/ You may be able to grasp the situation if you see (Honestly, Trac and ticket-driven have been popular since around 2010, so there may be better ones now. Also, Trac became Ver1.0 in 2012, and now it is Ver1.0.4. )
The reason I chose Trac is because it's made by Python! !! It is w
If you need a backup, you can copy the entire set of directories specified by trac-admin. This is wonderful. Plus, there's raw SQLite in the db directory, so you can even rebuild it. Great.
Also, if you have multiple projects, use trac-admin to create a new one or copy an existing file.
tracd --host $HOST --port
PORT --auth=*,login,trac ./ Project1
--auth=*,login,trac ./$Project2 \
It's OK if you make a good script. Great.
Since Trac is made of Python, there are probably more tricks. Even with regard to the server, I wonder if it can be done because it runs on uwsgi ~ Fufufu w Excuse me for being bad. w
Recommended Posts