WikiStart/tags/Setup


For installation of the old, macro based tagging on 0.8, see tags/Setup/0.8.

Setting up tags in Trac

Note: setuptools must be installed on your system for this to work.

  1. Install Trac 0.9 or 0.10dev and set up a trac project.
  2. Copy the appropriate egg, attached below to your project's plugin directory. The "appropriate egg" is based on the version of Python you use. Or build your own from the sources hosted via svn at https://muness.textdriven.com/svn/edu/tags-plugin/trunk .
  3. Update your trac.ini with the following:
    [trac]
    default_handler = TagsWikiModule
    
    [components]
    trac.wiki.web_ui.wikimodule = disabled
    tractags.* = enabled
    
  4. Run trac-admin <env> upgrade on your Trac environment.
  5. Restart your web server.

At this stage the plugin should be working and you should see a text control for tags in your Wiki edit page. You should also see a navigation link in the top-right corner labelled Tag Index.


You're good to go. See tags for more on how to use tags.

Customising the Default Behaviour

If you want to customize the default behaviour of the tag index, or any of the macros, edit the [tags] section of your trac.ini:

OptionDescription
index=cloud|listDisplay the tag index as a cloud or list?
index.args=...Keyword arguments to pass to the index display function (see TagCloud and ListTags for details).
listing.args=...Keyword arguments to pass to the listing for each tag under the /tags/ URL space.
<macro>.args=...Default arguments to pass to each of the tag macros, in addition to those provided in the macro call.
expression_space=...true or false. enables/disables expression support under /tags

eg.

[tags]
index = cloud
index.args = smallest=10, biggest=40, mincount=2, showcount=false
listing.args = showheadings=true
tagcloud.args = mincount=2, showcount=false

If you want to customize which ticket fields to extract tags from, edit the fields variable in [tags.ticket] section in trac.ini. (Fields that can be used: component,severity,keywords,priority,owner,reporter,cc,version,milestone,status,resolution,summary,description; summary and description aren't recommended.). e.g.

[tags.ticket]
fields=component,severity,keywords

Known Issues

Attachments