Display option values for trac.ini

Notice: This plugin is unmaintained and available for adoption.


This is a macro that 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:

Welcome to the Project

In this example 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. When using the standard method, then the order is important, but when using the keyword method it is not. You cannot mix both methods.

These macros are useful for WikiStart project templates.

Other examples

[[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.

Bugs/Feature Requests

Existing bugs and feature requests for IniGetMacro are here.

If you have any issues, create a new ticket.


1 / 1


Download the zipped source from here.


You can check out IniGetMacro from here using Subversion, or browse the source with Trac.


Install this plugin using and copying the egg to the plugins directory:

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.

Recent Changes

17559 by rjollos on 2019-11-17 18:54:13
Import tag from Trac rather than Genshi
15264 by rjollos on 2016-02-11 04:22:34
Remove unnecessary svn:mime-type on py files

svn:mime-type was set to "plain" for many files.

12210 by rjollos on 2012-10-19 01:16:30
Updated README with contents of trac-hacks wiki page.


Author: dwclifton
Maintainer: none (needsadoption)

Last modified 23 months ago Last modified on May 28, 2022, 6:28:27 PM