HTML::WikiConverter version 0.61
================================
HTML::WikiConverter is an HTML to wiki converter capable of converting
HTML source into a variety of wiki dialects. It's aimed at folks who
are converting vanilla HTML websites into wikis.
The following dialects are supported:
DokuWiki
Kwiki
Markdown
MediaWiki
MoinMoin
Oddmuse
PbWiki
PhpWiki
PmWiki
SnipSnap
TikiWiki
UseMod
WakkaWiki
WikkaWiki
INSTALLATION
The HTML::WikiConverter module is just an interface; to actually
perform HTML-to-wiki conversion, you can either install individual
dialect modules (see below) or install Bundle::HTMLWikiConverter to
get all of the dialect modules in one shot:
% perl -MCPAN -e 'install Bundle::HTMLWikiConverter'
For just the HTML::WikiConverter interface:
% perl -MCPAN -e 'install HTML::WikiConverter'
Individual dialects can be installed separately; for example:
% perl -MCPAN -e 'install HTML::WikiConverter::MediaWiki'
% perl -MCPAN -e 'install HTML::WikiConverter::PhpWiki'
SYNOPSIS
Converting HTML to wiki markup is easy:
use HTML::WikiConverter;
my $wc = new HTML::WikiConverter( dialect => 'MediaWiki' );
print $wc->html2wiki( $html );
The included html2wiki utility converts on the command line:
% html2wiki --dialect MediaWiki input.html > output.mw
There's also a web interface if you're so inclined:
http://diberri.dyndns.org/wikipedia/html2wiki/
PREREQUISITES
* Test::More
* Class::Data::Inheritable
* Params::Validate
* URI and URI::Escape
* HTML::TreeBuilder
* HTML::Tagset
* HTML::Entities
* HTML::Element
* CSS
CHANGES IN VERSION 0.61
* (bug #20607) Add missing CSS and HTML::Element prerequisites
so that 'make test' is successful
CHANGES IN VERSION 0.60
* Add CSS-to-HTML normalization so, for example,
'text' will be interpreted
as 'text' before conversion to wiki markup. This can be
disabled by passing the 'normalize' attribute a false value.
* Non-semantic tags with no attributes can be replaced with their
content by enabling the 'passthrough_naked_tags' attribute.
* Rules are now loaded on demand so they can respond to attribute
modification events.
* The new "UNKNOWN" rule acts as a catch-all for unknown tags.
* HTML can now be fetched from a URI by passing a 'uri' argument to
the html2wiki() method.
* The user agent used to fetch content from a URI can be specified
in the 'user_agent' attribute.
* Dialect authors may now use the 'passthrough' subrule for replacing
tags with their contents at conversion time.
* The 'remove_empty' attribute is now called 'strip_empty_tags' for
consistency with other attributes. It behaves slightly different
too, considering elements empty if they contain only whitespace.
BUGS
I made the mistake of packing too many changes into the 0.60 release,
so there will likely be some bugs. Please report them to rt.cpan.org.
THANKS TO
* Tatsuhiko Miyagawa for suggestions and code
* Dave Schaefer for the PbWiki dialect and for the idea behind the
new C implementation.
* Martin Kudlvasr for fixing a bug in how 'wrap_in_html' was applied to
HTML read from files
COPYRIGHT
Copyright (c) 2004-2006 David J. Iberri
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html