Ez produce project Python script
Description
2007-09-12 I refreshed this script to python-script from unix-shell script.
What Ez produce project script ?
this script execute 'createdb, svnadmin, trac-admin' automaticaly.
# python ./ezProduceTrac.py add
PROJECTNAME from stdin yourself.
- create PostgreSQL DB names PROJECTNAME
- create subversion repos to env[ 'svn' ][ 'repos' ]/PROJECTNAME
- create trac dir on env[ 'trac' ][ 'projct' ]/PROJECTNAME
- init trac project
- chmod 777 projectdir, projectdir/log, projectdir/plugins
and , 'dropdb, remove repos dir, remove project dir automaticaly.
# python ./ezProduceTrac.py del
PROJECTNAME from stdin yourself.
- check project
- drop PostgreSQL DB names PROJECTNAME
- remove subverion repos from env[ 'svn' ][ 'repos' ]/PROJECTNAME
- remove trac dir from env[ 'trac' ][ 'projct' ]/PROJECTNAME
and , optional list
# python ./ezProduceTrac.py [list]
- show projects
- show current settings
bash@localhost# ./ezProduceTrac.py list Current Projects list: 合計 0 Current settings: A = auto detect, o = valid path, x = invalid path [SVN] admin: A /usr/bin/svnadmin repos: o /srv/svn/repos [TRAC] templ: o /usr/share/trac/templates admin: A /usr/bin/trac-admin project: o /home/trac/public_html [PGSQL] create: A /usr/bin/createdb drop: A /usr/bin/dropdb bash@localhost#
* for postgresql *
Setting yourself
edit ezProduceTrac.py
env = {
'svn':
{
'admin':'do not touch',
'repos':'/srv/svn/repos'
},
'trac':
{
'template':'/usr/share/trac/templates',
'admin':'do not touch',
'project':'/home/trac/public_html'
},
'pgsql':
{
'create':'do not touch',
'drop':'do not touch'
}
}
Example
bash@localhost# python ./ezProduceTrac.py del Current Projects list: total 4 drwxr-xr-x 7 root root 4096 2007-09-12 11:32 test please input project name: test [DEBUG] projectname = test /home/trac/public_html/test/README [INFO] removing trac project: test [INFO] drop db test [DEBUG] su - postgres -c "/usr/bin/dropdb test" DROP DATABASE [INFO] complete. [INFO] delete svn repos test [DEBUG] rm -rf /srv/svn/repos/test [INFO] complete. [INFO] delete project dir test [DEBUG] rm -rf /home/trac/public_html/test [INFO] complete. bash@localhost#
Bugs/Feature Requests
Existing bugs and feature requests for EzProduceScript are here.
If you have any issues, create a new ticket.
Source
You can check out EzProduceScript from here using Subversion, or browse the source with Trac.
Recent Changes
[2632] by token on 09/11/07 22:14:50
some fix
[2631] by token on 09/11/07 21:45:51
python script version for trac-admin 0.10.4
[470] by token on 03/10/06 01:42:15
first commit maybe stable
[469] by token on 03/10/06 01:40:03
New hack EzProduceScript, created by token
Author/Contributors
Author: token
Contributors:
