Hörnan   HelpOnMacros Logga in!
 
HelpContents Search Diffs Info Edit Subscribe Print View

  1. Macros
    1. Search macros
    2. Navigation
    3. System information
    4. Others
  2. Example Display

Macros

Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.

For more information on the possible markup, see HelpOnEditing.

Search macros

MacroDescriptionExample
[[TitleSearch]] search the page titles See the FindPage
[[FullSearch]] search the page contents See the FindPage
[[FullSearch()]] search for the current title in all pages (like clicking on the page title) See the CategoryCategory page
[[FullSearch('text')]] search for "text" in all pages Search for FullSearch:
  1. HjälpMedMakron . . . . 6 matches
  2. HelpOnMacros . . . . 6 matches
  3. HjälpMedÅtgärder . . . . 3 matches
  4. HelpOnActions . . . . 3 matches
  5. SökSida . . . . 1 match
  6. PlatsNavigering . . . . 1 match
  7. IndexingScheme . . . . 1 match
  8. FindPage . . . . 1 match
  9. CategoryCategory . . . . 1 match
[[GoTo]] directly go to the page you enter See the FindPage
[[PageList(regex)]] list of pages whose title matches the regex See the HelpIndex

Navigation

MacroDescriptionExample
[[RecentChanges]] a list of recently edited pages See RecentChanges
[[TitleIndex]] an index of all page titles See TitleIndex
[[WordIndex]] an index of all words in page titles See WordIndex
[[WantedPages]] list links to non-existent pages See WantedPages
[[OrphanedPages]] list pages no other page links to See OrphanedPages
[[AbandonedPages]] list pages that were not edited for the longest time See AbandonedPages
[[RandomPage]] a link to a random page GarthKidd
[[RandomPage(#)]] links to a number of random pages Two random pages:
[[TableOfContents([maxdepth])]] display a local table of contents, possibly limited to a maximal depth See above
[[Anchor(anchorname)]] macro to insert anchors into a page #here

System information

MacroDescriptionExample
[[InterWiki]] a list of all known InterWiki names InterWiki
[[SystemInfo]] info on the wiki, the python interpreter and the host system SystemInfo
[[PageCount]] current page count 1903 pages
[[PageSize]] list the sizes of all pages See PageSize
[[StatsChart(type)]] shows statistical charts (currently defined types: hitcounts, pagesize, useragents) See EventStats and subpages
[[SystemAdmin]] Web interface to wiki administration (not completed yet as of version 1.0) See SystemInfo

Others

MacroDescriptionExample
[[Icon(image)]] display system icons See HelpOnNavigation
[[UserPreferences]] display a user preferences dialog See UserPreferences
[[BR]] insert a line break 1st line
2nd line
[[RandomQuote(pagename)]] Select a random quote from the given page, or from FortuneCookies if ommitted [[RandomQuote]]
[[Include(HelloWorld[,"heading"[,level]])]] include contents of another page

Hello, World! [goto HelloWorld]

[[FootNote(text)]] Add a footnote (the text cannot contain any wiki markup), or explicitely display collected footnotes when no args are given See HelpOnPageCreation for an example
[[Date(timestamp)]] display a timestamp according to system settings 2003-08-17
[[DateTime(timestamp)]] display a timestamp1 according to user settings 2003-08-17 20:55:39
[[GetText(text)]] loads I18N texts (mainly intended for use on Help pages) "EditText" is translated to "EditText"
[[TeudView]] useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet, for details see [EfnetPythonWiki]TeudProject See [EfnetPythonWiki]TeudViewer?module=MoinMoin.macro.TeudView

____
   1 "timestamp" can be empty (current time), a number of seconds since 1970 (unix timestamp), or a W3C time specification ("2002-01-23T12:34:56").

Example Display

We don't show examples for all macros here, because that would make this page quite long. Here is is the replacement text for the [[SystemInfo]] macro:

    >

 
 
ValueError: empty string for float()
Python 2.2
/usr/bin/python2

A problem occurred while running a Python script. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call first. The exception attributes are:
      __doc__ = 'Inappropriate argument value (of correct type).'
      __getitem__ = <bound method ValueError.__getitem__ of <exceptions.ValueError instance at 0x833755c>>
      __init__ = <bound method ValueError.__init__ of <exceptions.ValueError instance at 0x833755c>>
      __module__ = 'exceptions'
      __str__ = <bound method ValueError.__str__ of <exceptions.ValueError instance at 0x833755c>>
      args = ('empty string for float()',)

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/eventlog.py in read(self=<MoinMoin.eventlog.EventLogger instance>, filter=None)
   70             time, eventtype, kvpairs = string.split(string.rstrip(event), '\t')
   71             if filter and eventtype not in filter: continue
   72             data.append((float(time), eventtype, util.parseQueryString(kvpairs)))
       data = [(1045071789.1900001, 'SAVEPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan_2fFramtid?action=edit', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Framtid'}), (1045071896.83, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan_2fFramtid?action=AttachFile&ts=1045071799.16', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Framtid'}), (1045071909.28, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan_2fFramtid', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'SenasteNytt'}), (1045071925.3099999, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/SenasteNytt', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Framtid'}), (1045071929.3200001, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan_2fFramtid', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan'}), (1045071956.67, 'VIEWPAGE', {'HTTP_USER_AGENT': 'Scooter/3.2.SF0', 'REMOTE_ADDR': '216.39.50.156', 'pagename': 'FightClub'}), (1045071977.26, 'VIEWPAGE', {'HTTP_REFERER': 'http://www.google.com/search?hl=sv&ie=UTF-8&oe=UTF-8&q=enarmadbandit&lr=lang_sv', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', 'REMOTE_ADDR': '212.247.174.157', 'pagename': 'WordIndex'}), (1045072002.1, 'SAVEPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan?action=edit', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan'}), (1045072067.25, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Nyheter'}), (1045072073.25, 'VIEWPAGE', {'HTTP_USER_AGENT': 'Scooter/3.2.SF0', 'REMOTE_ADDR': '216.39.50.144', 'pagename': 'TV + Nintendo 8-bitars'}), (1045072080.74, 'VIEWPAGE', {'HTTP_REFERER': 'http://se.altavista.com/web/results?q=MahatmaGandhi&kgs=1&kls=1&avkw=xytx', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)', 'REMOTE_ADDR': '213.114.43.107', 'pagename': 'Judar'}), (1045072092.9400001, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/Judar', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)', 'REMOTE_ADDR': '213.114.43.107', 'pagename': 'MahatmaGandhi'}), (1045072112.11, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/simon/', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 'REMOTE_ADDR': '195.252.44.221', 'pagename': 'H\xf6rnansStartsida'}), (1045072127.67, 'VIEWPAGE', {'HTTP_REFERER': 'http://helgo.net/cgi-bin/simon/MoinMoin/wiki-moinmoin/moin.cgi', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 'REMOTE_ADDR': '195.252.44.221', 'pagename': '\xc4taOchDricka'}), (1045072229.02, 'SAVEPAGE', {'HTTP_REFERER': 'http://helgo.net/fika/H_f6rnan_2fNyheter?action=edit', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Nyheter'}), (1045072276.97, 'VIEWPAGE', {'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnansStartsida'}), (1045072281.04, 'VIEWPAGE', {'HTTP_REFERER': 'http://www.helgo.net/fika', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'SenasteNytt'}), (1045072293.75, 'VIEWPAGE', {'HTTP_REFERER': 'http://www.helgo.net/fika/SenasteNytt', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'H\xf6rnan/Nyheter'}), (1045072315.02, 'VIEWPAGE', {'HTTP_REFERER': 'http://www.helgo.net/fika/H_f6rnan_2fNyheter', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'REMOTE_ADDR': '130.238.5.5', 'pagename': 'SenasteNytt'}), (1045072317.53, 'VIEWPAGE', {'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 'REMOTE_ADDR': '213.67.43.137', 'pagename': 'Horor'}), ...], global append = undefined, global float = undefined, time = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0...x00\x00\x00\x00\x00\x00\x00\x00\x001047256848.66', eventtype = 'VIEWPAGE', global util = <module 'MoinMoin.util' from '/home/simon/local/...thon2.2/site-packages/MoinMoin/util/__init__.py'>, global parseQueryString = undefined, kvpairs = 'pagename=Nietzsche&REMOTE_ADDR=66.77.73.150&HTT...0no%3B%20http%3A//fast.no/support/crawler.asp%29'
   73 
   74         return data

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/wikimacro.py in _macro_SystemInfo(self=<MoinMoin.wikimacro.Macro instance>, args=None)
  247         row(_('Entries in edit log'), _("%(logcount)s (%(logsize)s bytes)") %
  248             {'logcount': len(edlog), 'logsize': edlog.size()})
  249         row(_('Entries in event log'), _("%(logcount)s (%(logsize)s bytes)") %
       row = <function <lambda>>, global _ = <function getText>, global len = undefined, eventlogger = <MoinMoin.eventlog.EventLogger instance>, global read = undefined, global size = undefined
  250             {'logcount': len(eventlogger.read()), 'logsize': eventlogger.size()})
  251         row(_('Global extension macros'), 

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/wikimacro.py in execute(self=<MoinMoin.wikimacro.Macro instance>, macro_name='SystemInfo', args=None)
   75         builtins = vars(self.__class__)
   76         if builtins.has_key('_macro_' + macro_name):
   77             return apply(builtins['_macro_' + macro_name], (self, args))
       global apply = undefined, builtins = {'_Macro__get_Date': <function __get_Date>, '__doc__': ' Macro handler ', '__init__': <function __init__>, '__module__': 'MoinMoin.wikimacro', '_m_search': <function _m_search>, '_macro_Anchor': <function _macro_Anchor>, '_macro_Date': <function _macro_Date>, '_macro_DateTime': <function _macro_DateTime>, '_macro_GoTo': <function _macro_GoTo>, '_macro_Icon': <function _macro_Icon>, ...}, macro_name = 'SystemInfo', self = <MoinMoin.wikimacro.Macro instance>, args = None
   78 
   79         # load extension macro

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/parser/wiki.py in _macro_repl(self=<MoinMoin.parser.wiki.Parser instance>, word='[[SystemInfo]]')
  636 
  637         # call the macro
  638         return self.macro.execute(macro_name, args)
       self = <MoinMoin.parser.wiki.Parser instance>, global macro = undefined, global execute = undefined, macro_name = 'SystemInfo', args = None
  639 
  640 

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/parser/wiki.py in replace(self=<MoinMoin.parser.wiki.Parser instance>, match=<_sre.SRE_Match object>)
  746                     return self.highlight_text(hit)
  747                 else:
  748                     return apply(getattr(self, '_' + type + '_repl'), (hit,))
       global apply = undefined, global getattr = undefined, self = <MoinMoin.parser.wiki.Parser instance>, type = 'macro', hit = '[[SystemInfo]]'
  749         else:
  750             import pprint

<file is None - probably inside eval or exec> in subn(pattern=<_sre.SRE_Pattern object>, repl=<bound method Parser.replace of <MoinMoin.parser.wiki.Parser instance at 0x833479c>>, string=' [[SystemInfo]] ', count=0)

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/parser/wiki.py in format(self=<MoinMoin.parser.wiki.Parser instance>, formatter=<MoinMoin.formatter.text_html.Formatter instance>, form=FieldStorage(None, None, []))
  863                 sys.stdout.write(self.highlight_scan(scan_re, line + " "))
  864             else:
  865                 line, count = re.subn(scan_re, self.replace, line + " ")
       line = ' [[SystemInfo]]', count = 1, global re = <module 're' from '/usr/lib/python2.2/re.pyc'>, global subn = undefined, scan_re = <_sre.SRE_Pattern object>, self = <MoinMoin.parser.wiki.Parser instance>, global replace = undefined
  866                 ##if not count: self._check_p()
  867                 self._check_p()

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/Page.py in send_page(self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.Request instance>, msg='', **keywords={'count_hit': 1})
  378         else:
  379             # parse the text and send the page content
  380             Parser(body, request).format(self.formatter, form)
       Parser = <class MoinMoin.parser.wiki.Parser>, body = '\n[[TableOfContents]]\n\n== Macros ==\nMacros a...e {{{[[SystemInfo]]}}} macro:\n [[SystemInfo]]\n', request = <MoinMoin.request.Request instance>, global format = undefined, self = <MoinMoin.Page.Page instance>, global formatter = undefined, form = FieldStorage(None, None, [])
  381 
  382             # check for pending footnotes

/home/simon/local/moin-fippel/lib/python2.2/site-packages/MoinMoin/cgimain.py in run(properties={})
  233         else:
  234             try:
  235                 cgitb.handler()
       cgitb = <module 'MoinMoin.support.cgitb' from '/home/sim...thon2.2/site-packages/MoinMoin/support/cgitb.py'>, handler = undefined
  236             except:
  237                 apply(cgi.print_exception, saved_exc)