Version 13 (modified by rjollos, 5 years ago) (diff)

Add maintainer

Display option values for trac.ini


Allows a Trac wiki author to insert the value of a trac.ini configuration option into a page.

The IniGetMacro package consists of two macros. The first, IniGet, returns as plain text the value of a trac.ini configuration option. The trac.ini file is a simple flat-file database of sections and option/value pairs:

name = value

By calling the macro like so: [[IniGet(]], it returns the value. If no option matches, it returns an error message. Some option names themselves contain periods, this is supported.

The second macro in the package is Welcome, and it returns a level 1 heading element in the following format:

<h1 id="welcome">Welcome to the Project</h1>

Where is dynamically inserted in the same manner as IniGet. The example above is the default behavior. However, Welcome also supports from zero to two arguments that allow the user to specify the prefix and/or suffix strings. Both standard and dictionary keyword methods are supported. If using the standard method, order is important, if using the keyword method it is not. You cannot mix both methods.

These macros are useful for WikiStart project templates.


Download the zipped source from here, or clone the repository (see below) from GitHub to a location on your local drive. Visit the 0.11 directory and run:

python bdist_egg
cp dist/*.egg /trac/env/Project/plugins


Enable the macros in: /trac/env/Project/conf/trac.ini:

iniget.* = enabled
welcome.* = enabled

You may need to restart your Web server.


[[Welcome(This is the,Project)]]
[[Welcome(prefix=This is the,suffix=Project)]]
[[Welcome(suffix=Super Cool Project)]]
[[Welcome(,Super Cool Project)]]
The [[IniGet(]] project is designed to track and document software defects...


  • Browse the source at: GitHub
  • Public clone URL:
    git clone git://

Bugs/Feature Requests

Existing bugs and feature requests for IniGetMacro are here.

If you have any issues, create a new ticket.

Recent Changes

[12210] by rjollos on 2012-10-19 03:16:30
Updated README with contents of trac-hacks wiki page.
[12209] by rjollos on 2012-10-19 03:12:14
Fixes #6039: Added documentation to macros. Updated README with contents of trac-hacks page. Imported the IniGet macro from GitHub.
[12208] by rjollos on 2012-10-19 02:53:32
Removed the empty 0.11 directory.


  • Author: dwclifton
  • Maintainer: dwclifton
  • Contributors: The Python/Trac development community.