NAME
html2wiki - convert HTML into wiki markup
SYNOPSIS
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)
--list List installed dialects and exit
--help Show this message and exit
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
DESCRIPTION
html2wiki
is a command-line interface to HTML::WikiConverter, which it uses to convert HTML to wiki markup.
DIALECTS
If the dialect you provide 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. Use html2wiki --list
to list all available dialects on your system. Additional dialects may be downloaded from the CPAN.
INPUT/OUTPUT
Input is taken from 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
AUTHOR
David J. Iberri, <diberri@cpan.org>
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.