NAME
HTML::WikiConverter - An HTML-to-wiki markup converter
SYNOPSIS
my $wc = new HTML::WikiConverter(
html => $html
);
print $wc->output, "\n";
DESCRIPTION
There are lots of programs out there that convert wiki markup into HTML, but relatively few that convert HTML into wiki markup. HTML::WikiConverter falls into the latter category, converting HTML source into wiki markup. The resulting markup is suitable for most wiki engines, but is admittedly targeted for MediaWiki (on which Wikipedia runs -- see http://wikipedia.org)
METHODS
- new
-
$wc = new HTML::WikiConverter( %attribs )Accepts a list of attribute name/value pairs and returns a new HTML::WikiConverter object. Allowed attribute names:
file - (scalar) name of HTML file to convert to wikitext html - (scalar) HTML source to convert base_url - (scalar) base URL used to make absolute URLs dialect - (scalar) wiki engine target, either MediaWiki or PhpWiki (default: MediaWiki)If both the 'file' and 'html' attributes are specified, only the 'file' attribute will be used.
- file
-
$file = $wc->fileReturns the value of the 'file' property passed to the
newconstructor. - html
-
$html = $wc->htmlReturns the value of the 'html' property passed to the
newconstructor. - root
-
$root = $wc->rootReturns the root HTML::Element of the HTML tree
- output
-
$output = $wc->outputConverts HTML input to wiki markup.
- log
-
$log_output = $wc->logReturns log information accumulated during conversion.
- rendered_html
-
$html = $wc->rendered_htmlReturns a pretty-printed version of the HTML that WikiConverter used to produce wikitext markup. This will almost certainly differ from the HTML input provided to
newbecause of internal processing done by HTML::TreeBuilder, namely that all start tags are closed, HTML, BODY, and HEAD tags are automatically wrapped around the provided HTML source (if not already present), tags are converted to lowercase, attributes are quoted, etc.
COPYRIGHT
Copyright (c) 2004 David J. Iberri
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
David J. Iberri <diberri@yahoo.com>
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 283:
You forgot a '=back' before '=head1'