welcome: please sign in

The following 417 words could not be found in the dictionary of 7 words (including 7 LocalSpellingWords) and are highlighted below:
actions   add   added   Additional   after   again   ah   Alexander   all   allow   allows   also   an   Anchor   and   applied   are   argc   argument   arguments   argv   as   ascii   asdfghj   at   auto   autofilter   bang   base   Base   be   been   begin   beginning   behavior   Besides   bold   Book   boolean   braces   browser   but   By   by   Calendar   call   called   calls   can   cant   change   char   choose   class   client   clients   clipping   code   Code   colorization   colorized   Colorizes   cols   column   columns   com   comes   comma   command   concept   Connection   considered   consisting   console   const   construct   contain   contained   content   contents   Contents   Convert   correct   could   cplusplus   create   creole   Creole   csvparser   curly   dataset   Date   day   def   default   defaults   delimiter   deprecated   Deprecation   derived   described   description   different   differently   disable   Display   display   displays   Doc   don   double   duplicate   each   earlier   easily   Editing   empty   enclosing   end   ending   enter   error   eventlog   Ex   exact   example   Example   examples   extended   failing   few   filters   Firefox   first   Fixed   fixed   following   For   for   format   formats   formatter   Formatter   Formatting   from   function   get   go   good   gpciceri   has   hashbang   headers   Hello   hello   Help   hide   history   History   host181   How   http   if   import   improved   in   increment   information   init   installation   Instance   Instruction   instruction   instructions   Instructions   Int   int   integer   Integer   interbusiness   interpreted   into   irc   is   it   It   Java   java   javascript   jroes   Just   just   known   leave   like   line   linenumber   linenumbers   lines   link   list   log   long   main   make   many   Market   markup   Match   match   menu   method   mig3   modification   month   more   More   mostly   Mozilla   must   myself   name   names   nesting   Nir   no   non   normalize   not   Note   now   number   numbering   numbers   Of   of   off   old   omitted   On   on   only   or   other   out   output   page   Page   Pages   parse   parsed   Parser   parser   Parsers   parsers   part   pascal   patch   path   pi   please   pool8248   popular   Pos   possible   print   problems   process   Processing   processing   processor   produce   produces   program   public   purpose   Puts   py   python   Query   quit   quite   quote   quotechar   quoting   Random   rather   raw   re   Re   Read   readable   record   referer   Reg   region   regions   Regions   related   remaining   remove   render   rendered   require   respective   result   return   Revision   same   Schremmer   script   Script   scripts   searchform   section   See   see   semicolon   separated   separator   separators   sequence   serve   set   shell   should   show   so   Soffer   solve   some   source   specify   start   static   step   string   String   Structured   such   supports   switchable   syntax   Syntax   system   table   Table   tables   techniques   tell   tells   test   Text   text   than   that   The   the   them   there   they   this   Thomas   those   though   through   Time   timed   titles   to   twistedmoin   understands   unicode   unique   Unix   unused   url   use   Use   used   useful   user   Users   using   usually   util   utility   vals   values   var   Version   versions   Wal   Waldmann   want   Warning   was   ways   web   what   when   where   which   whole   wiki   wikiutil   will   With   with   works   World   would   write   Xml   year   You   you  

Clear message
Page Locked


HelpContents > HelpForUsers > HelpOnEditing > HelpOnParsers

1. Parsers

Besides the default MoinMoin wiki markup, different parsers allow the user to enter content into a page or a page section which is interpreted differently. A MoinMoin wiki mostly will use the default wiki parser, which is described on HelpOnFormatting.

1.1. How formats are applied

Parsers go through the contents of a page to create a sequence of formatter calls which in sequence create some readable output. MoinMoin will choose the parser for a page using 2 different techniques:

  1. FORMAT Processing Instruction

    A #FORMAT processing instruction can be used to tell MoinMoin which parser to use for the whole page content. By default this is the wiki parser. Example:

    #FORMAT cplusplus
    ... some C++ source ...
  2. Code Display Regions - see HelpOnFormatting

    With the use of code display regions, a parser can be applied to only a part of a page (this was a processor region in earlier versions of MoinMoin). You specify which parser to call by using a bang path-like construct in the first line. A bang path is a concept known from Unix command line scripts, where they serve the exact same purpose: the first line tells the shell what program to start to process the remaining lines of the script. For example, the code

    {{{#!CSV ,
    produces the table:
    a b c
    d e f

(!) Note that there are 2 ways to solve nesting problems related to }}}:

For more information on the possible markup, see HelpOnEditing.

1.2. ParserBase

ParserBase is a parser utility class used to produce colorized source displays. It is easily extended. The HTML Formatter will render such code displays with switchable linenumbers, if the browser supports DOM and JavaScript.

A ParserBase colorization parser understands the following arguments to a #FORMAT pi or a hashbang line. Just add those arguments after the name of the parser (#FORMAT python start=10 step=10 numbers=on or #!python numbers=off).

if line numbers should be added. defaults to 'on'. possible values: 'on', 'off' (no line numbers, but javascript to add them), 'disable' (no line numbers at all)
where to start with numbering. defaults to 1
increment to the linenumber. defaults to 1

MoinMoin comes with a few examples from which you can go on:

1.3. creole

See HelpOnCreoleSyntax.

1.4. python

Colorizes python code. It is not derived from ParserBase, but it allows the same arguments as the ParserBase parsers.

   1 def hello():
   2     print "Hello World!"

def hello():
    print "Hello World!"

def hello():
    print "Hello World!"

1.4.1. cplusplus

   1 int main(int argc, char **argv) {
   2   return 0;
   3 }

1.4.2. java

   1 import java.util.Date;
   2 import java.util.Calendar;
   4 public class IntDate
   5 {
   6   public static Date getDate(String year, String month, String day)
   7     {
   8       // Date(int, int, int) has been deprecated, so use Calendar to
   9       // set the year, month, and day.
  10       Calendar c = Calendar.getInstance();
  11       // Convert each argument to int.
  12       c.set(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));
  13       return c.getTime();
  14     }
  15 }

1.4.3. pascal

   1 function TRegEx.Match(const s:string):boolean;
   2 var
   3     l,i : integer;
   4 begin
   5     result := MatchPos(s,l,i);
   6 end;

1.5. IRC

Puts an IRC log into a table.

   1 (23:18) <     jroes> ah
   2 (23:21) -!- gpciceri [~gpciceri@host181-130.pool8248.interbusiness.it] has quit [Read error: 110 (Connection timed out)]
   3 (23:36) < ThomasWal> you could also write a parser or processor
   4 (23:38) <     jroes> i could?
   5 (23:38) <     jroes> would that require modification on the moin end though?
   6 (23:38) <     jroes> i cant change the wiki myself :x

The format parsed is the log format of IRSSI, a popular console IRC client, but it should also match the log format of quite some other IRC clients.

1.6. CSV

The CSV parser works on so-called comma separated values, though the comma is now usually and by default a semicolon. The first line is considered to contain column titles that are rendered in bold, so when you don't want table headers, leave the first line empty.

The bang path can contain the following arguments:

The parser also supports the old, deprecated syntax for the bang path.

Example tables (please see the raw text of this page for the markup used):

MoinMoin 1.3 - clipping of the patch history:

patch-366 make _normalize_text public method Nir Soffer
patch-367 fixed failing test wikiutil: good system page names Nir Soffer
patch-368 Fixed DeprecationWarning in RandomPage.py and an unused import in twistedmoin.py Alexander Schremmer
patch-369 remove duplicate code in formatter.base Thomas Waldmann
patch-370 fixed long int in mig3 Thomas Waldmann
patch-371 fixed unicode error on eventlog Nir Soffer
patch-372 fixed util.web.makeQueryString and Page.url Nir Soffer
patch-373 fixed again non ascii http_referer Nir Soffer
patch-374 CSV.py supports different separators now Alexander Schremmer
patch-375 improved searchform behavior on Mozilla/Firefox Nir Soffer
patch-376 More correct script for actions menu init Nir Soffer

MoinMoin Version History:

Version Date
0.11 2002-03-11
0.10 2001-10-28
0.9 2001-05-07
0.8 2001-01-23
0.7 2000-12-06
0.6 2000-12-04
0.5 2000-11-17
0.4 2000-11-01
0.3 2000-10-25
0.2 2000-08-26
0.1 2000-07-29

1.7. reStructuredText

See /ReStructuredText

1.8. XML/XSLT/DocBook

See HelpOnXmlPages.

1.9. Additional Parsers

For many more parsers and installation instructions, see ParserMarket