23 | | |
24 | | == Bugs/Feature Requests |
25 | | |
26 | | This is experimental software, so feedback and feature requests are greatly appreciated. |
27 | | |
28 | | Existing bugs and feature requests for TracLegosScript are |
29 | | [report:9?COMPONENT=TracLegosScript here]. |
30 | | |
31 | | If you have any issues, create a |
32 | | [/newticket?component=TracLegosScript new ticket]. |
33 | | |
34 | | [[TicketQuery(component=TracLegosScript&group=type,format=progress)]] |
35 | | |
36 | | == Download |
37 | | |
38 | | Download the zipped source from [export:traclegosscript here]. |
39 | | |
40 | | == Source |
41 | | |
42 | | Check out [/svn/traclegosscript/anyrelease using Subversion], or [source:traclegosscript/anyrelease browse the source] with Trac. |
43 | | |
44 | | == Installation |
45 | | |
46 | | Installation is done in typical Python manner: once you have downloaded the source, run {{{python setup.py install}}} for installation into Python's site packages or {{{python setup.py develop}}} to install with editable source. |
47 | | |
48 | | === Example Template |
49 | | |
50 | | TracLegosScript also comes with an existing template: source:traclegosscript/anyrelease/example/oss, which is an example of the kind of template used at [http://topp.openplans.org/ The Open Planning Project] for open source software projects. To install this template, run {{{python setup.py install}}} or {{{python setup.py develop}}} from this directory. This [http://pythonpaste.org/script/developer.html#templates PasteScript template] can be seen in the output of `paster create --list-templates`: |
51 | | |
52 | | {{{ |
53 | | (TracLegos)> paster create --list-templates |
54 | | Available templates: |
55 | | basic_package: A basic setuptools-enabled package |
56 | | paste_deploy: A web application deployed through paste.deploy |
57 | | oss_project: Open Source Software project trac template |
58 | | trac_project: templatize configuration for a trac project |
59 | | }}} |
60 | | |
61 | | === Turning an Existing {{{trac.ini}}} File into a Template |
62 | | |
63 | | The last project shown in the templates listed by `paster create --list-templates`, [source:traclegosscript/anyrelease/traclegos/project.py trac_project], is a template designed to turn an existing [http://trac.edgewall.org/wiki/TracIni trac.ini] configuration file into a [source:traclegosscript/anyrelease/traclegos/project.py TracProject] template that can be used by TracLegosScript for project creation. To turn an existing configuration `trac.ini` into a [source:traclegosscript/anyrelease/traclegos/project.py TracProject] template, run: |
64 | | |
65 | | {{{ |
66 | | paster create -t trac_project yourproject |
67 | | }}} |
68 | | |
69 | | This will output a directory structure |
70 | | |
71 | | {{{ |
72 | | yourproject/ |
73 | | |-- setup.py |
74 | | |-- yourproject |
75 | | | |-- __init__.py |
76 | | | |-- project.py |
77 | | | `-- template |
78 | | | `-- conf |
79 | | | `-- trac.ini |
80 | | `-- yourproject.egg-info |
81 | | }}} |
82 | | |
83 | | To customize the template, edit `yourproject/yourproject/template/conf/trac.ini`. [http://pythonpaste.org/script PasteScript] template variables can be denoted and `pre` and `post` template writing setup can be done by customizing `yourproject/yourproject/project.py`. |
84 | | |
85 | | === Setup of [http://pythonpaste.org/webob/ WebOb] View for Project Creation |
86 | | |
87 | | !TracLegos includes a [http://pythonpaste.org paste] webapp that serves existing projects (delegating to Trac) and also allows creating new projects. To use this view, you must have at least one template installed, so first install the example template as described above. Once the {{{topp_trac_template}}} (or any other template) is installed, you should be all set to run the webapp by running {{{paster serve development.ini}}} from the top-level directory of your copy of the !TracLegos source (source:traclegosscript/anyrelease/development.ini). |
88 | | |
89 | | Point your browser at http://127.0.0.1:8080 and you should be all set with a bare-bones web-based Trac project creator. |
90 | | |
91 | | == Configuration |
92 | | |
93 | | !TracLegos is designed so that site-specific configuration does not need to (and really shouldn't) live in the templates but can live in its own {{{.ini}}} file. The advantages of this is that templates from XYZcorp can be shared with ABCcorp without modification but that a policy for Trac project creation can be effectively enforced as well as having the convenience of domain-specific variables by using a site configuration {{{.ini}}} file (or files). See TracLegosTemplates for a fuller explanation of how multiple templates can be used to factor out site-specific configuration. |
94 | | |
95 | | Variables are currently supported in a site configuration file. See source:traclegosscript/anyrelease/example/site_example.ini for the format of this file. Using the command line, site configuration {{{.ini}}} files are specified with the `-c` option: |
96 | | |
97 | | {{{#!sh |
98 | | create-trac-project -c example/site_example.ini ... |
99 | | }}} |
100 | | |
101 | | Configuration files may also be specified for the web front-end. To use this, add the following option to the {{{.ini}}} file specified for `paster serve`: |
102 | | |
103 | | {{{#!sh |
104 | | traclegos.conf = /path/to/site_example.ini, /path/to/myorganization.ini |
105 | | }}} |
106 | | |
107 | | == !TracLegos Components |
108 | | |
109 | | !TracLegos is designed to be configurable and extensible. Here are the components that make that possible: |
110 | | * TracLegosTemplates : the process by which !TracLegos transforms templates into Trac projects |
111 | | * TracLegosConfiguration : how to control what !TracLegos does |
112 | | |
113 | | == Examples |
| 110 | == Bugs/Feature Requests |
| 111 | |
| 112 | This is experimental software, so feedback and feature requests are greatly appreciated. |
| 113 | |
| 114 | Existing bugs and feature requests for TracLegosScript are |
| 115 | [report:9?COMPONENT=TracLegosScript here]. |
| 116 | |
| 117 | If you have any issues, create a |
| 118 | [/newticket?component=TracLegosScript new ticket]. |
| 119 | |
| 120 | [[TicketQuery(component=TracLegosScript&group=type,format=progress)]] |
| 121 | |
| 122 | == Download |
| 123 | |
| 124 | Download the zipped source from [export:traclegosscript here]. |
| 125 | |
| 126 | == Source |
| 127 | |
| 128 | Check out [/svn/traclegosscript/anyrelease using Subversion], or [source:traclegosscript/anyrelease browse the source] with Trac. |
| 129 | |
| 130 | == Installation |
| 131 | |
| 132 | Installation is done in typical Python manner: once you have downloaded the source, run {{{python setup.py install}}} for installation into Python's site packages or {{{python setup.py develop}}} to install with editable source. |
| 133 | |
| 134 | === Example Template |
| 135 | |
| 136 | TracLegosScript also comes with an existing template: source:traclegosscript/anyrelease/example/oss, which is an example of the kind of template used at [http://topp.openplans.org/ The Open Planning Project] for open source software projects. To install this template, run {{{python setup.py install}}} or {{{python setup.py develop}}} from this directory. This [http://pythonpaste.org/script/developer.html#templates PasteScript template] can be seen in the output of `paster create --list-templates`: |
| 137 | |
| 138 | {{{ |
| 139 | (TracLegos)> paster create --list-templates |
| 140 | Available templates: |
| 141 | basic_package: A basic setuptools-enabled package |
| 142 | paste_deploy: A web application deployed through paste.deploy |
| 143 | oss_project: Open Source Software project trac template |
| 144 | trac_project: templatize configuration for a trac project |
| 145 | }}} |
| 146 | |
| 147 | === Turning an Existing {{{trac.ini}}} File into a Template |
| 148 | |
| 149 | The last project shown in the templates listed by `paster create --list-templates`, [source:traclegosscript/anyrelease/traclegos/project.py trac_project], is a template designed to turn an existing [http://trac.edgewall.org/wiki/TracIni trac.ini] configuration file into a [source:traclegosscript/anyrelease/traclegos/project.py TracProject] template that can be used by TracLegosScript for project creation. To turn an existing configuration `trac.ini` into a [source:traclegosscript/anyrelease/traclegos/project.py TracProject] template, run: |
| 150 | |
| 151 | {{{ |
| 152 | paster create -t trac_project yourproject |
| 153 | }}} |
| 154 | |
| 155 | This will output a directory structure |
| 156 | |
| 157 | {{{ |
| 158 | yourproject/ |
| 159 | |-- setup.py |
| 160 | |-- yourproject |
| 161 | | |-- __init__.py |
| 162 | | |-- project.py |
| 163 | | `-- template |
| 164 | | `-- conf |
| 165 | | `-- trac.ini |
| 166 | `-- yourproject.egg-info |
| 167 | }}} |
| 168 | |
| 169 | To customize the template, edit `yourproject/yourproject/template/conf/trac.ini`. [http://pythonpaste.org/script PasteScript] template variables can be denoted and `pre` and `post` template writing setup can be done by customizing `yourproject/yourproject/project.py`. |
| 170 | |
| 171 | === Setup of [http://pythonpaste.org/webob/ WebOb] View for Project Creation |
| 172 | |
| 173 | !TracLegos includes a [http://pythonpaste.org paste] webapp that serves existing projects (delegating to Trac) and also allows creating new projects. To use this view, you must have at least one template installed, so first install the example template as described above. Once the {{{topp_trac_template}}} (or any other template) is installed, you should be all set to run the webapp by running {{{paster serve development.ini}}} from the top-level directory of your copy of the !TracLegos source (source:traclegosscript/anyrelease/development.ini). |
| 174 | |
| 175 | Point your browser at http://127.0.0.1:8080 and you should be all set with a bare-bones web-based Trac project creator. |
| 176 | |
| 177 | == Configuration |
| 178 | |
| 179 | !TracLegos is designed so that site-specific configuration does not need to (and really shouldn't) live in the templates but can live in its own {{{.ini}}} file. The advantages of this is that templates from XYZcorp can be shared with ABCcorp without modification but that a policy for Trac project creation can be effectively enforced as well as having the convenience of domain-specific variables by using a site configuration {{{.ini}}} file (or files). See TracLegosTemplates for a fuller explanation of how multiple templates can be used to factor out site-specific configuration. |
| 180 | |
| 181 | Variables are currently supported in a site configuration file. See source:traclegosscript/anyrelease/example/site_example.ini for the format of this file. Using the command line, site configuration {{{.ini}}} files are specified with the `-c` option: |
| 182 | |
| 183 | {{{#!sh |
| 184 | create-trac-project -c example/site_example.ini ... |
| 185 | }}} |
| 186 | |
| 187 | Configuration files may also be specified for the web front-end. To use this, add the following option to the {{{.ini}}} file specified for `paster serve`: |
| 188 | |
| 189 | {{{#!sh |
| 190 | traclegos.conf = /path/to/site_example.ini, /path/to/myorganization.ini |
| 191 | }}} |
| 192 | |
| 193 | == !TracLegos Components |
| 194 | |
| 195 | !TracLegos is designed to be configurable and extensible. Here are the components that make that possible: |
| 196 | * TracLegosTemplates : the process by which !TracLegos transforms templates into Trac projects |
| 197 | * TracLegosConfiguration : how to control what !TracLegos does |
| 198 | |