Edgewall Software

Changes between Version 56 and Version 57 of WikiMacros


Ignore:
Timestamp:
Jul 23, 2018, 10:34:12 PM (6 years ago)
Author:
figaro
Comment:

Further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • WikiMacros

    v56 v57  
    1818== Using Macros
    1919
    20 Macro calls are enclosed in double-square brackets `[[..]]`. Like Python functions macros can have arguments, which take the form of a comma separated list within parentheses `[[..(,)]]`.
    21 
    22 === Getting Detailed Help
    23 
    24 The list of available macros and the full help can be obtained using the !MacroList macro, see [#AvailableMacros below].
    25 
    26 A brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`.
    27 
    28 Detailed help on a specific macro can be obtained by passing it as an argument to !MacroList, e.g. `[[MacroList(MacroList)]]`, or more conveniently, by appending a question mark (`?`) to the macro's name, like in `[[MacroList?]]`.
    29 
    30 === Example
    31 
    32 A list of the 3 most recently changed wiki pages starting with 'Trac':
     20Macro calls are enclosed in double-square brackets `[[..]]`. Like Python functions macros can have arguments, which take the form of a comma separated list within parentheses `[[..(,)]]`. A common macro used is a list of the 3 most recent changes to a wiki page, or here, for example, all wiki pages starting with 'Trac':
    3321
    3422||= Wiki Markup =||= Display =||
     
    4129[[RecentChanges(Trac,3)]]
    4230}}}
    43 |-----------------------------------
    44 {{{#!td
    45   {{{
    46   [[RecentChanges?(Trac,3)]]
    47   }}}
    48 }}}
    49 {{{#!td style="padding-left: 2em;"
    50 [[RecentChanges?(Trac,3)]]
    51 }}}
    52 |-----------------------------------
    53 {{{#!td
    54   {{{
    55   [[?]]
    56   }}}
    57 }}}
    58 {{{#!td style="padding-left: 2em"
    59 {{{#!html
    60 <div class="trac-macrolist">
    61 <h3><code>[[Image]]</code></h3>Embed an image in wiki-formatted text.
    6231
    63 The first argument is the file, as in <code>[[Image(filename.png)]]</code>
    64 <h3><code>[[InterTrac]]</code></h3>Provide a list of known <a class="wiki" href="/wiki/InterTrac">InterTrac</a> prefixes.
    65 <h3><code>[[InterWiki]]</code></h3>Provide a description list for the known <a class="wiki" href="/wiki/InterWiki">InterWiki</a> prefixes.
    66 <h3><code>[[KnownMimeTypes]]</code></h3>List all known mime-types which can be used as <a class="wiki" href="/wiki/WikiProcessors">WikiProcessors</a>.
    67 </div>
    68 }}}
    69 etc.
    70 }}}
     32=== Getting Detailed Help
     33
     34The list of available macros and the full help can be obtained using the !MacroList macro, see [#AvailableMacros below].
     35
     36A brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`.
     37
     38Detailed help on a specific macro can be obtained by passing it as an argument to !MacroList, e.g. `[[MacroList(MacroList)]]`, or more conveniently, by appending a question mark (`?`) to the macro's name, like in `[[MacroList?]]`.
    7139
    7240== Available Macros
     
    7846[[MacroList]]
    7947
    80 == Macros from around the world
     48== Contributed macros
    8149
    8250The [http://trac-hacks.org/ Trac Hacks] site provides a large collection of macros and other Trac [TracPlugins plugins] contributed by the Trac community. If you are looking for new macros, or have written one that you would like to share, please visit that site.
     
    9765from trac.wiki.macros import WikiMacroBase
    9866
    99 
    10067class TimestampMacro(WikiMacroBase):
    10168    _description = "Inserts the current time (in seconds) into the wiki page."
     
    11380from trac.util.translation import cleandoc_
    11481from trac.wiki.macros import WikiMacroBase
    115 
    11682
    11783class HelloWorldMacro(WikiMacroBase):