html2wiki - convert HTML into wiki markup
html2wiki [options] [file]
Options:
--dialect=dialect Dialect name, e.g. "MediaWiki" (required unless the WCDIALECT environment variable is used) --encoding=encoding Source encoding (default is 'utf-8') --base-uri=uri Base URI for relative links (optional) --wiki-uri=uri URI fragment for wiki links (optional) --no-wrap-in-html Don't wrap input in <html> and </html> (default is to wrap) --help Show this message
Example:
html2wiki --dialect MediaWiki --encoding iso-8859-1 \ --base-uri http://en.wikipedia.org/wiki/ \ --wiki-uri http://en.wikipedia.org/wiki/ \ input.html > output.wiki
html2wiki is a command-line interface to HTML::WikiConverter, which it uses to convert HTML to wiki markup.
html2wiki
Consult HTML::WikiConverter for a list of known dialects that may be given in --dialect. Note that if the dialect given in --dialect is not installed on your system (e.g. if you specify MediaWiki but have not installed its dialect module, HTML::WikiConverter::MediaWiki) a fatal error will be issued.
--dialect
MediaWiki
Input is accepted on STDIN, so you may pipe the output from another program into html2wiki. For example:
curl http://example.com/input.html | html2wiki --dialect MediaWiki
You may also specify a file to read HTML from:
html2wiki --dialect MediaWiki input.html
Output is sent to STDOUT, though you may redirect it on the command line:
html2wiki --dialect MediaWiki input.html > output.wiki
Or you may pipe it into another program:
html2wiki --dialect MediaWiki input.html | less
David J. Iberri, <diberri@cpan.org>
<diberri@cpan.org>
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.
HTML::WikiConverter
To install HTML::WikiConverter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::WikiConverter
CPAN shell
perl -MCPAN -e shell install HTML::WikiConverter
For more information on module installation, please visit the detailed CPAN module installation guide.