NAME
PurpleWiki::Parser::MoinMoin - MoinMoin parser.
SYNOPSIS
use PurpleWiki::Parser::MoinMoin;
my $parser = PurpleWiki::Parser::MoinMoin->new;
my $wikiTree = $parser->parse($wikiText);
DESCRIPTION
Parses a MoinMoinWiki text file, and returns a PurpleWiki::Tree.
STATUS
This is not a complete MoinMoin parser, but it's good enough for most conversion jobs. The formatting rules are very close. MoinMoin is richer, in that it supports some additional formatting functions (superscript, underline, tables) and functionality (plugins).
The primary difference is in how MoinMoin handles lists and indentations. True to its Pythonic origins, it uses whitespace. The whitespace rules are funky, and because of the complexity required to implement them exactly the same, I didn't account for certain special cases. For example:
1. Hello.
1. There.
1. Should be a new list
would actually be parsed to:
ol:
li:Hello.
li:Hello.
li:Should be a new list
I also didn't account for all of the pre special cases, namely:
This is a paragraph. {{{This should be the start of a pre.
But it's not.
}}}
will parse to:
p:This is a paragraph. {{{This should be the start of a pre.
But it's not.
}}}
For the sake of conversion, most of these special cases can be grepped for and fixed manually.
METHODS
new()
Constructor.
parse($wikiContent, %params)
Parses $wikiContent into a PurpleWiki::Tree. The following parameters are supported:
add_node_ids -- Add IDs to structural nodes that do not already
have them.
wikiword -- Parse WikiWords.
freelink -- Parse free links (e.g. [[free link]]).
AUTHORS
Eugene Eric Kim, <eekim@blueoxen.org>