Changes between Version 8 and Version 9 of IniGetMacro


Ignore:
Timestamp:
Dec 20, 2008, 10:34:44 AM (15 years ago)
Author:
Douglas Clifton
Comment:

Updated page with new format and Welcome macro feature

Legend:

Unmodified
Added
Removed
Modified
  • IniGetMacro

    v8 v9  
    33== Description ==
    44
    5 The IniGetMacro package consists of two macros. The first, '''!IniGet''', returns as plain
    6 text the value of a [http://trac-hacks.org/wiki/TracIni trac.ini] configuration option. The
    7 `trac.ini` file is a simple flat-file database of sections and option/value pairs:
     5The IniGetMacro package consists of two macros. The first, [http://github.com/dwclifton/tracinigetmacro/tree/master/0.11/iniget/macro.py IniGet], returns as plain
     6text the value of a [http://trac-hacks.org/wiki/TracIni trac.ini] configuration option. The `trac.ini` file is a simple flat-file database of sections and option/value pairs:
    87
    98{{{
     
    1211}}}
    1312
    14 By calling the macro like so: `[[IniGet(section.name)]]`, it returns the value.
    15 If no option matches, it returns an error message. Some option names themselves
     13By calling the macro like so: `[[IniGet(section.name)]]`, it returns the value. If no option matches, it returns an error message. Some option names themselves
    1614contain periods, this is supported.
    1715
    18 The second macro in the package is '''Welcome''', and it returns a level 1 heading
     16The second macro in the package is [http://github.com/dwclifton/tracinigetmacro/tree/master/0.11/welcome/macro.py Welcome], and it returns a level 1 heading
    1917element in the following format:
    2018
     
    2321}}}
    2422
    25 Where `project.name` is dynamically inserted in the same manner as !IniGet.
     23Where `project.name` 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.
    2624
    2725These macros are useful for WikiStart project templates.
    2826
    29 == Bugs/Feature Requests ==
     27== Installation ==
    3028
    31 Existing bugs and feature requests for IniGetMacro are
    32 [report:9?COMPONENT=IniGetMacro here].
     29Download the zipped source from [http://trac-hacks.org/attachment/wiki/IniGetMacro/inigetmacro.zip?format=raw here], or clone the repository (see [#Source below]) from !GitHub to a location on your local drive. Visit the [http://github.com/dwclifton/tracinigetmacro/tree/master/0.11 0.11] directory and run:
     30 
     31{{{
     32python setup.py bdist_egg
     33cp dist/*.egg /trac/env/Project/plugins
     34}}}
    3335
    34 If you have any issues, create a
    35 [http://trac-hacks.org/newticket?component=IniGetMacro&owner=dwclifton new ticket].
     36== Configuration ==
     37 
     38Enable the macros in:
     39 
     40/trac/env/Project/conf/trac.ini:
     41 
     42{{{
     43[components]
     44iniget.* = enabled
     45welcome.* = enabled
     46}}}
     47 
     48Then restart your Web server.
    3649
    37 == Download ==
    38 
    39 Download the zipped source from [http://trac-hacks.org/attachment/wiki/IniGetMacro/inigetmacro.zip?format=raw here].
     50== Examples ==
     51 
     52{{{
     53[[Welcome]]
     54[[Welcome()]]
     55[[Welcome(This is the,Project)]]
     56[[Welcome(prefix=This is the,suffix=Project)]]
     57[[Welcome(suffix=Super Cool Project)]]
     58[[Welcome(,Super Cool Project)]]
     59 
     60The [[IniGet(project.name)]] project is designed to track and document software defects...
     61}}}
    4062
    4163== Source ==
    4264
    43 Browse the source at: [http://github.com/dwclifton/tracinigetmacro/tree/master GitHub][[BR]]
    44 Public clone URL:
     65 * Browse the source at: [http://github.com/dwclifton/tracinigetmacro/tree/master GitHub]
     66 * Public clone URL:
    4567{{{
    4668git clone git://github.com/dwclifton/tracinigetmacro.git
    4769}}}
    4870
    49 == Example ==
     71== Bugs/Feature Requests ==
    5072
    51 {{{
    52 [[Welcome]]
     73Existing bugs and feature requests for IniGetMacro are [report:9?COMPONENT=IniGetMacro here].
    5374
    54 The [[IniGet(project.name)]] project consists of a...
    55 }}}
     75If you have any issues, create a [http://trac-hacks.org/newticket?component=IniGetMacro&owner=dwclifton new ticket].
    5676
    5777== Recent Changes ==
     
    6181== Author/Contributors ==
    6282
    63 '''Author:''' [wiki:dwclifton][[BR]]
    64 '''Contributors:'''
     83 * '''Author''': [wiki:dwclifton]
     84 * '''Contributors''': The Python/Trac development community.