Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple-Wiki CPAN distribution.

Report information
The Basics
Id: 13313
Status: new
Priority: 0/
Queue: Pod-Simple-Wiki

People
Owner: jmcnamara [...] cpan.org
Requestors: rurban [...] x-ray.at
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: phpwiki support
Attached patch adds phpwiki support (modern). The old phpwiki format understands usemod and wiki also.
2005-06-19 19:05:56 rurban@x-ray.at * (lib/Pod/Simple/Wiki.pm, pod2wiki) Add phpwiki support. --- Pod-Simple-Wiki-0.05/lib/Pod/Simple/Wiki.pm.orig 2005-03-30 22:24:58.000000000 +0000 +++ Pod-Simple-Wiki-0.05/lib/Pod/Simple/Wiki.pm 2005-06-19 17:05:01.472125000 +0000 @@ -147,6 +147,26 @@ '<h4>' => "=====", '</h4>' => "=====\n", }, + + 'phpwiki' => { + '<b>' => "*", + '</b>' => "*", + '<i>' => "_", + '</i>' => "_", + '<tt>' => '=', + '</tt>' => '=', + '<pre>' => "\n<verbatim>\n", + '</pre>' => "\n</verbatim>\n\n", + + '<h1>' => "!!! ", + '</h1>' => "\n\n", + '<h2>' => "!! ", + '</h2>' => "\n\n", + '<h3>' => "! ", + '</h3>' => "\n\n", + '<h4>' => "! ", + '</h4>' => "\n\n", + }, ); @@ -283,6 +303,18 @@ $self->_append(";" x $indent_level . ' '); } } + elsif ($self->{_format} eq 'phpwiki') { + + if ($item_type eq 'bullet') { + $self->_append(' ' x $indent_level . "* "); + } + elsif ($item_type eq 'number') { + $self->_append(' ' x $indent_level . "# "); + } + elsif ($item_type eq 'text') { + $self->_append(' ' x $indent_level); + } + } } @@ -593,18 +625,20 @@ The C<Pod::Simple::Wiki> module is used for converting Pod text to Wiki text. -Pod (Plain Old Documentation) is a simple markup language used for writing Perl documentation. +Pod (Plain Old Documentation) is a simple markup language used for +writing Perl documentation. -A Wiki is a user extensible web site. It uses very simple mark-up that is converted to Html. +A Wiki is a user extensible web site. It uses very simple mark-up that +is converted to Html. For an introduction to Wikis see: http://en.wikipedia.org/wiki/Wiki - =head1 METHODS =head2 new() -The C<new> method is used to create a new L<Pod::Simple::Wiki> object. It is also used to set the output Wiki format. +The C<new> method is used to create a new L<Pod::Simple::Wiki> +object. It is also used to set the output Wiki format. my $parser1 = Pod::Simple::Wiki->new('wiki'); my $parser2 = Pod::Simple::Wiki->new('kwiki'); @@ -616,34 +650,47 @@ =item wiki -This is the original Wiki format as used on Ward Cunningham's Portland repository of Patterns. The formatting rules are given at http://c2.com/cgi/wiki?TextFormattingRules +This is the original Wiki format as used on Ward Cunningham's Portland +repository of Patterns. The formatting rules are given at +http://c2.com/cgi/wiki?TextFormattingRules =item kwiki -This is the format as used by Brian Ingerson's CGI::Kwiki: http://search.cpan.org/dist/CGI-Kwiki/ +This is the format as used by Brian Ingerson's CGI::Kwiki +See http://search.cpan.org/dist/CGI-Kwiki/ =item usemod -This is the format used by the Usemod wikis. See: http://www.usemod.com/cgi-bin/wiki.pl?WikiFormat +This is the format used by the Usemod wikis. +See http://www.usemod.com/cgi-bin/wiki.pl?WikiFormat =item twiki -This is the format used by TWiki wikis. See: http://www.twiki.org/ +This is the format used by TWiki wikis. See http://www.twiki.org/ =item wikipedia or mediawiki -This is the format used by Wikipedia and MediaWiki wikis. See: http://www.wikipedia.org/ +This is the format used by Wikipedia and MediaWiki wikis. +See http://www.wikipedia.org/ + +=item phpwiki + +This is the modern format used by PhpWiki. +See: http://www.phpwiki.org/ +For the old format use style=wiki or style=usemod. =back If no format is specified the parser defaults to C<wiki>. -Any other parameters in C<new> will be passed on to the parent L<Pod::Simple> object. See L<Pod::Simple> for more details. +Any other parameters in C<new> will be passed on to the parent +L<Pod::Simple> object. See L<Pod::Simple> for more details. =head2 Other methods -Pod::Simple::Wiki inherits all of the methods of L<Pod::Simple>. See L<Pod::Simple> for more details. +Pod::Simple::Wiki inherits all of the methods of L<Pod::Simple>. See +L<Pod::Simple> for more details. =head1 TODO @@ -689,5 +736,6 @@ © MMIII-MMV, John McNamara. -All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. +All Rights Reserved. This module is free software. It may be used, +redistributed and/or modified under the same terms as Perl itself. --- Pod-Simple-Wiki-0.05/pod2wiki.orig 2005-03-30 22:24:58.000000000 +0000 +++ Pod-Simple-Wiki-0.05/pod2wiki 2005-06-19 16:59:40.503375000 +0000 @@ -113,6 +113,11 @@ This is the format used by Wikipedia and MediaWiki wikis. See: http://www.wikipedia.org/ +=item phpwiki + +This is the modern format used by PhpWiki. See: http://www.phpwiki.org/ +For the old format use style=wiki or style=usemod. + =back
Thanks. If you have time could you add tests based on the existing test cases. John. --