Changes between Initial Version and Version 1 of TracMacroConfigPlugin


Ignore:
Timestamp:
Nov 9, 2012, 7:00:06 PM (11 years ago)
Author:
Ryan J Ollos
Comment:

Restored page after accidental delete.

Legend:

Unmodified
Added
Removed
Modified
  • TracMacroConfigPlugin

    v1 v1  
     1[[PageOutline(2-5,Contents,pullout)]]
     2         
     3= Help Macros and Plugins with trac.ini lookup and defaulting =
     4
     5== Description ==
     6
     7''By itself, this modules does not provide any functionality.'''
     8         
     9This module provides a helper class which can be used by other plugins,
     10especially macros, in retrieving optional arguments from trac.ini.
     11
     12A macro using this module, can be called with a '''config=xxx''' option,
     13to retrieve a set of options which in trac.ini all start with prefix '''xxx.'''
     14         
     15Inheritance is supported, by writing an option '''xxx.inherit = yyy''' in trac.ini - all macro options not yet determined, are then searched with the
     16other prefix, '''yyy.'''
     17         
     18Multiple inheritance is supported, by writing '''config=prefixA|prefixB''' in the macro invocation, or writing an '''xxx.inherit = prefixC|prefixD''' option in trac.ini
     19 
     20The macro module which uses this functionality, specifies a list of expected options, as well as their defaults. These defaults will then be used when the respective option is specified nowhere.
     21         
     22== Example ==
     23         
     24Right now, as this is brand new, no plugin / macro uses the functionality.
     25         
     26There is an '''examlemacro.py''' file included in the distribution, which when enabled through the admin plugings interface, provides a macro named '''!TracMacroConfigExample''', which displays a table detailling various interesting things about concrete option lookups. This allows you to play with macro arguments and in a corresponding '''[macroconfig-example]''' section in trac.ini,
     27to play with inheritance setups.
     28
     29This is how exemplary calls to that macro would be written in a wiki page:
     30{{{
     31[[TracMacroConfigExample(config=class-c, extra=more stuff)]]
     32}}}
     33
     34Use this together with a trac.ini section like this:
     35{{{
     36#!ini
     37[macroconfig-example]
     38class-a.bool = True
     39class-a.text = A Text
     40class-b.bool = False
     41class-b.int = 73
     42class-c.config = class-a|class-b
     43class-c.list = knees|toes
     44}}}
     45
     46== Bugs/Feature Requests == 
     47
     48Existing bugs and feature requests for TracMacroConfigPlugin are [report:9?COMPONENT=TracMacroConfigPlugin here].
     49
     50If you have any issues, create a  [http://trac-hacks.org/newticket?component=TracMacroConfigPlugin&owner=bof new ticket].
     51
     52== Download ==
     53
     54Download the zipped source from [download:tracmacroconfigplugin here].
     55
     56== Source ==
     57
     58You can check out TracMacroConfigPlugin from [http://trac-hacks.org/svn/tracmacroconfigplugin here] using Subversion, or [source:tracmacroconfigplugin browse the source] with Trac.
     59
     60== Recent Changes ==
     61
     62[[ChangeLog(tracmacroconfigplugin, 3)]]
     63
     64== Author/Contributors ==
     65
     66'''Author:''' [wiki:bof] [[BR]]
     67'''Maintainer:''' [wiki:bof] [[BR]]
     68'''Sponsor:''' [http://www.yalwa.de/ Yalwa Branchenbuch] [[BR]]
     69'''Contributors:'''