SYNOPSIS

  use HTML::WikiConverter;
  my $wc = new HTML::WikiConverter( dialect => 'MediaWiki' );
  print $wc->html2wiki( $html );

DESCRIPTION

This module contains rules for converting \s-1HTML\s0 into MediaWiki markup. See HTML::WikiConverter for additional usage details.

ATTRIBUTES

In addition to the regular set of attributes recognized by the HTML::WikiConverter constructor, this dialect also accepts the following attributes:

preserve_bold

Boolean indicating whether bold \s-1HTML\s0 elements should be preserved as \s-1HTML\s0 in the wiki output rather than being converted into MediaWiki markup.

By default, <b> and <strong> elements are converted to wiki markup identically. But sometimes you may wish <b> tags in the \s-1HTML\s0 to be preserved in the resulting MediaWiki markup. This attribute allows this.

For example, if \*(C`preserve_bold\*(C' is enabled, \s-1HTML\s0 like

<ul> <li> <b>Bold</b> <li> <strong>Strong</strong> </ul>

will be converted to

* <b>Bold</b> * '''Strong'''

When disabled (the default), the preceding \s-1HTML\s0 markup would be converted into

* '''Bold''' * '''Strong'''

preserve_italic

Boolean indicating whether italic \s-1HTML\s0 elements should be preserved as \s-1HTML\s0 in the wiki output rather than being converted into MediaWiki markup.

For example, if \*(C`preserve_italic\*(C' is enabled, \s-1HTML\s0 like

<ul> <li> <i>Italic</i> <li> <em>Emphasized</em> </ul>

will be converted to

* <i>Italic</i> * ''Emphasized''

When disabled (the default), the preceding \s-1HTML\s0 markup would be converted into

* ''Italic'' * ''Emphasized''

preserve_templates

Boolean indicating whether \*(C`{{template}}\*(C' calls found in \s-1HTML\s0 should be preserved in the wiki markup. If disabled (the default), templates calls will be wrapped in \*(C`<nowiki>\*(C' tags.

preserve_nowiki

Boolean indicating whether \*(C`<nowiki>\*(C' tags found in \s-1HTML\s0 should be preserved in the wiki markup. If disabled (the default), nowiki tags will be replaced with their content.

pad_headings

Boolean indicating whether section headings should be padded with spaces (eg, \*(L"== Section ==\*(R" instead of \*(L"==Section==\*(R"). Default is false (ie, not to pad).

AUTHOR

David J. Iberri, \*(C`<diberri at cpan.org>\*(C'

BUGS

Please report any bugs or feature requests to \*(C`bug-html-wikiconverter-mediawiki at rt.cpan.org\*(C', or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-WikiConverter-MediaWiki>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc HTML::WikiConverter::MediaWiki

You can also look for information at:

  • AnnoCPAN: Annotated \s-1CPAN\s0 documentation <http://annocpan.org/dist/HTML-WikiConverter-MediaWiki>

  • \s-1CPAN\s0 Ratings <http://cpanratings.perl.org/d/HTML-WikiConverter-MediaWiki>

  • \s-1RT:\s0 \s-1CPAN\s0's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-WikiConverter-MediaWiki>

  • Search \s-1CPAN\s0 <http://search.cpan.org/dist/HTML-WikiConverter-MediaWiki>

COPYRIGHT & LICENSE

Copyright 2006 David J. Iberri, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.