.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "HTML2WIKI 1p" .TH HTML2WIKI 1p "2013-10-12" "perl v5.18.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" html2wiki \- convert HTML into wiki markup .SH "SYNOPSIS" .IX Header "SYNOPSIS" html2wiki [options] [file] .PP Commonly used options: .PP .Vb 9 \& \-\-dialect=dialect Dialect name, e.g. "MediaWiki" (required unless \& the WCDIALECT environment variable is used) \& \-\-encoding=encoding Source encoding (default is \*(Aqutf\-8\*(Aq) \& \-\-base\-uri=uri Base URI for relative links \& \-\-wiki\-uri=uri URI fragment for wiki links \& \-\-wrap\-in\-html Wrap input in and (enabled by default). \& Use \-\-no\-wrap\-in\-html to disable. \& \-\-escape\-entities Escape HTML entities within text elements (enabled by \& default). Use \-\-no\-escape\-entities to disable. \& \& \-\-list List installed dialects and exit \& \-\-options List all recognized options (except for negations \& such as \-\-no\-wrap\-in\-html) \& \-\-help Show this message and exit \& \& Additional options, including those corresponding to dialect \& attributes, are also supported. Consult the html2wiki man page for \& details. .Ve .PP Example: .PP .Vb 4 \& html2wiki \-\-dialect MediaWiki \-\-encoding iso\-8859\-1 \e \& \-\-base\-uri http://en.wikipedia.org/wiki/ \e \& \-\-wiki\-uri http://en.wikipedia.org/wiki/ \e \& input.html > output.wiki .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`html2wiki\*(C'\fR is a command-line interface to HTML::WikiConverter, which it uses to convert \s-1HTML\s0 to wiki markup. .SH "DIALECTS" .IX Header "DIALECTS" If the dialect you provide in \f(CW\*(C`\-\-dialect\*(C'\fR is not installed on your system (e.g. if you specify \f(CW\*(C`MediaWiki\*(C'\fR but have not installed its dialect module, HTML::WikiConverter::MediaWiki) a fatal error will be issued. Use \f(CW\*(C`html2wiki \-\-list\*(C'\fR to list all available dialects on your system. Additional dialects may be downloaded from the \s-1CPAN.\s0 .SH "OPTIONS" .IX Header "OPTIONS" .SS "Correspondence of options and attributes" .IX Subsection "Correspondence of options and attributes" Each of the options accepted by \f(CW\*(C`html2wiki\*(C'\fR corresponds to an HTML::WikiConverter attribute. Commonly used options described in \&\f(CW\*(C`html2wiki \-\-help\*(C'\fR therefore correspond to attributes discussed in \&\*(L"\s-1ATTRIBUTES\*(R"\s0 in HTML::WikiConverter. That section also contains other attributes that may be used as \f(CW\*(C`html2wiki\*(C'\fR command-line options. .SS "Mapping an attribute name to an option name" .IX Subsection "Mapping an attribute name to an option name" While related, option names are not identical to their corresponding attribute names. The only difference is that attribute names use underscores to separate words while option names use hyphens. For example, the \f(CW\*(C`base_uri\*(C'\fR attribute corresponds to the \f(CW\*(C`\-\-base\-uri\*(C'\fR command-line option. .SS "Additional options defined in dialect modules" .IX Subsection "Additional options defined in dialect modules" Individual dialects may define their own attributes, and therefore make available their own command-line options to \f(CW\*(C`html2wiki\*(C'\fR, in addition to the ones defined by \f(CW\*(C`HTML::WikiConverter\*(C'\fR. The same rules described above apply for converting between these attribute names and their corresponding command-line option names. For example, Markdown supports an \f(CW\*(C`unordered_list_style\*(C'\fR attribute that takes a string value. To use this attribute on the command line, one would use the \&\f(CW\*(C`\-\-unordered\-list\-style\*(C'\fR option. Consult individual dialect man pages for a list of supported attributes. .SS "Options that are enabled by default" .IX Subsection "Options that are enabled by default" Attributes that take boolean values may be enabled by default. The \&\f(CW\*(C`wrap_in_html\*(C'\fR attribute is one such example. Because of this, \&\f(CW\*(C`html2wiki\*(C'\fR will effectively behave by default as if \&\f(CW\*(C`\-\-wrap\-in\-html\*(C'\fR had been specified in every invocation. If this is not desired, the option name may be prefixed with \f(CW\*(C`no\-\*(C'\fR to disable the option, as in \f(CW\*(C`\-\-no\-wrap\-in\-html\*(C'\fR. .SS "Options that take multiple values" .IX Subsection "Options that take multiple values" Some attributes (eg, \f(CW\*(C`wiki_uri\*(C'\fR and \f(CW\*(C`strip_tags\*(C'\fR) accept an array of values. To accommodate this in \f(CW\*(C`html2wiki\*(C'\fR, such options can be specified more than once on the command line. For example, to specify that only comment and script elements should be stripped from \s-1HTML:\s0 .PP .Vb 1 \& % html2wiki \-\-strip\-tags ~comment \-\-strip\-tags script ... .Ve .SH "INPUT/OUTPUT" .IX Header "INPUT/OUTPUT" Input is taken from \s-1STDIN,\s0 so you may pipe the output from another program into \f(CW\*(C`html2wiki\*(C'\fR. For example: .PP .Vb 1 \& curl http://example.com/input.html | html2wiki \-\-dialect MediaWiki .Ve .PP You may also specify a file to read \s-1HTML\s0 from: .PP .Vb 1 \& html2wiki \-\-dialect MediaWiki input.html .Ve .PP Output is sent to \s-1STDOUT,\s0 though you may redirect it on the command line: .PP .Vb 1 \& html2wiki \-\-dialect MediaWiki input.html > output.wiki .Ve .PP Or you may pipe it into another program: .PP .Vb 1 \& html2wiki \-\-dialect MediaWiki input.html | less .Ve .SH "AUTHOR" .IX Header "AUTHOR" David J. Iberri, \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2006 David J. Iberri, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" HTML::WikiConverter