Changes between Version 45 and Version 46 of TracLegosScript
- Timestamp:
- Nov 9, 2015, 11:55:10 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracLegosScript
v45 v46 26 26 27 27 Existing bugs and feature requests for TracLegosScript are 28 [query:status!=closed&component=TracLegosScript&order=priority here]. 28 [report:9?COMPONENT=TracLegosScript here]. 29 29 30 If you have any issues, create a 30 [/newticket?component=TracLegosScript &owner=k0snew ticket].31 [/newticket?component=TracLegosScript new ticket]. 31 32 32 33 [[TicketQuery(component=TracLegosScript&group=type,format=progress)]] 33 34 34 == Download and Source 35 36 Download the [download:traclegosscript zipped source], check out [/svn/traclegosscript/anyrelease using Subversion], or [source:traclegosscript/anyrelease browse the source] with Trac. 35 == Download 36 37 Download the zipped source from [export:traclegosscript here]. 38 39 == Source 40 41 Check out [/svn/traclegosscript/anyrelease using Subversion], or [source:traclegosscript/anyrelease browse the source] with Trac. 37 42 38 43 == Installation 39 44 40 Installation is done in t he 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 edittable source.45 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. 41 46 42 47 === Example Template 43 48 44 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`:49 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`: 45 50 46 51 {{{ … … 55 60 === Turning an Existing {{{trac.ini}}} File into a Template 56 61 57 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. 62 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: 58 63 59 64 {{{ … … 75 80 }}} 76 81 77 To customize the template, edit `yourproject/yourproject/template/conf/trac.ini`. 82 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`. 78 83 79 84 === Setup of [http://pythonpaste.org/webob/ WebOb] View for Project Creation 80 85 81 !TracLegos includes a [http://pythonpaste.org paste] webapp that serves existing projects (delegating to trac) and also allows creating new projects. In order 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).82 83 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.86 !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). 87 88 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. 84 89 85 90 == Configuration 86 91 87 !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.88 89 Variables are currently supported in a site configuration file. See source:traclegosscript/anyrelease/example/site_example.ini for the format of this file. 90 91 {{{ 92 !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. 93 94 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: 95 96 {{{#!sh 92 97 create-trac-project -c example/site_example.ini ... 93 98 }}} … … 95 100 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`: 96 101 97 {{{ 102 {{{#!sh 98 103 traclegos.conf = /path/to/site_example.ini, /path/to/myorganization.ini 99 104 }}} … … 129 134 === Example of command line usage 130 135 131 {{{ 136 {{{#!sh 132 137 > create-trac-project 133 138 Usage: create-trac-project [options] project <project2> <...> var1=1 var2=2 ... … … 162 167 === Example of turning an existing project into a paste-script template 163 168 164 {{{ 169 {{{#!sh 165 170 > paster create -t trac_project foo 166 171 Selected and implied templates: